commit
de81dda59b
|
|
@ -0,0 +1,3 @@
|
|||
bin
|
||||
obj
|
||||
*.dll
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OrgSyncDGui
|
||||
{
|
||||
class History
|
||||
{
|
||||
public Dictionary<string,string> history;
|
||||
private string jsonFilePath;
|
||||
public History(string jsonFilePath)
|
||||
{
|
||||
this.history = new Dictionary<string, string>();
|
||||
this.jsonFilePath=jsonFilePath;
|
||||
}
|
||||
public void load()
|
||||
{
|
||||
if (!File.Exists(this.jsonFilePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (StreamReader reader = new StreamReader(this.jsonFilePath))
|
||||
{
|
||||
string jsonStr = reader.ReadToEnd();
|
||||
this.history=JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonStr);
|
||||
}
|
||||
}
|
||||
|
||||
public void save()
|
||||
{
|
||||
string jsonStr = JsonConvert.SerializeObject(this.history,Formatting.Indented);
|
||||
using (StreamWriter writer = new StreamWriter(this.jsonFilePath))
|
||||
{
|
||||
writer.Write(jsonStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
namespace OrgSyncDGui
|
||||
{
|
||||
partial class Message
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tBMsg = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tBMsg
|
||||
//
|
||||
this.tBMsg.Location = new System.Drawing.Point(24, 37);
|
||||
this.tBMsg.Multiline = true;
|
||||
this.tBMsg.Name = "tBMsg";
|
||||
this.tBMsg.ReadOnly = true;
|
||||
this.tBMsg.Size = new System.Drawing.Size(396, 544);
|
||||
this.tBMsg.TabIndex = 0;
|
||||
//
|
||||
// Message
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(453, 636);
|
||||
this.Controls.Add(this.tBMsg);
|
||||
this.Name = "Message";
|
||||
this.Text = "Message";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Message_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public System.Windows.Forms.TextBox tBMsg;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OrgSyncDGui
|
||||
{
|
||||
public partial class Message : Form
|
||||
{
|
||||
public Message()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Message_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
e.Cancel=true;
|
||||
this.Hide();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2D01F3F7-F6A0-48D9-BCA7-19F09B9D9C13}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OrgSyncDGui</RootNamespace>
|
||||
<AssemblyName>OrgSyncDGui</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>.\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="History.cs" />
|
||||
<Compile Include="Message.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Message.Designer.cs">
|
||||
<DependentUpon>Message.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Win.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Win.Designer.cs">
|
||||
<DependentUpon>Win.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Message.resx">
|
||||
<DependentUpon>Message.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Win.resx">
|
||||
<DependentUpon>Win.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OrgSyncDGui
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Win());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OrgSyncDGui")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("OrgSyncDGui")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("36d3378c-aa7f-4c63-9465-dd2ef3ca6eea")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.8689
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OrgSyncDGui.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OrgSyncDGui.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.8689
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OrgSyncDGui.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
|
|
@ -0,0 +1,260 @@
|
|||
namespace OrgSyncDGui
|
||||
{
|
||||
partial class Win
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.lBSFile = new System.Windows.Forms.Label();
|
||||
this.tBSFile = new System.Windows.Forms.TextBox();
|
||||
this.bTSFile = new System.Windows.Forms.Button();
|
||||
this.bTDFile = new System.Windows.Forms.Button();
|
||||
this.tBDFile = new System.Windows.Forms.TextBox();
|
||||
this.lBDFile = new System.Windows.Forms.Label();
|
||||
this.bTClearSFile = new System.Windows.Forms.Button();
|
||||
this.bTClearDFile = new System.Windows.Forms.Button();
|
||||
this.bTGenerateTaFile = new System.Windows.Forms.Button();
|
||||
this.bTShowMsg = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.bTTaFile = new System.Windows.Forms.Button();
|
||||
this.tBTaFile = new System.Windows.Forms.TextBox();
|
||||
this.lBTaFile = new System.Windows.Forms.Label();
|
||||
this.tBSyncMileage = new System.Windows.Forms.Button();
|
||||
this.bTSyncTowerHeight = new System.Windows.Forms.Button();
|
||||
this.bTSyncMileageAndHeight = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lBSFile
|
||||
//
|
||||
this.lBSFile.AutoSize = true;
|
||||
this.lBSFile.Location = new System.Drawing.Point(34, 31);
|
||||
this.lBSFile.Name = "lBSFile";
|
||||
this.lBSFile.Size = new System.Drawing.Size(41, 12);
|
||||
this.lBSFile.TabIndex = 0;
|
||||
this.lBSFile.Text = "S文件:";
|
||||
//
|
||||
// tBSFile
|
||||
//
|
||||
this.tBSFile.Location = new System.Drawing.Point(81, 28);
|
||||
this.tBSFile.Name = "tBSFile";
|
||||
this.tBSFile.Size = new System.Drawing.Size(440, 21);
|
||||
this.tBSFile.TabIndex = 1;
|
||||
//
|
||||
// bTSFile
|
||||
//
|
||||
this.bTSFile.Location = new System.Drawing.Point(540, 28);
|
||||
this.bTSFile.Name = "bTSFile";
|
||||
this.bTSFile.Size = new System.Drawing.Size(75, 23);
|
||||
this.bTSFile.TabIndex = 2;
|
||||
this.bTSFile.Text = "选择S文件";
|
||||
this.bTSFile.UseVisualStyleBackColor = true;
|
||||
this.bTSFile.Click += new System.EventHandler(this.bTSFile_Click);
|
||||
//
|
||||
// bTDFile
|
||||
//
|
||||
this.bTDFile.Location = new System.Drawing.Point(540, 67);
|
||||
this.bTDFile.Name = "bTDFile";
|
||||
this.bTDFile.Size = new System.Drawing.Size(75, 23);
|
||||
this.bTDFile.TabIndex = 5;
|
||||
this.bTDFile.Text = "选择D文件";
|
||||
this.bTDFile.UseVisualStyleBackColor = true;
|
||||
this.bTDFile.Click += new System.EventHandler(this.bTDFile_Click);
|
||||
//
|
||||
// tBDFile
|
||||
//
|
||||
this.tBDFile.Location = new System.Drawing.Point(81, 67);
|
||||
this.tBDFile.Name = "tBDFile";
|
||||
this.tBDFile.Size = new System.Drawing.Size(440, 21);
|
||||
this.tBDFile.TabIndex = 4;
|
||||
//
|
||||
// lBDFile
|
||||
//
|
||||
this.lBDFile.AutoSize = true;
|
||||
this.lBDFile.Location = new System.Drawing.Point(34, 70);
|
||||
this.lBDFile.Name = "lBDFile";
|
||||
this.lBDFile.Size = new System.Drawing.Size(41, 12);
|
||||
this.lBDFile.TabIndex = 3;
|
||||
this.lBDFile.Text = "D文件:";
|
||||
//
|
||||
// bTClearSFile
|
||||
//
|
||||
this.bTClearSFile.Location = new System.Drawing.Point(621, 28);
|
||||
this.bTClearSFile.Name = "bTClearSFile";
|
||||
this.bTClearSFile.Size = new System.Drawing.Size(33, 23);
|
||||
this.bTClearSFile.TabIndex = 6;
|
||||
this.bTClearSFile.Text = "C";
|
||||
this.bTClearSFile.UseVisualStyleBackColor = true;
|
||||
this.bTClearSFile.Click += new System.EventHandler(this.bTClearSFile_Click);
|
||||
//
|
||||
// bTClearDFile
|
||||
//
|
||||
this.bTClearDFile.Location = new System.Drawing.Point(621, 67);
|
||||
this.bTClearDFile.Name = "bTClearDFile";
|
||||
this.bTClearDFile.Size = new System.Drawing.Size(33, 23);
|
||||
this.bTClearDFile.TabIndex = 7;
|
||||
this.bTClearDFile.Text = "C";
|
||||
this.bTClearDFile.UseVisualStyleBackColor = true;
|
||||
this.bTClearDFile.Click += new System.EventHandler(this.bTClearDFile_Click);
|
||||
//
|
||||
// bTGenerateTaFile
|
||||
//
|
||||
this.bTGenerateTaFile.Location = new System.Drawing.Point(79, 175);
|
||||
this.bTGenerateTaFile.Name = "bTGenerateTaFile";
|
||||
this.bTGenerateTaFile.Size = new System.Drawing.Size(458, 56);
|
||||
this.bTGenerateTaFile.TabIndex = 8;
|
||||
this.bTGenerateTaFile.Text = "生成Ta文件";
|
||||
this.bTGenerateTaFile.UseVisualStyleBackColor = true;
|
||||
this.bTGenerateTaFile.Click += new System.EventHandler(this.bTGenerateTaFile_Click);
|
||||
//
|
||||
// bTShowMsg
|
||||
//
|
||||
this.bTShowMsg.Location = new System.Drawing.Point(565, 175);
|
||||
this.bTShowMsg.Name = "bTShowMsg";
|
||||
this.bTShowMsg.Size = new System.Drawing.Size(73, 56);
|
||||
this.bTShowMsg.TabIndex = 9;
|
||||
this.bTShowMsg.Text = "显示消息窗";
|
||||
this.bTShowMsg.UseVisualStyleBackColor = true;
|
||||
this.bTShowMsg.Click += new System.EventHandler(this.bTShowMsg_Click);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(621, 110);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(33, 23);
|
||||
this.button1.TabIndex = 13;
|
||||
this.button1.Text = "C";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// bTTaFile
|
||||
//
|
||||
this.bTTaFile.Location = new System.Drawing.Point(540, 110);
|
||||
this.bTTaFile.Name = "bTTaFile";
|
||||
this.bTTaFile.Size = new System.Drawing.Size(75, 23);
|
||||
this.bTTaFile.TabIndex = 12;
|
||||
this.bTTaFile.Text = "选择TA文件";
|
||||
this.bTTaFile.UseVisualStyleBackColor = true;
|
||||
this.bTTaFile.Click += new System.EventHandler(this.bTTaFile_Click);
|
||||
//
|
||||
// tBTaFile
|
||||
//
|
||||
this.tBTaFile.Location = new System.Drawing.Point(81, 110);
|
||||
this.tBTaFile.Name = "tBTaFile";
|
||||
this.tBTaFile.Size = new System.Drawing.Size(440, 21);
|
||||
this.tBTaFile.TabIndex = 11;
|
||||
//
|
||||
// lBTaFile
|
||||
//
|
||||
this.lBTaFile.AutoSize = true;
|
||||
this.lBTaFile.Location = new System.Drawing.Point(34, 113);
|
||||
this.lBTaFile.Name = "lBTaFile";
|
||||
this.lBTaFile.Size = new System.Drawing.Size(47, 12);
|
||||
this.lBTaFile.TabIndex = 10;
|
||||
this.lBTaFile.Text = "TA文件:";
|
||||
//
|
||||
// tBSyncMileage
|
||||
//
|
||||
this.tBSyncMileage.Location = new System.Drawing.Point(81, 255);
|
||||
this.tBSyncMileage.Name = "tBSyncMileage";
|
||||
this.tBSyncMileage.Size = new System.Drawing.Size(458, 56);
|
||||
this.tBSyncMileage.TabIndex = 14;
|
||||
this.tBSyncMileage.Text = "同步里程";
|
||||
this.tBSyncMileage.UseVisualStyleBackColor = true;
|
||||
this.tBSyncMileage.Click += new System.EventHandler(this.bTSyncronizeMileageToS_Click);
|
||||
//
|
||||
// bTSyncTowerHeight
|
||||
//
|
||||
this.bTSyncTowerHeight.Location = new System.Drawing.Point(81, 337);
|
||||
this.bTSyncTowerHeight.Name = "bTSyncTowerHeight";
|
||||
this.bTSyncTowerHeight.Size = new System.Drawing.Size(458, 56);
|
||||
this.bTSyncTowerHeight.TabIndex = 15;
|
||||
this.bTSyncTowerHeight.Text = "同步塔高";
|
||||
this.bTSyncTowerHeight.UseVisualStyleBackColor = true;
|
||||
this.bTSyncTowerHeight.Click += new System.EventHandler(this.bTSyncTowerHeight_Click);
|
||||
//
|
||||
// bTSyncMileageAndHeight
|
||||
//
|
||||
this.bTSyncMileageAndHeight.Location = new System.Drawing.Point(545, 255);
|
||||
this.bTSyncMileageAndHeight.Name = "bTSyncMileageAndHeight";
|
||||
this.bTSyncMileageAndHeight.Size = new System.Drawing.Size(70, 138);
|
||||
this.bTSyncMileageAndHeight.TabIndex = 16;
|
||||
this.bTSyncMileageAndHeight.Text = "同步塔型和呼高";
|
||||
this.bTSyncMileageAndHeight.UseVisualStyleBackColor = true;
|
||||
this.bTSyncMileageAndHeight.Click += new System.EventHandler(this.bTSyncMileageAndHeight_Click);
|
||||
//
|
||||
// Win
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(673, 429);
|
||||
this.Controls.Add(this.bTSyncMileageAndHeight);
|
||||
this.Controls.Add(this.bTSyncTowerHeight);
|
||||
this.Controls.Add(this.tBSyncMileage);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.bTTaFile);
|
||||
this.Controls.Add(this.tBTaFile);
|
||||
this.Controls.Add(this.lBTaFile);
|
||||
this.Controls.Add(this.bTShowMsg);
|
||||
this.Controls.Add(this.bTGenerateTaFile);
|
||||
this.Controls.Add(this.bTClearDFile);
|
||||
this.Controls.Add(this.bTClearSFile);
|
||||
this.Controls.Add(this.bTDFile);
|
||||
this.Controls.Add(this.tBDFile);
|
||||
this.Controls.Add(this.lBDFile);
|
||||
this.Controls.Add(this.bTSFile);
|
||||
this.Controls.Add(this.tBSFile);
|
||||
this.Controls.Add(this.lBSFile);
|
||||
this.Name = "Win";
|
||||
this.Text = "DH协同排位";
|
||||
this.Load += new System.EventHandler(this.Win_Load);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Win_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lBSFile;
|
||||
private System.Windows.Forms.TextBox tBSFile;
|
||||
private System.Windows.Forms.Button bTSFile;
|
||||
private System.Windows.Forms.Button bTDFile;
|
||||
private System.Windows.Forms.TextBox tBDFile;
|
||||
private System.Windows.Forms.Label lBDFile;
|
||||
private System.Windows.Forms.Button bTClearSFile;
|
||||
private System.Windows.Forms.Button bTClearDFile;
|
||||
private System.Windows.Forms.Button bTGenerateTaFile;
|
||||
private System.Windows.Forms.Button bTShowMsg;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button bTTaFile;
|
||||
private System.Windows.Forms.TextBox tBTaFile;
|
||||
private System.Windows.Forms.Label lBTaFile;
|
||||
private System.Windows.Forms.Button tBSyncMileage;
|
||||
private System.Windows.Forms.Button bTSyncTowerHeight;
|
||||
private System.Windows.Forms.Button bTSyncMileageAndHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace OrgSyncDGui
|
||||
{
|
||||
public partial class Win : Form
|
||||
{
|
||||
private Message win_msg;
|
||||
private History history;
|
||||
public Win()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.win_msg = new Message();
|
||||
|
||||
}
|
||||
|
||||
private void bTSFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Multiselect = true;
|
||||
dialog.Filter = "S files (*.dat)|*.dat";
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.tBSFile.Text = String.Join(",", dialog.FileNames);
|
||||
}
|
||||
}
|
||||
|
||||
private void bTDFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Multiselect = true;
|
||||
dialog.Filter = "D files (*.txt)|*.txt";
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.tBDFile.Text = String.Join(",", dialog.FileNames);
|
||||
}
|
||||
}
|
||||
|
||||
private void bTClearSFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.tBSFile.Text = "";
|
||||
}
|
||||
|
||||
private void bTClearDFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.tBDFile.Text = "";
|
||||
}
|
||||
|
||||
private void bTGenerateTaFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog dialog = new SaveFileDialog();
|
||||
dialog.Filter = "道亨TA files (*.TA)|*.TA";
|
||||
String ta_file="";
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ta_file=dialog.FileName;
|
||||
string cmd = String.Format("{0} generate-ta-file --s_files {1} --d_files {2} --ta_file {3}", @"d:\code\OrgSyncD\cli.py", this.tBSFile.Text, this.tBDFile.Text, ta_file);
|
||||
execute_cmd(cmd);
|
||||
this.tBTaFile.Text = ta_file;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void bTSyncronizeMileageToS_Click(object sender, EventArgs e)
|
||||
{
|
||||
string ta_file = this.tBTaFile.Text;
|
||||
string cmd = String.Format("{0} sync-all-tower-mileage-to-s --s_files {1} --ta_file {2}", @"d:\code\OrgSyncD\cli.py", this.tBSFile.Text,ta_file);
|
||||
execute_cmd(cmd);
|
||||
}
|
||||
|
||||
private void execute_cmd(string cmd)
|
||||
{
|
||||
System.Diagnostics.Process exep = new System.Diagnostics.Process();
|
||||
exep.StartInfo.FileName =@"c:\Python38\python.exe";
|
||||
exep.StartInfo.Arguments = cmd;
|
||||
exep.StartInfo.CreateNoWindow = true;
|
||||
exep.StartInfo.UseShellExecute = false;
|
||||
exep.StartInfo.RedirectStandardOutput = true;
|
||||
exep.StartInfo.RedirectStandardError = true;
|
||||
exep.Start();
|
||||
exep.WaitForExit();//关键,等待外部程序退出后才能往下执行
|
||||
StreamReader reader;
|
||||
reader = exep.StandardOutput;
|
||||
send_msg(reader.ReadToEnd());
|
||||
send_msg(exep.StandardError.ReadToEnd());
|
||||
}
|
||||
|
||||
|
||||
private void send_msg(string msg)
|
||||
{
|
||||
this.win_msg.Show();
|
||||
this.win_msg.tBMsg.Text=String.Format("{0}\n{1}",this.win_msg.tBMsg.Text,msg);
|
||||
}
|
||||
|
||||
private void bTShowMsg_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.win_msg.Show();
|
||||
}
|
||||
|
||||
private void bTTaFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Multiselect = true;
|
||||
dialog.Filter = "TA files (*.TA)|*.TA";
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.tBTaFile.Text = String.Join(",", dialog.FileNames);
|
||||
}
|
||||
}
|
||||
|
||||
private void bTSyncTowerHeight_Click(object sender, EventArgs e)
|
||||
{
|
||||
string ta_file = this.tBTaFile.Text;
|
||||
string cmd = String.Format("{0} sync-all-tower-height-from-ta-to-s --s_files {1} --ta_file {2}", @"d:\code\OrgSyncD\cli.py", this.tBSFile.Text, ta_file);
|
||||
execute_cmd(cmd);
|
||||
}
|
||||
|
||||
private void Win_Load(object sender, EventArgs e)
|
||||
{
|
||||
//加载历史记录
|
||||
var process = Process.GetCurrentProcess();
|
||||
string fullPath = process.MainModule.FileName;
|
||||
string jsonFilePath=String.Format(@"{0}\history.json",Directory.GetParent(fullPath).ToString());
|
||||
this.history = new History(jsonFilePath);
|
||||
this.history.load();
|
||||
if (this.history.history.ContainsKey("DFiles"))
|
||||
{
|
||||
this.tBDFile.Text = this.history.history["DFiles"];
|
||||
}
|
||||
if (this.history.history.ContainsKey("SFiles"))
|
||||
{
|
||||
this.tBSFile.Text = this.history.history["SFiles"];
|
||||
}
|
||||
if (this.history.history.ContainsKey("TaFile"))
|
||||
{
|
||||
this.tBTaFile.Text = this.history.history["TaFile"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Win_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.history.history["DFiles"]=this.tBDFile.Text;
|
||||
this.history.history["SFiles"]=this.tBSFile.Text;
|
||||
this.history.history["TaFile"]=this.tBTaFile.Text;
|
||||
this.history.save();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.tBTaFile.Text = "";
|
||||
}
|
||||
|
||||
private void bTSyncMileageAndHeight_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.bTSyncTowerHeight_Click(null, null);
|
||||
bTSyncronizeMileageToS_Click(null, null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Loading…
Reference in New Issue