This commit is contained in:
2020-04-27 16:47:55 +00:00
parent 57439f69ed
commit 480d0f7a6c
13 changed files with 64 additions and 34 deletions

View File

@@ -7,8 +7,8 @@
<ProjectGuid>{A2A29280-0267-4B9B-A122-C3ECDFC3CFC7}</ProjectGuid> <ProjectGuid>{A2A29280-0267-4B9B-A122-C3ECDFC3CFC7}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AyaNova.Plugin.Dump</RootNamespace> <RootNamespace>AyaNova.PlugIn.V8</RootNamespace>
<AssemblyName>AyaNova.Plugin.Dump</AssemblyName> <AssemblyName>AyaNova.PlugIn.V8</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
@@ -16,7 +16,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\..\WinFormApp\bin\debug\plugins\Dump\</OutputPath> <OutputPath>..\..\WinFormApp\bin\debug\plugins\V8\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -36,9 +36,6 @@
<AssemblyOriginatorKeyFile>AyaNova.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>AyaNova.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\..\..\3rdprtylibs\ziplib\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json"> <Reference Include="Newtonsoft.Json">
<HintPath>..\..\..\3rdprtylibs\json.net.40\Newtonsoft.Json.dll</HintPath> <HintPath>..\..\..\3rdprtylibs\json.net.40\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
@@ -53,7 +50,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Dump.cs" /> <Compile Include="V8.cs" />
<Compile Include="ProgressForm.cs"> <Compile Include="ProgressForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -126,7 +123,7 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>"C:\data\AyaNova\utils\TimeStamp\bin\Release\TimeStamp.exe" "$(ProjectDir)Timestamp.cs" "/N:AyaNova.PlugIn.Dump"</PreBuildEvent> <PreBuildEvent>"C:\data\AyaNova\utils\TimeStamp\bin\Release\TimeStamp.exe" "$(ProjectDir)Timestamp.cs" "/N:AyaNova.PlugIn.V8"</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -1,4 +1,4 @@
namespace AyaNova.Plugin.Dump namespace AyaNova.PlugIn.V8
{ {
partial class ProgressForm partial class ProgressForm
{ {

View File

@@ -7,7 +7,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace AyaNova.Plugin.Dump namespace AyaNova.PlugIn.V8
{ {
public partial class ProgressForm : Form public partial class ProgressForm : Form
{ {

View File

@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("AyaNova.Plugin.Dump")] [assembly: AssemblyTitle("AyaNova.PlugIn.V8")]
[assembly: AssemblyDescription("Dump plugin for AyaNova")] [assembly: AssemblyDescription("V8 export plugin for AyaNova")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")] [assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")]
[assembly: AssemblyProduct("AyaNova.Plugin.Dump")] [assembly: AssemblyProduct("AyaNova.PlugIn.V8")]
[assembly: AssemblyCopyright("Copyright © 2017-2020 Ground Zero Tech-Works Inc.")] [assembly: AssemblyCopyright("Copyright © 2017-2020 Ground Zero Tech-Works Inc.")]
[assembly: AssemblyTrademark("AyaNova is a registered trademark of Ground Zero Tech-Works Inc.")] [assembly: AssemblyTrademark("AyaNova is a registered trademark of Ground Zero Tech-Works Inc.")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.6.0.0")] [assembly: AssemblyVersion("7.6.0.0")]
[assembly: AssemblyFileVersion("7.6.2.0")] [assembly: AssemblyFileVersion("7.6.3.0")]

View File

@@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace AyaNova.Plugin.Dump { namespace AyaNova.PlugIn.V8 {
using System; using System;
@@ -39,7 +39,7 @@ namespace AyaNova.Plugin.Dump {
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AyaNova.Plugin.Dump.Resource1", typeof(Resource1).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AyaNova.PlugIn.V8.Resource1", typeof(Resource1).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 701 B

View File

@@ -0,0 +1,34 @@
using System;
// The namespace can be overidden by the /N option:
// GenerateTimeStampFile file.cs /N:MyNameSpace
// Such settings will override your value here.
namespace AyaNova.PlugIn.V8
{
/// <summary>
/// Static Timestamp related data.
/// </summary>
/// <remarks>
/// THIS FILE IS CHANGED BY EXTERNAL PROGRAMS.
/// Do not modify the namespace, as it may be overwritten. You can
/// set the namespace with the /N option.
/// Do not modify the definition of BuildAt as your changes will be discarded.
/// Do not modify the definition of TimeStampedBy as your changes will be discarded.
/// </remarks>
public static class Timestamp
{
/// <summary>
/// The time stamp
/// </summary>
/// <remarks>
/// Do not modify the definition of BuildAt as your changes will be discarded.
/// </remarks>
public static DateTime BuildAt { get { return new DateTime(637235775737131241); } } //--**
/// <summary>
/// The program that time stamped it.
/// </summary>
/// <remarks>
/// Do not modify the definition of TimeStampedBy as your changes will be discarded.
/// </remarks>
public static string TimeStampedBy { get { return @"GZTW.AyaNova.BLL.TS"; } } //--**
}
}

View File

@@ -11,12 +11,11 @@ using System.IO;
using System.IO.Compression; using System.IO.Compression;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Serialization;
using ICSharpCode.SharpZipLib.Zip;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace AyaNova.Plugin.Dump namespace AyaNova.PlugIn.V8
{ {
class Dump : IAyaNovaPlugin class V8 : IAyaNovaPlugin
{ {
#region Plugin interface #region Plugin interface
@@ -26,20 +25,20 @@ namespace AyaNova.Plugin.Dump
public string PluginName public string PluginName
{ {
get { return "DBDump export database"; } get { return "Export to V8"; }
} }
public string PluginVersion public string PluginVersion
{ {
get { return "7.6 (patch 2)"; } get { return "7.6 (patch 3)"; }
} }
public string About public string About
{ {
get get
{ {
return "AyaNova DBDump plugin\r\n" + return "AyaNova V8 export plugin\r\n" +
"Built " + AyaNova.PlugIn.Dump.Timestamp.BuildAt.ToString() + "\r\n" + "Built " + AyaNova.PlugIn.V8.Timestamp.BuildAt.ToString() + "\r\n" +
"Copyright 2020 Ground Zero Tech-Works Inc."; "Copyright 2020 Ground Zero Tech-Works Inc.";
} }
} }
@@ -69,13 +68,13 @@ namespace AyaNova.Plugin.Dump
{ {
if (AyaNovaVersion.Major < 7) if (AyaNovaVersion.Major < 7)
{ {
MessageBox.Show("This DBDump plugin requires AyaNova version 7.6 or newer"); MessageBox.Show("The V8 export plugin requires AyaNova version 7.6 or newer");
return false; return false;
} }
if (AyaNovaVersion.Minor < 6) if (AyaNovaVersion.Minor < 6)
{ {
MessageBox.Show("This DBDump plugin requires AyaNova version 7.6 or newer"); MessageBox.Show("The V8 export plugin requires AyaNova version 7.6 or newer");
return false; return false;
} }
@@ -103,7 +102,7 @@ namespace AyaNova.Plugin.Dump
{ {
if (!ObjectsWeCanDealWith.Contains(objectType)) return null; if (!ObjectsWeCanDealWith.Contains(objectType)) return null;
List<AyaNovaPluginMenuItem> list = new List<AyaNovaPluginMenuItem>(); List<AyaNovaPluginMenuItem> list = new List<AyaNovaPluginMenuItem>();
list.Add(new AyaNovaPluginMenuItem("DBDump", "Dump database to export file", null, null)); list.Add(new AyaNovaPluginMenuItem("V8 Export", "Export to AyaNova 8 server", null, null));
return list; return list;
} }
@@ -128,8 +127,8 @@ namespace AyaNova.Plugin.Dump
if (!AyaBizUtils.AyaNovaConnectionSetting.SingleUserConnection) if (!AyaBizUtils.AyaNovaConnectionSetting.SingleUserConnection)
{ {
MessageBox.Show("** WARNING: before proceeding ensure no other users are logged into AyaNova to ensure the integrity of your exported data. Failing to do so could result in damaged data. ***"); MessageBox.Show("** WARNING: before proceeding ensure no other users are logged into AyaNova to ensure the integrity of your exported data. Failing to do so *will* result in damaged data. ***");
MessageBox.Show("** WARNING: before proceeding make sure your AyaNova Generator service is STOPPED to ensure the integrity of your exported data. Failing to do so could result in damaged data. ***"); MessageBox.Show("** WARNING: before proceeding make sure your AyaNova Generator service is STOPPED to ensure the integrity of your exported data. Failing to do so *will* result in damaged data. ***");
} }
//Only one command //Only one command
@@ -198,14 +197,14 @@ namespace AyaNova.Plugin.Dump
progress.Append("Zipping up archive"); //progress.Append("Zipping up archive");
FastZip fastZip = new FastZip(); //FastZip fastZip = new FastZip();
fastZip.CreateZip(zipName, tempArchiveFolder, true, null); //fastZip.CreateZip(zipName, tempArchiveFolder, true, null);
progress.Append("Cleaning up temporary folder"); //progress.Append("Cleaning up temporary folder");
Directory.Delete(tempArchiveFolder, true); //Directory.Delete(tempArchiveFolder, true);
progress.Append("Dump completed"); progress.Append("Export completed");
progress.FinishedImport(); progress.FinishedImport();
//----------------------------------- //-----------------------------------