diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 554cc07..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "Site"] - path = Site - url = ssh://git@file.tsanie.us:9022/tsanie/fleet-contractor-site.git diff --git a/ConsoleApplication1/App.config b/ConsoleApplication1/App.config index c1ce669..2047533 100644 --- a/ConsoleApplication1/App.config +++ b/ConsoleApplication1/App.config @@ -1,7 +1,7 @@ - + @@ -11,4 +11,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ConsoleApplication1/ConsoleApplication1.csproj b/ConsoleApplication1/ConsoleApplication1.csproj index b33b0ee..e8cb129 100644 --- a/ConsoleApplication1/ConsoleApplication1.csproj +++ b/ConsoleApplication1/ConsoleApplication1.csproj @@ -9,9 +9,24 @@ Properties ConsoleApplication1 ConsoleApplication1 - v4.7.1 + v4.7.2 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true AnyCPU @@ -34,6 +49,18 @@ false + + ..\Reflib\FIC\FICBLC.dll + + + ..\Reflib\FIC\FICIntf.dll + + + ..\Reflib\FIC\FICIntfAdv.dll + + + ..\Reflib\FIC\FICModels.dll + ..\Reflib\FICore.dll @@ -80,6 +107,18 @@ IronIntelContractorSiteLib + + + False + Microsoft .NET Framework 4.7.2 %28x86 和 x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 87, 17 + + \ No newline at end of file diff --git a/LanguageExtractTool/Form1.Designer.cs b/LanguageExtractTool/Form1.Designer.cs new file mode 100644 index 0000000..a34b267 --- /dev/null +++ b/LanguageExtractTool/Form1.Designer.cs @@ -0,0 +1,143 @@ +namespace LanguageExtractTool +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.txt_src = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.txt_destdir = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.fbd = new System.Windows.Forms.FolderBrowserDialog(); + this.ofd = new System.Windows.Forms.OpenFileDialog(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(63, 38); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(43, 13); + this.label1.TabIndex = 0; + this.label1.Text = "源文件"; + // + // txt_src + // + this.txt_src.Location = new System.Drawing.Point(114, 35); + this.txt_src.Name = "txt_src"; + this.txt_src.Size = new System.Drawing.Size(362, 20); + this.txt_src.TabIndex = 1; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(39, 91); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(67, 13); + this.label2.TabIndex = 2; + this.label2.Text = "目标文件夹"; + // + // txt_destdir + // + this.txt_destdir.Location = new System.Drawing.Point(113, 91); + this.txt_destdir.Name = "txt_destdir"; + this.txt_destdir.Size = new System.Drawing.Size(363, 20); + this.txt_destdir.TabIndex = 3; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(482, 33); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(116, 23); + this.button1.TabIndex = 4; + this.button1.Text = "选择源文件"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(482, 91); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(116, 23); + this.button2.TabIndex = 5; + this.button2.Text = "选择目标文件夹"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(268, 156); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 6; + this.button3.Text = "开始提取"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // ofd + // + this.ofd.Filter = "xml files|*.xml|All files|*.*"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(614, 193); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.txt_destdir); + this.Controls.Add(this.label2); + this.Controls.Add(this.txt_src); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "提取Fleet多语言文件"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txt_src; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txt_destdir; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.FolderBrowserDialog fbd; + private System.Windows.Forms.OpenFileDialog ofd; + } +} + diff --git a/LanguageExtractTool/Form1.cs b/LanguageExtractTool/Form1.cs new file mode 100644 index 0000000..cf7d13c --- /dev/null +++ b/LanguageExtractTool/Form1.cs @@ -0,0 +1,160 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml; +using System.IO; +using Newtonsoft.Json; + +namespace LanguageExtractTool +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + + //this.txt_src.Text = @"E:\IronIntel\Contractor2.0\Language\contractor_res.xml"; + //this.txt_destdir.Text = @"E:\IronIntel\Contractor2.0\Contractor\Site\Languages"; + } + + private void button1_Click(object sender, EventArgs e) + { + if (ofd.ShowDialog() == DialogResult.OK) + { + txt_src.Text = ofd.FileName; + } + } + + private void button2_Click(object sender, EventArgs e) + { + if (fbd.ShowDialog() == DialogResult.OK) + { + txt_destdir.Text = fbd.SelectedPath; + } + } + + + private void button3_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(txt_src.Text)) + { + MessageBox.Show("请选择源文件"); + return; + } + if (string.IsNullOrWhiteSpace(txt_destdir.Text)) + { + MessageBox.Show("请选择要存放资源文件的文件夹"); + return; + } + string destpath = txt_destdir.Text.Trim(); + XmlDocument doc = new XmlDocument(); + doc.Load(txt_src.Text); + Dictionary docs = GetResources(); + + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + if (string.Equals(node.Name, "Category", StringComparison.OrdinalIgnoreCase)) + { + foreach (XmlNode codenode in node.ChildNodes) + { + string code = codenode.Name; + + foreach (var d in docs) + { + string lgid = d.Key; + XmlNode node1 = codenode[lgid]; + if (node1 == null) + { + var lgids = lgid.Split('-'); + node1 = codenode[lgids[0]]; + } + if (node1 != null) + d.Value.Values[code] = node1.InnerText; + } + } + } + } + + foreach (var kv in docs) + { + string fn = Path.Combine(txt_destdir.Text.Trim(), kv.Key + ".json"); + string s = JsonConvert.SerializeObject(kv.Value); + using (FileStream fs = new FileStream(fn, FileMode.Create, FileAccess.Write)) + { + using (StreamWriter sw = new StreamWriter(fs, Encoding.UTF8)) + { + sw.Write(s); + } + } + } + + MessageBox.Show("分解完成。"); + } + + private Dictionary GetResources() + { + Dictionary docs = new Dictionary(StringComparer.OrdinalIgnoreCase); + + ResourceObject resen = new ResourceObject(); + resen.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + resen.LanguageId = "en"; + docs.Add("en", resen); + + ResourceObject resfr = new ResourceObject(); + resfr.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + resfr.LanguageId = "fr"; + docs.Add("fr", resfr); + + ResourceObject res1 = new ResourceObject(); + res1.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + res1.LanguageId = "en-us"; + docs.Add("en-us", res1); + + ResourceObject res2 = new ResourceObject(); + res2.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + res2.LanguageId = "en-ca"; + docs.Add("en-ca", res2); + + ResourceObject res3 = new ResourceObject(); + res3.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + res3.LanguageId = "en-au"; + docs.Add("en-au", res3); + + ResourceObject res4 = new ResourceObject(); + res4.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + res4.LanguageId = "en-Components"; + docs.Add("en-Components", res4); + + ResourceObject res5 = new ResourceObject(); + res5.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + res5.LanguageId = "fr-fr"; + docs.Add("fr-fr", res5); + + ResourceObject res6 = new ResourceObject(); + res6.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + res6.LanguageId = "fr-ca"; + docs.Add("fr-ca", res6); + + ResourceObject res7 = new ResourceObject(); + res7.Ver = Convert.ToInt64(DateTime.Now.ToString("yyMMddHHmm")); + res7.LanguageId = "zh-cn"; + docs.Add("zh-cn", res7); + + return docs; + } + + public class ResourceObject + { + public long Ver { get; set; } = 100; + public string LanguageId { get; set; } = "en-us"; + public Dictionary Values { get; private set; } = new Dictionary(); + } + + } +} diff --git a/LanguageExtractTool/Form1.resx b/LanguageExtractTool/Form1.resx new file mode 100644 index 0000000..1597d39 --- /dev/null +++ b/LanguageExtractTool/Form1.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 87, 17 + + \ No newline at end of file diff --git a/LanguageExtractTool/Form2.Designer.cs b/LanguageExtractTool/Form2.Designer.cs new file mode 100644 index 0000000..2874830 --- /dev/null +++ b/LanguageExtractTool/Form2.Designer.cs @@ -0,0 +1,165 @@ +namespace LanguageExtractTool +{ + partial class Form2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.ofd = new System.Windows.Forms.OpenFileDialog(); + this.btn_export = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.txt_src = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.cbx_languages = new System.Windows.Forms.ComboBox(); + this.btn_import_mobile = new System.Windows.Forms.Button(); + this.btn_export_mobile = new System.Windows.Forms.Button(); + this.btn_import = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // ofd + // + this.ofd.Filter = "xml files|*.xml|All files|*.*"; + // + // btn_export + // + this.btn_export.Location = new System.Drawing.Point(63, 133); + this.btn_export.Name = "btn_export"; + this.btn_export.Size = new System.Drawing.Size(99, 28); + this.btn_export.TabIndex = 41; + this.btn_export.Text = "导出Excel"; + this.btn_export.UseVisualStyleBackColor = true; + this.btn_export.Click += new System.EventHandler(this.btn_export_Click); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(492, 66); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(116, 23); + this.button1.TabIndex = 40; + this.button1.Text = "选择源文件"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click_1); + // + // txt_src + // + this.txt_src.Location = new System.Drawing.Point(111, 68); + this.txt_src.Name = "txt_src"; + this.txt_src.Size = new System.Drawing.Size(362, 20); + this.txt_src.TabIndex = 39; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(60, 71); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(43, 13); + this.label1.TabIndex = 38; + this.label1.Text = "源文件"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(72, 26); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(31, 13); + this.label2.TabIndex = 42; + this.label2.Text = "语言"; + // + // cbx_languages + // + this.cbx_languages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbx_languages.FormattingEnabled = true; + this.cbx_languages.Location = new System.Drawing.Point(111, 23); + this.cbx_languages.Name = "cbx_languages"; + this.cbx_languages.Size = new System.Drawing.Size(362, 21); + this.cbx_languages.TabIndex = 43; + // + // btn_import_mobile + // + this.btn_import_mobile.Location = new System.Drawing.Point(451, 133); + this.btn_import_mobile.Name = "btn_import_mobile"; + this.btn_import_mobile.Size = new System.Drawing.Size(112, 28); + this.btn_import_mobile.TabIndex = 46; + this.btn_import_mobile.Text = "导入Excel (Mobile)"; + this.btn_import_mobile.UseVisualStyleBackColor = true; + this.btn_import_mobile.Click += new System.EventHandler(this.btn_import_mobile_Click); + // + // btn_export_mobile + // + this.btn_export_mobile.Location = new System.Drawing.Point(324, 133); + this.btn_export_mobile.Name = "btn_export_mobile"; + this.btn_export_mobile.Size = new System.Drawing.Size(121, 28); + this.btn_export_mobile.TabIndex = 45; + this.btn_export_mobile.Text = "导出Excel (Mobile)"; + this.btn_export_mobile.UseVisualStyleBackColor = true; + this.btn_export_mobile.Click += new System.EventHandler(this.btn_export_mobile_Click); + // + // btn_import + // + this.btn_import.Location = new System.Drawing.Point(168, 133); + this.btn_import.Name = "btn_import"; + this.btn_import.Size = new System.Drawing.Size(84, 28); + this.btn_import.TabIndex = 44; + this.btn_import.Text = "导入Excel"; + this.btn_import.UseVisualStyleBackColor = true; + this.btn_import.Click += new System.EventHandler(this.btn_import_Click); + // + // Form2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(675, 195); + this.Controls.Add(this.btn_import_mobile); + this.Controls.Add(this.btn_export_mobile); + this.Controls.Add(this.btn_import); + this.Controls.Add(this.cbx_languages); + this.Controls.Add(this.label2); + this.Controls.Add(this.btn_export); + this.Controls.Add(this.button1); + this.Controls.Add(this.txt_src); + this.Controls.Add(this.label1); + this.Name = "Form2"; + this.Text = "多语言Excel导入导出"; + this.Load += new System.EventHandler(this.Form2_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.OpenFileDialog ofd; + private System.Windows.Forms.Button btn_export; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox txt_src; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox cbx_languages; + private System.Windows.Forms.Button btn_import_mobile; + private System.Windows.Forms.Button btn_export_mobile; + private System.Windows.Forms.Button btn_import; + } +} \ No newline at end of file diff --git a/LanguageExtractTool/Form2.cs b/LanguageExtractTool/Form2.cs new file mode 100644 index 0000000..0ed0a6a --- /dev/null +++ b/LanguageExtractTool/Form2.cs @@ -0,0 +1,536 @@ +using DocumentFormat.OpenXml; +using DocumentFormat.OpenXml.Packaging; +using DocumentFormat.OpenXml.Spreadsheet; +using IronIntel.Contractor; +using IronIntel.Contractor.ExportExcel; +using Newtonsoft.Json; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.OleDb; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml; + +namespace LanguageExtractTool +{ + public partial class Form2 : Form + { + public Form2() + { + InitializeComponent(); + } + + private void Form2_Load(object sender, EventArgs e) + { + List lan = new List(); + lan.Add(new Languages { ID = "all", Name = "ALL" }); + lan.Add(new Languages { ID = "en-us", Name = "English (United States)" }); + lan.Add(new Languages { ID = "en-ca", Name = "English (Canada)" }); + lan.Add(new Languages { ID = "en-au", Name = "English (Australia)" }); + lan.Add(new Languages { ID = "fr-fr", Name = "français (France)" }); + lan.Add(new Languages { ID = "fr-ca", Name = "français (Canada)" }); + lan.Add(new Languages { ID = "zh-cn", Name = "中文" }); + lan.Add(new Languages { ID = "es-es", Name = "Spain" }); + + this.cbx_languages.ValueMember = "ID"; + this.cbx_languages.DisplayMember = "Name"; + this.cbx_languages.DataSource = lan; + } + + private void button1_Click_1(object sender, EventArgs e) + { + if (ofd.ShowDialog() == DialogResult.OK) + { + txt_src.Text = ofd.FileName; + } + } + + private void btn_export_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(txt_src.Text)) + { + MessageBox.Show("请选择源文件"); + return; + } + + SaveFileDialog sfd = new SaveFileDialog(); + sfd.Filter = "Excel files(*.xlsx)|*.xlsx"; + sfd.FilterIndex = 1; + sfd.RestoreDirectory = true; + if (sfd.ShowDialog() == DialogResult.OK) + { + List ls = LoadLanguagesXml(); + byte[] buffer = ExportLanguages(ls); + try + { + using (FileStream fs = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write)) + { + fs.Write(buffer, 0, buffer.Length); + MessageBox.Show("导出成功"); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + } + + private void btn_import_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(txt_src.Text)) + { + MessageBox.Show("请选择源文件"); + return; + } + + OpenFileDialog sfd = new OpenFileDialog(); + sfd.Title = "Excel文件"; + sfd.FileName = ""; + sfd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + sfd.Filter = "Excel文件| *.xlsx;*.xls"; + sfd.ValidateNames = true; + sfd.CheckFileExists = true; + sfd.CheckPathExists = true; + + if (sfd.ShowDialog() == DialogResult.OK) + { + try + { + using (FileStream fs = new FileStream(sfd.FileName, FileMode.Open, FileAccess.Read)) + { + byte[] fileBuffer = new byte[fs.Length]; + fs.Read(fileBuffer, 0, Convert.ToInt32(fs.Length)); + DataTable dt = new ImportFromExcel().LoadExcelData(fileBuffer); + if (dt == null || dt.Rows.Count == 0) + return; + List ls = LoadLanguagesDataTable(dt); + + ImportExcel(ls); + MessageBox.Show("导入成功"); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + } + + + private void btn_export_mobile_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(txt_src.Text)) + { + MessageBox.Show("请选择源文件"); + return; + } + + SaveFileDialog sfd = new SaveFileDialog(); + sfd.Filter = "Excel files(*.xlsx)|*.xlsx"; + sfd.FilterIndex = 1; + sfd.RestoreDirectory = true; + if (sfd.ShowDialog() == DialogResult.OK) + { + List ls = LoadLanguagesMobileXml(); + byte[] buffer = ExportLanguages(ls); + try + { + using (FileStream fs = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write)) + { + fs.Write(buffer, 0, buffer.Length); + MessageBox.Show("导出成功"); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + } + + private void btn_import_mobile_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(txt_src.Text)) + { + MessageBox.Show("请选择源文件"); + return; + } + + OpenFileDialog sfd = new OpenFileDialog(); + sfd.Title = "Excel文件"; + sfd.FileName = ""; + sfd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + sfd.Filter = "Excel文件| *.xlsx;*.xls"; + sfd.ValidateNames = true; + sfd.CheckFileExists = true; + sfd.CheckPathExists = true; + + if (sfd.ShowDialog() == DialogResult.OK) + { + try + { + using (FileStream fs = new FileStream(sfd.FileName, FileMode.Open, FileAccess.Read)) + { + byte[] fileBuffer = new byte[fs.Length]; + fs.Read(fileBuffer, 0, Convert.ToInt32(fs.Length)); + DataTable dt = new ImportFromExcel().LoadExcelData(fileBuffer); + if (dt == null || dt.Rows.Count == 0) + return; + List ls = LoadLanguagesDataTable(dt); + + ImportExcelMobile(ls); + MessageBox.Show("导入成功"); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + } + + private List LoadLanguagesXml() + { + XmlDocument doc = new XmlDocument(); + doc.Load(txt_src.Text); + + List ls = new List(); + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + if (string.Equals(node.Name, "Category", StringComparison.OrdinalIgnoreCase)) + { + foreach (XmlNode codenode in node.ChildNodes) + { + LanguagesItem li = new LanguagesItem(); + li.ID = codenode.Name; + foreach (XmlNode node1 in codenode.ChildNodes) + { + if (string.IsNullOrWhiteSpace(node1.InnerText)) + { + continue; + } + string lgid = node1.Name; + string lgvalue = node1.InnerText; + lgvalue = lgvalue.Replace("\n", "
"); + lgvalue = Regex.Replace(lgvalue, "^ | $", ""); + + if (string.Compare(lgid, "en-us", true) == 0) + li.EnglishUS = lgvalue; + else if (string.Compare(lgid, "en-au", true) == 0) + li.EnglishAU = lgvalue; + else if (string.Compare(lgid, "en-ca", true) == 0) + li.EnglishCA = lgvalue; + else if (string.Compare(lgid, "fr-fr", true) == 0) + li.France = lgvalue; + else if (string.Compare(lgid, "fr-ca", true) == 0) + li.FranceCA = lgvalue; + else if (string.Compare(lgid, "zh-cn", true) == 0) + li.Chinese = lgvalue; + else if (string.Compare(lgid, "es-es", true) == 0) + li.Spain = lgvalue; + } + ls.Add(li); + } + } + } + return ls; + } + + private List LoadLanguagesMobileXml() + { + XmlDocument doc = new XmlDocument(); + doc.Load(txt_src.Text); + + List ls = new List(); + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + LanguagesItem li = new LanguagesItem(); + li.ID = node.Name; + foreach (XmlNode node1 in node.ChildNodes) + { + if (string.IsNullOrWhiteSpace(node1.InnerText)) + { + continue; + } + string lgid = node1.Name; + string lgvalue = node1.InnerText; + if (string.Compare(lgid, "en-us", true) == 0) + li.EnglishUS = lgvalue; + else if (string.Compare(lgid, "en-au", true) == 0) + li.EnglishAU = lgvalue; + else if (string.Compare(lgid, "en-ca", true) == 0) + li.EnglishCA = lgvalue; + else if (string.Compare(lgid, "fr-fr", true) == 0) + li.France = lgvalue; + else if (string.Compare(lgid, "fr-ca", true) == 0) + li.FranceCA = lgvalue; + else if (string.Compare(lgid, "zh-cn", true) == 0) + li.Chinese = lgvalue; + else if (string.Compare(lgid, "es-es", true) == 0) + li.Spain = lgvalue; + } + ls.Add(li); + + } + return ls; + } + + private byte[] ExportLanguages(List ls) + { + string clgid = cbx_languages.SelectedValue.ToString(); + ExportToExcel ete = new ExportToExcel(); + DataTable dt = new DataTable(); + dt.Columns.Add("ID", typeof(string)); + dt.Columns.Add("English (United States)", typeof(string)); + if (clgid == "all") + { + dt.Columns.Add("English (Canada)", typeof(string)); + dt.Columns.Add("English (Australia)", typeof(string)); + dt.Columns.Add("français (France)", typeof(string)); + dt.Columns.Add("français (Canada)", typeof(string)); + dt.Columns.Add("中文", typeof(string)); + dt.Columns.Add("Spain", typeof(string)); + } + else if (clgid == "en-ca") + dt.Columns.Add("English (Canada)", typeof(string)); + else if (clgid == "en-au") + dt.Columns.Add("English (Australia)", typeof(string)); + else if (clgid == "fr-fr") + dt.Columns.Add("français (France)", typeof(string)); + else if (clgid == "fr-ca") + dt.Columns.Add("français (Canada)", typeof(string)); + else if (clgid == "zh-cn") + dt.Columns.Add("中文", typeof(string)); + else if (clgid == "es-es") + dt.Columns.Add("Spain", typeof(string)); + foreach (var item in ls) + { + DataRow row = dt.NewRow(); + row[0] = item.ID; + row[1] = item.EnglishUS; + if (clgid == "all") + { + row[2] = item.EnglishCA; + row[3] = item.EnglishAU; + row[4] = item.France; + row[5] = item.FranceCA; + row[6] = item.Chinese; + row[7] = item.Spain; + } + else if (clgid == "en-ca") + row[2] = item.EnglishCA; + else if (clgid == "en-au") + row[2] = item.EnglishAU; + else if (clgid == "fr-fr") + row[2] = item.France; + else if (clgid == "fr-ca") + row[2] = item.FranceCA; + else if (clgid == "zh-cn") + row[2] = item.Chinese; + else if (clgid == "es-es") + row[2] = item.Spain; + + dt.Rows.Add(row); + } + + double[] widths = new double[] { 200d, 200d, 200d, 200d, 200d, 200d, 200d, 200d }; + byte[] data = ete.CreateExcel(dt, null, widths, null); + return data; + } + + private List LoadLanguagesDataTable(DataTable dt) + { + List ls = new List(); + string clgid = cbx_languages.SelectedValue.ToString(); + foreach (DataRow dr in dt.Rows) + { + LanguagesItem li = new LanguagesItem(); + li.ID = dr["ID"].ToString(); + li.EnglishUS = DataRowValue(dr, "en-us"); + if (clgid == "all") + { + li.EnglishCA = DataRowValue(dr, "en-ca"); + li.EnglishAU = DataRowValue(dr, "en-au"); + li.France = DataRowValue(dr, "fr-fr"); + li.FranceCA = DataRowValue(dr, "fr-ca"); + li.Chinese = DataRowValue(dr, "zh-cn"); + li.Spain = DataRowValue(dr, "es-es"); + } + else if (clgid == "en-ca") + li.EnglishCA = DataRowValue(dr, clgid); + else if (clgid == "en-au") + li.EnglishAU = DataRowValue(dr, clgid); + else if (clgid == "fr-fr") + li.France = DataRowValue(dr, clgid); + else if (clgid == "fr-ca") + li.FranceCA = DataRowValue(dr, clgid); + else if (clgid == "zh-cn") + li.Chinese = DataRowValue(dr, clgid); + else if (clgid == "es-es") + li.Spain = DataRowValue(dr, clgid); + + ls.Add(li); + } + return ls; + } + + private string DataRowValue(DataRow dr, string lgid) + { + string value = string.Empty; + + if (lgid == "en-ca") + value = "English (Canada)"; + else if (lgid == "en-au") + value = "English (Australia)"; + else if (lgid == "fr-fr") + value = "français (France)"; + else if (lgid == "fr-ca") + value = "français (Canada)"; + else if (lgid == "zh-cn") + value = "中文"; + else if (lgid == "es-es") + value = "Spain"; + else + value = "English (United States)"; + + string v = dr[value].ToString(); + v = Regex.Replace(v, "^|$", " "); + return v; + } + + private void ImportExcel(List ls) + { + if (ls == null || ls.Count == 0) + return; + + string clgid = cbx_languages.SelectedValue.ToString(); + XmlDocument doc = new XmlDocument(); + doc.Load(txt_src.Text); + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + if (string.Equals(node.Name, "Category", StringComparison.OrdinalIgnoreCase)) + { + foreach (XmlNode codenode in node.ChildNodes) + { + string id = codenode.Name; + LanguagesItem lan = ls.FirstOrDefault(m => m.ID == id); + if (lan == null) + continue; + + foreach (XmlNode node1 in codenode.ChildNodes) + { + string lgid = node1.Name; + string lgvalue = node1.InnerText; + if (clgid == "all") + { + string text = LanguagesText(lgid, lan); + if (!string.IsNullOrEmpty(text)) + node1.InnerText = text; + } + else + { + if (clgid == lgid) + { + string text = LanguagesText(clgid, lan); + if (!string.IsNullOrEmpty(text)) + node1.InnerText = text; + } + } + + } + } + } + } + doc.Save(txt_src.Text); + } + private void ImportExcelMobile(List ls) + { + if (ls == null || ls.Count == 0) + return; + + string clgid = cbx_languages.SelectedValue.ToString(); + XmlDocument doc = new XmlDocument(); + doc.Load(txt_src.Text); + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + string id = node.Name; + LanguagesItem lan = ls.FirstOrDefault(m => m.ID == id); + if (lan == null) + continue; + + foreach (XmlNode node1 in node.ChildNodes) + { + string lgid = node1.Name; + string lgvalue = node1.InnerText; + if (clgid == "all") + { + string text = LanguagesText(lgid, lan); + if (!string.IsNullOrEmpty(text)) + node1.InnerText = text; + } + else + { + if (clgid == lgid) + { + string text = LanguagesText(clgid, lan); + if (!string.IsNullOrEmpty(text)) + node1.InnerText = text; + } + } + } + } + doc.Save(txt_src.Text); + } + + + private string LanguagesText(string lgid, LanguagesItem lan) + { + string text = string.Empty; + if (lgid == "en-us" && !string.IsNullOrEmpty(lan.EnglishUS)) + text = lan.EnglishUS; + else if (lgid == "en-ca" && !string.IsNullOrEmpty(lan.EnglishCA)) + text = lan.EnglishCA; + else if (lgid == "en-au" && !string.IsNullOrEmpty(lan.EnglishAU)) + text = lan.EnglishAU; + else if (lgid == "fr-fr" && !string.IsNullOrEmpty(lan.France)) + text = lan.France; + else if (lgid == "fr-ca" && !string.IsNullOrEmpty(lan.FranceCA)) + text = lan.FranceCA; + else if (lgid == "zh-cn" && !string.IsNullOrEmpty(lan.Chinese)) + text = lan.Chinese; + else if (lgid == "es-es" && !string.IsNullOrEmpty(lan.Spain)) + text = lan.Spain; + + return text; + } + + } + + class Languages + { + public string ID { get; set; } + public string Name { get; set; } + } + + class LanguagesItem + { + public string ID { get; set; } + public string EnglishUS { get; set; } + public string EnglishCA { get; set; } + public string EnglishAU { get; set; } + public string France { get; set; } + public string FranceCA { get; set; } + public string Chinese { get; set; } + public string Spain { get; set; } + } +} diff --git a/LanguageExtractTool/Form2.resx b/LanguageExtractTool/Form2.resx new file mode 100644 index 0000000..6db16d1 --- /dev/null +++ b/LanguageExtractTool/Form2.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 231, 17 + + \ No newline at end of file diff --git a/LanguageExtractTool/LanguageExtractTool.csproj b/LanguageExtractTool/LanguageExtractTool.csproj new file mode 100644 index 0000000..b69384e --- /dev/null +++ b/LanguageExtractTool/LanguageExtractTool.csproj @@ -0,0 +1,126 @@ + + + + + Debug + AnyCPU + {BE465497-20E8-4C29-B98F-3AF19996F1CB} + WinExe + LanguageExtractTool + LanguageExtractTool + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Reflib\DocumentFormat.OpenXml.dll + + + False + ..\Reflib\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + Form + + + FleetInspection.cs + + + Form + + + Form1.cs + + + Form + + + Form2.cs + + + Form + + + LanguageMerge.cs + + + + + FleetInspection.cs + + + Form1.cs + + + Form2.cs + + + LanguageMerge.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + {515fb61f-f032-4a48-8f32-93b59b9d37f8} + IronIntelContractorBusiness + + + + \ No newline at end of file diff --git a/LanguageExtractTool/LanguageMerge.Designer.cs b/LanguageExtractTool/LanguageMerge.Designer.cs new file mode 100644 index 0000000..9f37a18 --- /dev/null +++ b/LanguageExtractTool/LanguageMerge.Designer.cs @@ -0,0 +1,116 @@ + +namespace LanguageExtractTool +{ + partial class LanguageMerge + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.txt_src = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); + this.ofd = new System.Windows.Forms.OpenFileDialog(); + this.button4 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(485, 45); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(116, 23); + this.button1.TabIndex = 43; + this.button1.Text = "选择源文件"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // txt_src + // + this.txt_src.Location = new System.Drawing.Point(104, 47); + this.txt_src.Name = "txt_src"; + this.txt_src.Size = new System.Drawing.Size(362, 20); + this.txt_src.TabIndex = 42; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(53, 50); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(43, 13); + this.label1.TabIndex = 41; + this.label1.Text = "源文件"; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(160, 107); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 44; + this.button3.Text = "开始合并"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // ofd + // + this.ofd.Filter = "xml files|*.xml|All files|*.*"; + // + // button4 + // + this.button4.Location = new System.Drawing.Point(356, 107); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(126, 23); + this.button4.TabIndex = 46; + this.button4.Text = "添加en-components"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // LanguageMerge + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(680, 163); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button1); + this.Controls.Add(this.txt_src); + this.Controls.Add(this.label1); + this.Name = "LanguageMerge"; + this.Text = "多语言合并"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox txt_src; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.OpenFileDialog ofd; + private System.Windows.Forms.Button button4; + } +} \ No newline at end of file diff --git a/LanguageExtractTool/LanguageMerge.cs b/LanguageExtractTool/LanguageMerge.cs new file mode 100644 index 0000000..f7c2752 --- /dev/null +++ b/LanguageExtractTool/LanguageMerge.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml; + +namespace LanguageExtractTool +{ + public partial class LanguageMerge : Form + { + public LanguageMerge() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + if (ofd.ShowDialog() == DialogResult.OK) + { + txt_src.Text = ofd.FileName; + } + } + + private void button3_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(txt_src.Text)) + { + MessageBox.Show("请选择源文件"); + return; + } + XmlDocument doc = new XmlDocument(); + doc.Load(txt_src.Text); + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + if (string.Equals(node.Name, "Category", StringComparison.OrdinalIgnoreCase)) + { + foreach (XmlNode pcode in node.ChildNodes) + { + MergeLanuageItem li = new MergeLanuageItem(); + li.PageID = new NodeValueItem() { Name = pcode.Name, Text = pcode.InnerText }; + foreach (XmlNode lancode in pcode.ChildNodes) + { + if (string.IsNullOrWhiteSpace(lancode.InnerText)) + { + continue; + } + string lgid = lancode.Name; + string lgvalue = lancode.InnerText; + + if (string.Compare(lgid, "en-us", true) == 0) + { + li.English = new NodeValueItem() { Name = "en", Text = lgvalue }; + li.EnglishUS = new NodeValueItem() { Name = lgid, Text = lgvalue }; + } + else if (string.Compare(lgid, "en-au", true) == 0) + li.EnglishAU = new NodeValueItem() { Name = lgid, Text = lgvalue }; + else if (string.Compare(lgid, "en-ca", true) == 0) + li.EnglishCA = new NodeValueItem() { Name = lgid, Text = lgvalue }; + else if (string.Compare(lgid, "fr-fr", true) == 0) + { + li.FranceNew = new NodeValueItem() { Name = "fr", Text = lgvalue }; + li.France = new NodeValueItem() { Name = lgid, Text = lgvalue }; + } + else if (string.Compare(lgid, "fr-ca", true) == 0) + li.FranceCA = new NodeValueItem() { Name = lgid, Text = lgvalue }; + else if (string.Compare(lgid, "zh-cn", true) == 0) + { + li.Chinese = new NodeValueItem() { Name = lgid, Text = lgvalue }; + } + + } + + XmlNode pagenode = doc.GetElementsByTagName(li.PageID.Name)[0]; + + XmlElement frel = doc.CreateElement("fr"); + frel.InnerText = li.FranceNew.Text; + pagenode.PrependChild(frel); + XmlElement enel = doc.CreateElement("en"); + enel.InnerText = li.English.Text; + pagenode.PrependChild(enel); + + try + { + string rst = doc.InnerXml; + var url = "../" + li.PageID.Name + "/"; + if (li.EnglishUS != null && string.Compare(li.English.Text, li.EnglishUS.Text, true) == 0) + { + var lnode = pagenode.SelectSingleNode(url + li.EnglishUS.Name); + pagenode.RemoveChild(lnode); + } + if (li.EnglishAU != null && string.Compare(li.English.Text, li.EnglishAU.Text, true) == 0) + { + var lnode = pagenode.SelectSingleNode(url + li.EnglishAU.Name); + pagenode.RemoveChild(lnode); + } + if (li.EnglishCA != null && string.Compare(li.English.Text, li.EnglishCA.Text, true) == 0) + { + var lnode = pagenode.SelectSingleNode(url + li.EnglishCA.Name); + pagenode.RemoveChild(lnode); + } + if (li.France != null) + { + var lnode = pagenode.SelectSingleNode(url + li.France.Name); + pagenode.RemoveChild(lnode); + } + if (li.FranceCA != null) + { + var lnode = pagenode.SelectSingleNode(url + li.FranceCA.Name); + pagenode.RemoveChild(lnode); + } + + } + catch (Exception ex) + { + var name = li.PageID.Name; + } + } + } + } + doc.Save(txt_src.Text); + MessageBox.Show("合并完成。"); + } + + private void button4_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(txt_src.Text)) + { + MessageBox.Show("请选择源文件"); + return; + } + XmlDocument doc = new XmlDocument(); + doc.Load(txt_src.Text); + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + if (string.Equals(node.Name, "Category", StringComparison.OrdinalIgnoreCase)) + { + foreach (XmlNode pcode in node.ChildNodes) + { + MergeLanuageItem li = new MergeLanuageItem(); + li.PageID = new NodeValueItem() { Name = pcode.Name, Text = pcode.InnerText }; + foreach (XmlNode lancode in pcode.ChildNodes) + { + if (string.IsNullOrWhiteSpace(lancode.InnerText)) + { + continue; + } + string lgid = lancode.Name; + string lgvalue = lancode.InnerText; + + //if (string.Compare(lgid, "en", true) == 0) + //{ + // li.English = new NodeValueItem() { Name = lgid, Text = lgvalue }; + //} + if (string.Compare(lgid, "en-Components", true) == 0) + { + pcode.RemoveChild(lancode); + break; + } + } + + //XmlNode pagenode = doc.GetElementsByTagName(li.PageID.Name)[0]; + + //XmlElement enel = doc.CreateElement("en-Components"); + //enel.InnerText = li.English.Text; + //pagenode.AppendChild(enel); + } + } + } + doc.Save(txt_src.Text); + MessageBox.Show("添加完成。"); + + } + } + + class MergeLanuageItem + { + public NodeValueItem PageID { get; set; } + public NodeValueItem English { get; set; } + public NodeValueItem EnglishUS { get; set; } + public NodeValueItem EnglishCA { get; set; } + public NodeValueItem EnglishAU { get; set; } + public NodeValueItem EnglishCOM { get; set; } + public NodeValueItem FranceNew { get; set; } + public NodeValueItem France { get; set; } + public NodeValueItem FranceCA { get; set; } + public NodeValueItem Chinese { get; set; } + } + + class NodeValueItem + { + public string Name { get; set; } + public string Text { get; set; } + } +} diff --git a/LanguageExtractTool/LanguageMerge.resx b/LanguageExtractTool/LanguageMerge.resx new file mode 100644 index 0000000..9b30d6c --- /dev/null +++ b/LanguageExtractTool/LanguageMerge.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/LanguageExtractTool/Program.cs b/LanguageExtractTool/Program.cs new file mode 100644 index 0000000..742eb67 --- /dev/null +++ b/LanguageExtractTool/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace LanguageExtractTool +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/LanguageExtractTool/Properties/AssemblyInfo.cs b/LanguageExtractTool/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..eaa4fe6 --- /dev/null +++ b/LanguageExtractTool/Properties/AssemblyInfo.cs @@ -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("LanguageExtractTool")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LanguageExtractTool")] +[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("be465497-20e8-4c29-b98f-3af19996f1cb")] + +// 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")] diff --git a/LanguageExtractTool/Properties/Resources.Designer.cs b/LanguageExtractTool/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ff61030 --- /dev/null +++ b/LanguageExtractTool/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace LanguageExtractTool.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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", "4.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() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("LanguageExtractTool.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/LanguageExtractTool/Properties/Resources.resx b/LanguageExtractTool/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/LanguageExtractTool/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/LanguageExtractTool/Properties/Settings.Designer.cs b/LanguageExtractTool/Properties/Settings.Designer.cs new file mode 100644 index 0000000..a83ffc2 --- /dev/null +++ b/LanguageExtractTool/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace LanguageExtractTool.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; + } + } + } +} diff --git a/LanguageExtractTool/Properties/Settings.settings b/LanguageExtractTool/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/LanguageExtractTool/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Reflib/FIASPNETCache.dll b/Reflib/FIASPNETCache.dll deleted file mode 100644 index 03557a8..0000000 Binary files a/Reflib/FIASPNETCache.dll and /dev/null differ diff --git a/Reflib/FIC/FICBLC.dll b/Reflib/FIC/FICBLC.dll index 8debfa0..65a6a57 100644 Binary files a/Reflib/FIC/FICBLC.dll and b/Reflib/FIC/FICBLC.dll differ diff --git a/Reflib/FIC/FICEmailSubscribe.dll b/Reflib/FIC/FICEmailSubscribe.dll index b6cfe4b..58ed5fd 100644 Binary files a/Reflib/FIC/FICEmailSubscribe.dll and b/Reflib/FIC/FICEmailSubscribe.dll differ diff --git a/Reflib/FIC/FICExport.dll b/Reflib/FIC/FICExport.dll index 30f9807..717d4a9 100644 Binary files a/Reflib/FIC/FICExport.dll and b/Reflib/FIC/FICExport.dll differ diff --git a/Reflib/FIC/FICIntf.dll b/Reflib/FIC/FICIntf.dll index a03cbb0..51c1643 100644 Binary files a/Reflib/FIC/FICIntf.dll and b/Reflib/FIC/FICIntf.dll differ diff --git a/Reflib/FIC/FICIntfAdv.dll b/Reflib/FIC/FICIntfAdv.dll index f39380a..a341669 100644 Binary files a/Reflib/FIC/FICIntfAdv.dll and b/Reflib/FIC/FICIntfAdv.dll differ diff --git a/Reflib/FIC/FICModels.dll b/Reflib/FIC/FICModels.dll index abf1003..74c9294 100644 Binary files a/Reflib/FIC/FICModels.dll and b/Reflib/FIC/FICModels.dll differ diff --git a/Reflib/FIC/FIChartLib.dll b/Reflib/FIC/FIChartLib.dll index d5f636e..1f39cd6 100644 Binary files a/Reflib/FIC/FIChartLib.dll and b/Reflib/FIC/FIChartLib.dll differ diff --git a/Reflib/FIC/FICore.std.dll b/Reflib/FIC/FICore.std.dll new file mode 100644 index 0000000..5465e26 Binary files /dev/null and b/Reflib/FIC/FICore.std.dll differ diff --git a/Reflib/FIC/FRPTExtIntf.dll b/Reflib/FIC/FRPTExtIntf.dll index 39cafe4..e9d0c01 100644 Binary files a/Reflib/FIC/FRPTExtIntf.dll and b/Reflib/FIC/FRPTExtIntf.dll differ diff --git a/Reflib/FICachManager.dll b/Reflib/FICachManager.dll deleted file mode 100644 index 21feea2..0000000 Binary files a/Reflib/FICachManager.dll and /dev/null differ diff --git a/Reflib/FICacheManager.Redis.dll b/Reflib/FICacheManager.Redis.dll deleted file mode 100644 index eecf81e..0000000 Binary files a/Reflib/FICacheManager.Redis.dll and /dev/null differ diff --git a/Reflib/FICore.std.dll b/Reflib/FICore.std.dll index 38526bf..77ed116 100644 Binary files a/Reflib/FICore.std.dll and b/Reflib/FICore.std.dll differ diff --git a/Reflib/FICoreDbCreator.dll b/Reflib/FICoreDbCreator.dll index d50a41b..232a6a7 100644 Binary files a/Reflib/FICoreDbCreator.dll and b/Reflib/FICoreDbCreator.dll differ diff --git a/Reflib/FleetClientBase.dll b/Reflib/FleetClientBase.dll index b22801e..a79fca3 100644 Binary files a/Reflib/FleetClientBase.dll and b/Reflib/FleetClientBase.dll differ diff --git a/Reflib/FleetServiceClient.dll b/Reflib/FleetServiceClient.dll index 778a193..6a362e9 100644 Binary files a/Reflib/FleetServiceClient.dll and b/Reflib/FleetServiceClient.dll differ diff --git a/Reflib/Foresight.Service.Client.dll b/Reflib/Foresight.Service.Client.dll new file mode 100644 index 0000000..f0d5700 Binary files /dev/null and b/Reflib/Foresight.Service.Client.dll differ diff --git a/Reflib/ForesightCredentialClient.dll b/Reflib/ForesightCredentialClient.dll new file mode 100644 index 0000000..1558aae Binary files /dev/null and b/Reflib/ForesightCredentialClient.dll differ diff --git a/Reflib/ForesightServiceMonitorClient.dll b/Reflib/ForesightServiceMonitorClient.dll new file mode 100644 index 0000000..57692bd Binary files /dev/null and b/Reflib/ForesightServiceMonitorClient.dll differ diff --git a/Reflib/ForesightServicesClient.dll b/Reflib/ForesightServicesClient.dll deleted file mode 100644 index cb4a18b..0000000 Binary files a/Reflib/ForesightServicesClient.dll and /dev/null differ diff --git a/Reflib/IronIntel.ServiceModel.Client.dll b/Reflib/IronIntel.ServiceModel.Client.dll deleted file mode 100644 index 50daa5e..0000000 Binary files a/Reflib/IronIntel.ServiceModel.Client.dll and /dev/null differ diff --git a/Reflib/IronIntel.Services.Contractor.dll b/Reflib/IronIntel.Services.Contractor.dll deleted file mode 100644 index b8ef87e..0000000 Binary files a/Reflib/IronIntel.Services.Contractor.dll and /dev/null differ diff --git a/Reflib/IronIntel.Services.CredentialObjects.dll b/Reflib/IronIntel.Services.CredentialObjects.dll deleted file mode 100644 index ffa390d..0000000 Binary files a/Reflib/IronIntel.Services.CredentialObjects.dll and /dev/null differ diff --git a/Reflib/IronIntelServiceModel.dll b/Reflib/IronIntelServiceModel.dll deleted file mode 100644 index e32bd25..0000000 Binary files a/Reflib/IronIntelServiceModel.dll and /dev/null differ diff --git a/Reflib/IronIntelSysClient.dll b/Reflib/IronIntelSysClient.dll deleted file mode 100644 index 0f8ed0a..0000000 Binary files a/Reflib/IronIntelSysClient.dll and /dev/null differ diff --git a/Reflib/StackExchange.Redis.StrongName.dll b/Reflib/StackExchange.Redis.StrongName.dll deleted file mode 100644 index c4ebd3c..0000000 Binary files a/Reflib/StackExchange.Redis.StrongName.dll and /dev/null differ diff --git a/Reflib/iisitebase.dll b/Reflib/iisitebase.dll deleted file mode 100644 index 1d6c44b..0000000 Binary files a/Reflib/iisitebase.dll and /dev/null differ diff --git a/Reflib/iisyslib.dll b/Reflib/iisyslib.dll deleted file mode 100644 index 042448a..0000000 Binary files a/Reflib/iisyslib.dll and /dev/null differ diff --git a/Reflib/ironcontractorwinlib.dll b/Reflib/ironcontractorwinlib.dll deleted file mode 100644 index e534b58..0000000 Binary files a/Reflib/ironcontractorwinlib.dll and /dev/null differ diff --git a/Reflib/irondbobjlib.dll b/Reflib/irondbobjlib.dll index 1b8ed01..b29fb37 100644 Binary files a/Reflib/irondbobjlib.dll and b/Reflib/irondbobjlib.dll differ