Compare commits
15 Commits
Author | SHA1 | Date |
---|---|---|
Chenx221 | 961031cb9f | |
Chenx221 | 195667f1a0 | |
Chenx221 | 667df0f891 | |
Chenx221 | 971a9a4e46 | |
Chenx221 | 5f81407694 | |
Chenx221 | 156da8786d | |
Chenx221 | d8dd0e9f66 | |
Chenx221 | 2104fdb434 | |
Chenx221 | 6a3afcad98 | |
Chenx221 | c7cd4794c5 | |
Chenx221 | 8a1f2b5a7b | |
Chenx221 | e9c6a26f39 | |
Chenx221 | aebdc68bce | |
Chenx221 | 859b2839a4 | |
Chenx221 | 48dbbd8033 |
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsmrManage", "AsmrManage\AsmrManage.csproj", "{7D569CE3-1810-4036-B166-2723176A65F0}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AsmrManage", "AsmrManage\AsmrManage.csproj", "{7D569CE3-1810-4036-B166-2723176A65F0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,34 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace AsmrManage
|
||||
{
|
||||
public class AppConfig //应用配置
|
||||
{
|
||||
public string DatabaseFilePath { get; set; } = string.Empty; //asmr.db 位置
|
||||
public string DBBrowserPath { get; set; } = string.Empty; //DBBrowser 位置
|
||||
public int Version { get; set; } = int.MaxValue; //配置版本信息
|
||||
}
|
||||
public static class ConfigManager
|
||||
{
|
||||
public static void SaveConfig(AppConfig config) //SAVE
|
||||
{
|
||||
config.Version = 1;// v1
|
||||
string configFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config.json");
|
||||
File.WriteAllText(configFilePath, JsonConvert.SerializeObject(config));
|
||||
}
|
||||
|
||||
public static AppConfig LoadConfig() //LOAD
|
||||
{
|
||||
string configFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config.json");
|
||||
|
||||
if (File.Exists(configFilePath))
|
||||
{
|
||||
string json = File.ReadAllText(configFilePath);
|
||||
return JsonConvert.DeserializeObject<AppConfig>(json) ?? new AppConfig();
|
||||
}
|
||||
|
||||
return new AppConfig();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsmrManage
|
||||
{
|
||||
public class AsmrData //存放比较数据
|
||||
{
|
||||
public string file_rj_str { get; set; } = string.Empty;
|
||||
public string file_d_str { get; set; } = string.Empty;
|
||||
public string file_vj_str { get; set; } = string.Empty;
|
||||
public string file_nonhrj_str { get; set; } = string.Empty;
|
||||
public string db_rj_str { get; set; } = string.Empty;
|
||||
public string db_d_str { get; set; } = string.Empty;
|
||||
public string db_vj_str { get; set; } = string.Empty;
|
||||
public string db_nonhrj_str { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
}
|
|
@ -6,12 +6,24 @@
|
|||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||
<StartupObject>AsmrManage.Program</StartupObject>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
<SignAssembly>False</SignAssembly>
|
||||
<Version>1.0.0</Version>
|
||||
<Authors>Chenx221</Authors>
|
||||
<AssemblyVersion>1.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DiffPlex" Version="1.7.1" />
|
||||
<PackageReference Include="EPPlus" Version="6.2.10" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.Data.SQLite" Version="1.0.118" />
|
||||
<PackageReference Include="System.IO" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
@ -31,4 +43,13 @@
|
|||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="7za.exe">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="x64\7za.exe">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -28,8 +28,25 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
tabControl1 = new TabControl();
|
||||
tabPage1 = new TabPage();
|
||||
label12 = new Label();
|
||||
label11 = new Label();
|
||||
label10 = new Label();
|
||||
comboBox1 = new ComboBox();
|
||||
button14 = new Button();
|
||||
button13 = new Button();
|
||||
button12 = new Button();
|
||||
textBox6 = new TextBox();
|
||||
label9 = new Label();
|
||||
groupBox5 = new GroupBox();
|
||||
checkBox8 = new CheckBox();
|
||||
checkBox7 = new CheckBox();
|
||||
checkBox6 = new CheckBox();
|
||||
checkBox5 = new CheckBox();
|
||||
groupBox3 = new GroupBox();
|
||||
richTextBox1 = new RichTextBox();
|
||||
tabPage2 = new TabPage();
|
||||
groupBox2 = new GroupBox();
|
||||
logBox1 = new RichTextBox();
|
||||
|
@ -48,13 +65,66 @@
|
|||
textBox1 = new TextBox();
|
||||
button1 = new Button();
|
||||
tabPage3 = new TabPage();
|
||||
groupBox7 = new GroupBox();
|
||||
button18 = new Button();
|
||||
checkBox11 = new CheckBox();
|
||||
checkBox12 = new CheckBox();
|
||||
checkBox9 = new CheckBox();
|
||||
checkBox10 = new CheckBox();
|
||||
groupBox6 = new GroupBox();
|
||||
splitContainer1 = new SplitContainer();
|
||||
label30 = new Label();
|
||||
label21 = new Label();
|
||||
label20 = new Label();
|
||||
label19 = new Label();
|
||||
label18 = new Label();
|
||||
label17 = new Label();
|
||||
label14 = new Label();
|
||||
label16 = new Label();
|
||||
label15 = new Label();
|
||||
label31 = new Label();
|
||||
label29 = new Label();
|
||||
label28 = new Label();
|
||||
label27 = new Label();
|
||||
label26 = new Label();
|
||||
label25 = new Label();
|
||||
label24 = new Label();
|
||||
label23 = new Label();
|
||||
label22 = new Label();
|
||||
button17 = new Button();
|
||||
textBox7 = new TextBox();
|
||||
label13 = new Label();
|
||||
button16 = new Button();
|
||||
button15 = new Button();
|
||||
richTextBox2 = new RichTextBox();
|
||||
tabPage4 = new TabPage();
|
||||
button9 = new Button();
|
||||
button8 = new Button();
|
||||
button7 = new Button();
|
||||
button6 = new Button();
|
||||
button5 = new Button();
|
||||
textBox5 = new TextBox();
|
||||
label6 = new Label();
|
||||
button4 = new Button();
|
||||
textBox4 = new TextBox();
|
||||
label5 = new Label();
|
||||
tabPage5 = new TabPage();
|
||||
label1 = new Label();
|
||||
tabControl1.SuspendLayout();
|
||||
tabPage1.SuspendLayout();
|
||||
groupBox5.SuspendLayout();
|
||||
groupBox3.SuspendLayout();
|
||||
tabPage2.SuspendLayout();
|
||||
groupBox2.SuspendLayout();
|
||||
groupBox1.SuspendLayout();
|
||||
tabPage3.SuspendLayout();
|
||||
groupBox7.SuspendLayout();
|
||||
groupBox6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit();
|
||||
splitContainer1.Panel1.SuspendLayout();
|
||||
splitContainer1.Panel2.SuspendLayout();
|
||||
splitContainer1.SuspendLayout();
|
||||
tabPage4.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// tabControl1
|
||||
|
@ -69,17 +139,191 @@
|
|||
tabControl1.SelectedIndex = 0;
|
||||
tabControl1.Size = new Size(536, 424);
|
||||
tabControl1.TabIndex = 0;
|
||||
tabControl1.SelectedIndexChanged += TabControl1_SelectedIndexChanged;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
tabPage1.Controls.Add(label12);
|
||||
tabPage1.Controls.Add(label11);
|
||||
tabPage1.Controls.Add(label10);
|
||||
tabPage1.Controls.Add(comboBox1);
|
||||
tabPage1.Controls.Add(button14);
|
||||
tabPage1.Controls.Add(button13);
|
||||
tabPage1.Controls.Add(button12);
|
||||
tabPage1.Controls.Add(textBox6);
|
||||
tabPage1.Controls.Add(label9);
|
||||
tabPage1.Controls.Add(groupBox5);
|
||||
tabPage1.Controls.Add(groupBox3);
|
||||
tabPage1.Location = new Point(4, 24);
|
||||
tabPage1.Name = "tabPage1";
|
||||
tabPage1.Padding = new Padding(3);
|
||||
tabPage1.Size = new Size(528, 396);
|
||||
tabPage1.TabIndex = 0;
|
||||
tabPage1.Text = "查询&修改";
|
||||
tabPage1.Text = "查询&添加";
|
||||
tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
label12.AutoSize = true;
|
||||
label12.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label12.Location = new Point(81, 185);
|
||||
label12.Name = "label12";
|
||||
label12.Size = new Size(61, 21);
|
||||
label12.TabIndex = 15;
|
||||
label12.Text = "label12";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
label11.AutoSize = true;
|
||||
label11.Location = new Point(36, 160);
|
||||
label11.Name = "label11";
|
||||
label11.Size = new Size(36, 15);
|
||||
label11.TabIndex = 14;
|
||||
label11.Text = "结果:";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
label10.AutoSize = true;
|
||||
label10.Location = new Point(21, 78);
|
||||
label10.Name = "label10";
|
||||
label10.Size = new Size(33, 15);
|
||||
label10.TabIndex = 13;
|
||||
label10.Text = "类别";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBox1.FormattingEnabled = true;
|
||||
comboBox1.Items.AddRange(new object[] { "Auto", "H_RJ", "H_D", "H_VJ", "NonH_RJ" });
|
||||
comboBox1.Location = new Point(21, 96);
|
||||
comboBox1.Name = "comboBox1";
|
||||
comboBox1.Size = new Size(121, 23);
|
||||
comboBox1.TabIndex = 12;
|
||||
//
|
||||
// button14
|
||||
//
|
||||
button14.Location = new Point(308, 48);
|
||||
button14.Name = "button14";
|
||||
button14.Size = new Size(23, 23);
|
||||
button14.TabIndex = 10;
|
||||
button14.Text = "X";
|
||||
button14.TextAlign = ContentAlignment.MiddleRight;
|
||||
button14.UseVisualStyleBackColor = true;
|
||||
button14.Click += button14_Click;
|
||||
//
|
||||
// button13
|
||||
//
|
||||
button13.Enabled = false;
|
||||
button13.Location = new Point(345, 94);
|
||||
button13.Name = "button13";
|
||||
button13.Size = new Size(157, 32);
|
||||
button13.TabIndex = 9;
|
||||
button13.Text = "添加";
|
||||
button13.UseVisualStyleBackColor = true;
|
||||
button13.Click += button13_Click;
|
||||
//
|
||||
// button12
|
||||
//
|
||||
button12.Location = new Point(345, 18);
|
||||
button12.Name = "button12";
|
||||
button12.Size = new Size(157, 70);
|
||||
button12.TabIndex = 8;
|
||||
button12.Text = "查找";
|
||||
button12.UseVisualStyleBackColor = true;
|
||||
button12.Click += button12_Click;
|
||||
//
|
||||
// textBox6
|
||||
//
|
||||
textBox6.Location = new Point(21, 48);
|
||||
textBox6.Name = "textBox6";
|
||||
textBox6.Size = new Size(281, 23);
|
||||
textBox6.TabIndex = 7;
|
||||
textBox6.TextChanged += textBox6_TextChanged;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.AutoSize = true;
|
||||
label9.Location = new Point(21, 30);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new Size(77, 15);
|
||||
label9.TabIndex = 6;
|
||||
label9.Text = "待查找/添加";
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
groupBox5.Controls.Add(checkBox8);
|
||||
groupBox5.Controls.Add(checkBox7);
|
||||
groupBox5.Controls.Add(checkBox6);
|
||||
groupBox5.Controls.Add(checkBox5);
|
||||
groupBox5.Location = new Point(322, 138);
|
||||
groupBox5.Name = "groupBox5";
|
||||
groupBox5.Size = new Size(200, 119);
|
||||
groupBox5.TabIndex = 5;
|
||||
groupBox5.TabStop = false;
|
||||
groupBox5.Text = "选项";
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
checkBox8.AutoSize = true;
|
||||
checkBox8.Location = new Point(6, 97);
|
||||
checkBox8.Name = "checkBox8";
|
||||
checkBox8.Size = new Size(117, 19);
|
||||
checkBox8.TabIndex = 3;
|
||||
checkBox8.Text = "自动备份数据库";
|
||||
checkBox8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
checkBox7.AutoSize = true;
|
||||
checkBox7.Enabled = false;
|
||||
checkBox7.Location = new Point(6, 72);
|
||||
checkBox7.Name = "checkBox7";
|
||||
checkBox7.Size = new Size(168, 19);
|
||||
checkBox7.TabIndex = 2;
|
||||
checkBox7.Text = "自动判断类别(Auto)(仅H)";
|
||||
checkBox7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
checkBox6.AutoSize = true;
|
||||
checkBox6.Location = new Point(6, 47);
|
||||
checkBox6.Name = "checkBox6";
|
||||
checkBox6.Size = new Size(174, 19);
|
||||
checkBox6.TabIndex = 1;
|
||||
checkBox6.Text = "添加后清空待查找/添加框";
|
||||
checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
checkBox5.AutoSize = true;
|
||||
checkBox5.Location = new Point(6, 22);
|
||||
checkBox5.Name = "checkBox5";
|
||||
checkBox5.Size = new Size(156, 19);
|
||||
checkBox5.TabIndex = 0;
|
||||
checkBox5.Text = "查找后自动添加缺少项";
|
||||
checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
groupBox3.Controls.Add(richTextBox1);
|
||||
groupBox3.Location = new Point(0, 256);
|
||||
groupBox3.Name = "groupBox3";
|
||||
groupBox3.Size = new Size(528, 140);
|
||||
groupBox3.TabIndex = 0;
|
||||
groupBox3.TabStop = false;
|
||||
groupBox3.Text = "Log";
|
||||
//
|
||||
// richTextBox1
|
||||
//
|
||||
richTextBox1.BackColor = Color.FromArgb(224, 224, 224);
|
||||
richTextBox1.BorderStyle = BorderStyle.None;
|
||||
richTextBox1.Location = new Point(6, 19);
|
||||
richTextBox1.Name = "richTextBox1";
|
||||
richTextBox1.ReadOnly = true;
|
||||
richTextBox1.Size = new Size(516, 112);
|
||||
richTextBox1.TabIndex = 0;
|
||||
richTextBox1.Text = "";
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
tabPage2.Controls.Add(groupBox2);
|
||||
|
@ -264,6 +508,14 @@
|
|||
//
|
||||
// tabPage3
|
||||
//
|
||||
tabPage3.Controls.Add(groupBox7);
|
||||
tabPage3.Controls.Add(groupBox6);
|
||||
tabPage3.Controls.Add(button17);
|
||||
tabPage3.Controls.Add(textBox7);
|
||||
tabPage3.Controls.Add(label13);
|
||||
tabPage3.Controls.Add(button16);
|
||||
tabPage3.Controls.Add(button15);
|
||||
tabPage3.Controls.Add(richTextBox2);
|
||||
tabPage3.Location = new Point(4, 24);
|
||||
tabPage3.Name = "tabPage3";
|
||||
tabPage3.Padding = new Padding(3);
|
||||
|
@ -272,16 +524,456 @@
|
|||
tabPage3.Text = "数据核验";
|
||||
tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox7
|
||||
//
|
||||
groupBox7.Controls.Add(button18);
|
||||
groupBox7.Controls.Add(checkBox11);
|
||||
groupBox7.Controls.Add(checkBox12);
|
||||
groupBox7.Controls.Add(checkBox9);
|
||||
groupBox7.Controls.Add(checkBox10);
|
||||
groupBox7.Location = new Point(6, 197);
|
||||
groupBox7.Name = "groupBox7";
|
||||
groupBox7.Size = new Size(516, 64);
|
||||
groupBox7.TabIndex = 11;
|
||||
groupBox7.TabStop = false;
|
||||
groupBox7.Text = "比较";
|
||||
//
|
||||
// button18
|
||||
//
|
||||
button18.Location = new Point(432, 18);
|
||||
button18.Name = "button18";
|
||||
button18.Size = new Size(75, 40);
|
||||
button18.TabIndex = 11;
|
||||
button18.Text = "获取差异";
|
||||
button18.UseVisualStyleBackColor = true;
|
||||
button18.Click += button18_Click;
|
||||
//
|
||||
// checkBox11
|
||||
//
|
||||
checkBox11.AutoSize = true;
|
||||
checkBox11.Location = new Point(218, 30);
|
||||
checkBox11.Name = "checkBox11";
|
||||
checkBox11.Size = new Size(51, 19);
|
||||
checkBox11.TabIndex = 9;
|
||||
checkBox11.Text = "H_VJ";
|
||||
checkBox11.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox12
|
||||
//
|
||||
checkBox12.AutoSize = true;
|
||||
checkBox12.Location = new Point(318, 30);
|
||||
checkBox12.Name = "checkBox12";
|
||||
checkBox12.Size = new Size(74, 19);
|
||||
checkBox12.TabIndex = 10;
|
||||
checkBox12.Text = "NonH_RJ";
|
||||
checkBox12.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
checkBox9.AutoSize = true;
|
||||
checkBox9.Location = new Point(17, 30);
|
||||
checkBox9.Name = "checkBox9";
|
||||
checkBox9.Size = new Size(51, 19);
|
||||
checkBox9.TabIndex = 7;
|
||||
checkBox9.Text = "H_RJ";
|
||||
checkBox9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox10
|
||||
//
|
||||
checkBox10.AutoSize = true;
|
||||
checkBox10.Location = new Point(117, 30);
|
||||
checkBox10.Name = "checkBox10";
|
||||
checkBox10.Size = new Size(48, 19);
|
||||
checkBox10.TabIndex = 8;
|
||||
checkBox10.Text = "H_D";
|
||||
checkBox10.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
groupBox6.Controls.Add(splitContainer1);
|
||||
groupBox6.Location = new Point(6, 39);
|
||||
groupBox6.Name = "groupBox6";
|
||||
groupBox6.Size = new Size(516, 152);
|
||||
groupBox6.TabIndex = 6;
|
||||
groupBox6.TabStop = false;
|
||||
groupBox6.Text = "状态";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
splitContainer1.Location = new Point(6, 22);
|
||||
splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
splitContainer1.Panel1.Controls.Add(label30);
|
||||
splitContainer1.Panel1.Controls.Add(label21);
|
||||
splitContainer1.Panel1.Controls.Add(label20);
|
||||
splitContainer1.Panel1.Controls.Add(label19);
|
||||
splitContainer1.Panel1.Controls.Add(label18);
|
||||
splitContainer1.Panel1.Controls.Add(label17);
|
||||
splitContainer1.Panel1.Controls.Add(label14);
|
||||
splitContainer1.Panel1.Controls.Add(label16);
|
||||
splitContainer1.Panel1.Controls.Add(label15);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
splitContainer1.Panel2.Controls.Add(label31);
|
||||
splitContainer1.Panel2.Controls.Add(label29);
|
||||
splitContainer1.Panel2.Controls.Add(label28);
|
||||
splitContainer1.Panel2.Controls.Add(label27);
|
||||
splitContainer1.Panel2.Controls.Add(label26);
|
||||
splitContainer1.Panel2.Controls.Add(label25);
|
||||
splitContainer1.Panel2.Controls.Add(label24);
|
||||
splitContainer1.Panel2.Controls.Add(label23);
|
||||
splitContainer1.Panel2.Controls.Add(label22);
|
||||
splitContainer1.Size = new Size(504, 124);
|
||||
splitContainer1.SplitterDistance = 241;
|
||||
splitContainer1.TabIndex = 4;
|
||||
//
|
||||
// label30
|
||||
//
|
||||
label30.AutoSize = true;
|
||||
label30.Location = new Point(101, 0);
|
||||
label30.Name = "label30";
|
||||
label30.Size = new Size(33, 15);
|
||||
label30.TabIndex = 8;
|
||||
label30.Text = "本地";
|
||||
//
|
||||
// label21
|
||||
//
|
||||
label21.AutoSize = true;
|
||||
label21.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label21.Location = new Point(170, 88);
|
||||
label21.Name = "label21";
|
||||
label21.Size = new Size(61, 21);
|
||||
label21.TabIndex = 7;
|
||||
label21.Text = "label21";
|
||||
//
|
||||
// label20
|
||||
//
|
||||
label20.AutoSize = true;
|
||||
label20.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label20.Location = new Point(170, 67);
|
||||
label20.Name = "label20";
|
||||
label20.Size = new Size(61, 21);
|
||||
label20.TabIndex = 6;
|
||||
label20.Text = "label20";
|
||||
//
|
||||
// label19
|
||||
//
|
||||
label19.AutoSize = true;
|
||||
label19.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label19.Location = new Point(170, 46);
|
||||
label19.Name = "label19";
|
||||
label19.Size = new Size(61, 21);
|
||||
label19.TabIndex = 5;
|
||||
label19.Text = "label19";
|
||||
//
|
||||
// label18
|
||||
//
|
||||
label18.AutoSize = true;
|
||||
label18.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label18.Location = new Point(170, 25);
|
||||
label18.Name = "label18";
|
||||
label18.Size = new Size(61, 21);
|
||||
label18.TabIndex = 4;
|
||||
label18.Text = "label18";
|
||||
//
|
||||
// label17
|
||||
//
|
||||
label17.AutoSize = true;
|
||||
label17.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label17.Location = new Point(11, 88);
|
||||
label17.Name = "label17";
|
||||
label17.Size = new Size(77, 21);
|
||||
label17.TabIndex = 3;
|
||||
label17.Text = "NonH_RJ:";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
label14.AutoSize = true;
|
||||
label14.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label14.Location = new Point(11, 25);
|
||||
label14.Name = "label14";
|
||||
label14.Size = new Size(47, 21);
|
||||
label14.TabIndex = 0;
|
||||
label14.Text = "H_RJ:";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
label16.AutoSize = true;
|
||||
label16.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label16.Location = new Point(11, 67);
|
||||
label16.Name = "label16";
|
||||
label16.Size = new Size(46, 21);
|
||||
label16.TabIndex = 2;
|
||||
label16.Text = "H_VJ:";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
label15.AutoSize = true;
|
||||
label15.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label15.Location = new Point(11, 46);
|
||||
label15.Name = "label15";
|
||||
label15.Size = new Size(42, 21);
|
||||
label15.TabIndex = 1;
|
||||
label15.Text = "H_D:";
|
||||
//
|
||||
// label31
|
||||
//
|
||||
label31.AutoSize = true;
|
||||
label31.Location = new Point(110, 0);
|
||||
label31.Name = "label31";
|
||||
label31.Size = new Size(46, 15);
|
||||
label31.TabIndex = 8;
|
||||
label31.Text = "数据库";
|
||||
//
|
||||
// label29
|
||||
//
|
||||
label29.AutoSize = true;
|
||||
label29.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label29.Location = new Point(181, 88);
|
||||
label29.Name = "label29";
|
||||
label29.Size = new Size(61, 21);
|
||||
label29.TabIndex = 7;
|
||||
label29.Text = "label29";
|
||||
//
|
||||
// label28
|
||||
//
|
||||
label28.AutoSize = true;
|
||||
label28.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label28.Location = new Point(181, 67);
|
||||
label28.Name = "label28";
|
||||
label28.Size = new Size(61, 21);
|
||||
label28.TabIndex = 6;
|
||||
label28.Text = "label28";
|
||||
//
|
||||
// label27
|
||||
//
|
||||
label27.AutoSize = true;
|
||||
label27.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label27.Location = new Point(181, 46);
|
||||
label27.Name = "label27";
|
||||
label27.Size = new Size(61, 21);
|
||||
label27.TabIndex = 5;
|
||||
label27.Text = "label27";
|
||||
//
|
||||
// label26
|
||||
//
|
||||
label26.AutoSize = true;
|
||||
label26.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label26.Location = new Point(181, 25);
|
||||
label26.Name = "label26";
|
||||
label26.Size = new Size(61, 21);
|
||||
label26.TabIndex = 4;
|
||||
label26.Text = "label26";
|
||||
//
|
||||
// label25
|
||||
//
|
||||
label25.AutoSize = true;
|
||||
label25.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label25.Location = new Point(12, 88);
|
||||
label25.Name = "label25";
|
||||
label25.Size = new Size(77, 21);
|
||||
label25.TabIndex = 3;
|
||||
label25.Text = "NonH_RJ:";
|
||||
//
|
||||
// label24
|
||||
//
|
||||
label24.AutoSize = true;
|
||||
label24.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label24.Location = new Point(12, 67);
|
||||
label24.Name = "label24";
|
||||
label24.Size = new Size(46, 21);
|
||||
label24.TabIndex = 2;
|
||||
label24.Text = "H_VJ:";
|
||||
//
|
||||
// label23
|
||||
//
|
||||
label23.AutoSize = true;
|
||||
label23.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label23.Location = new Point(12, 46);
|
||||
label23.Name = "label23";
|
||||
label23.Size = new Size(42, 21);
|
||||
label23.TabIndex = 1;
|
||||
label23.Text = "H_D:";
|
||||
//
|
||||
// label22
|
||||
//
|
||||
label22.AutoSize = true;
|
||||
label22.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
label22.Location = new Point(12, 25);
|
||||
label22.Name = "label22";
|
||||
label22.Size = new Size(47, 21);
|
||||
label22.TabIndex = 0;
|
||||
label22.Text = "H_RJ:";
|
||||
//
|
||||
// button17
|
||||
//
|
||||
button17.Location = new Point(206, 10);
|
||||
button17.Name = "button17";
|
||||
button17.Size = new Size(63, 23);
|
||||
button17.TabIndex = 5;
|
||||
button17.Text = "读取";
|
||||
button17.UseVisualStyleBackColor = true;
|
||||
button17.Click += button17_Click;
|
||||
//
|
||||
// textBox7
|
||||
//
|
||||
textBox7.Location = new Point(152, 10);
|
||||
textBox7.Name = "textBox7";
|
||||
textBox7.Size = new Size(36, 23);
|
||||
textBox7.TabIndex = 4;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
label13.AutoSize = true;
|
||||
label13.Location = new Point(6, 13);
|
||||
label13.Name = "label13";
|
||||
label13.Size = new Size(140, 15);
|
||||
label13.TabIndex = 3;
|
||||
label13.Text = "本地资源文件所在盘符:";
|
||||
//
|
||||
// button16
|
||||
//
|
||||
button16.Location = new Point(451, 353);
|
||||
button16.Name = "button16";
|
||||
button16.Size = new Size(71, 37);
|
||||
button16.TabIndex = 2;
|
||||
button16.Text = "清空";
|
||||
button16.UseVisualStyleBackColor = true;
|
||||
button16.Click += button16_Click;
|
||||
//
|
||||
// button15
|
||||
//
|
||||
button15.Location = new Point(451, 267);
|
||||
button15.Name = "button15";
|
||||
button15.Size = new Size(71, 80);
|
||||
button15.TabIndex = 1;
|
||||
button15.Text = "保存日志";
|
||||
button15.UseVisualStyleBackColor = true;
|
||||
button15.Click += button15_Click;
|
||||
//
|
||||
// richTextBox2
|
||||
//
|
||||
richTextBox2.Location = new Point(6, 267);
|
||||
richTextBox2.Name = "richTextBox2";
|
||||
richTextBox2.Size = new Size(439, 123);
|
||||
richTextBox2.TabIndex = 0;
|
||||
richTextBox2.Text = "";
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
tabPage4.Controls.Add(button9);
|
||||
tabPage4.Controls.Add(button8);
|
||||
tabPage4.Controls.Add(button7);
|
||||
tabPage4.Controls.Add(button6);
|
||||
tabPage4.Controls.Add(button5);
|
||||
tabPage4.Controls.Add(textBox5);
|
||||
tabPage4.Controls.Add(label6);
|
||||
tabPage4.Controls.Add(button4);
|
||||
tabPage4.Controls.Add(textBox4);
|
||||
tabPage4.Controls.Add(label5);
|
||||
tabPage4.Location = new Point(4, 24);
|
||||
tabPage4.Name = "tabPage4";
|
||||
tabPage4.Padding = new Padding(3);
|
||||
tabPage4.Size = new Size(528, 396);
|
||||
tabPage4.TabIndex = 3;
|
||||
tabPage4.Text = "高级功能";
|
||||
tabPage4.Text = "设置";
|
||||
tabPage4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// button9
|
||||
//
|
||||
button9.Location = new Point(209, 317);
|
||||
button9.Name = "button9";
|
||||
button9.Size = new Size(101, 44);
|
||||
button9.TabIndex = 9;
|
||||
button9.Text = "重置配置文件";
|
||||
button9.UseVisualStyleBackColor = true;
|
||||
button9.Click += button9_Click;
|
||||
//
|
||||
// button8
|
||||
//
|
||||
button8.Location = new Point(209, 267);
|
||||
button8.Name = "button8";
|
||||
button8.Size = new Size(101, 44);
|
||||
button8.TabIndex = 8;
|
||||
button8.Text = "保存配置文件";
|
||||
button8.UseVisualStyleBackColor = true;
|
||||
button8.Click += button8_Click;
|
||||
//
|
||||
// button7
|
||||
//
|
||||
button7.Location = new Point(209, 217);
|
||||
button7.Name = "button7";
|
||||
button7.Size = new Size(101, 44);
|
||||
button7.TabIndex = 7;
|
||||
button7.Text = "读取配置文件";
|
||||
button7.UseVisualStyleBackColor = true;
|
||||
button7.Click += Button7_Click;
|
||||
//
|
||||
// button6
|
||||
//
|
||||
button6.Location = new Point(342, 21);
|
||||
button6.Name = "button6";
|
||||
button6.Size = new Size(75, 23);
|
||||
button6.TabIndex = 6;
|
||||
button6.Text = "打开文件";
|
||||
button6.UseVisualStyleBackColor = true;
|
||||
button6.Click += button6_Click;
|
||||
//
|
||||
// button5
|
||||
//
|
||||
button5.Location = new Point(423, 78);
|
||||
button5.Name = "button5";
|
||||
button5.Size = new Size(75, 23);
|
||||
button5.TabIndex = 5;
|
||||
button5.Text = "浏览";
|
||||
button5.UseVisualStyleBackColor = true;
|
||||
button5.Click += button5_Click;
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
textBox5.Location = new Point(20, 104);
|
||||
textBox5.Name = "textBox5";
|
||||
textBox5.Size = new Size(478, 23);
|
||||
textBox5.TabIndex = 4;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Location = new Point(20, 86);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(151, 15);
|
||||
label6.TabIndex = 3;
|
||||
label6.Text = "DB Browser for SQLite 位置";
|
||||
//
|
||||
// button4
|
||||
//
|
||||
button4.Location = new Point(423, 21);
|
||||
button4.Name = "button4";
|
||||
button4.Size = new Size(75, 23);
|
||||
button4.TabIndex = 2;
|
||||
button4.Text = "浏览";
|
||||
button4.UseVisualStyleBackColor = true;
|
||||
button4.Click += button4_Click;
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
textBox4.Location = new Point(20, 47);
|
||||
textBox4.Name = "textBox4";
|
||||
textBox4.Size = new Size(478, 23);
|
||||
textBox4.TabIndex = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.AutoSize = true;
|
||||
label5.Location = new Point(20, 29);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new Size(79, 15);
|
||||
label5.TabIndex = 0;
|
||||
label5.Text = "asmr.db 位置";
|
||||
//
|
||||
// tabPage5
|
||||
//
|
||||
tabPage5.Location = new Point(4, 24);
|
||||
|
@ -307,13 +999,35 @@
|
|||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(560, 448);
|
||||
Controls.Add(tabControl1);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
Icon = (Icon)resources.GetObject("$this.Icon");
|
||||
MaximizeBox = false;
|
||||
Name = "Form1";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "AsmrManage";
|
||||
tabControl1.ResumeLayout(false);
|
||||
tabPage1.ResumeLayout(false);
|
||||
tabPage1.PerformLayout();
|
||||
groupBox5.ResumeLayout(false);
|
||||
groupBox5.PerformLayout();
|
||||
groupBox3.ResumeLayout(false);
|
||||
tabPage2.ResumeLayout(false);
|
||||
groupBox2.ResumeLayout(false);
|
||||
groupBox1.ResumeLayout(false);
|
||||
groupBox1.PerformLayout();
|
||||
tabPage3.ResumeLayout(false);
|
||||
tabPage3.PerformLayout();
|
||||
groupBox7.ResumeLayout(false);
|
||||
groupBox7.PerformLayout();
|
||||
groupBox6.ResumeLayout(false);
|
||||
splitContainer1.Panel1.ResumeLayout(false);
|
||||
splitContainer1.Panel1.PerformLayout();
|
||||
splitContainer1.Panel2.ResumeLayout(false);
|
||||
splitContainer1.Panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)splitContainer1).EndInit();
|
||||
splitContainer1.ResumeLayout(false);
|
||||
tabPage4.ResumeLayout(false);
|
||||
tabPage4.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
|
@ -342,5 +1056,63 @@
|
|||
private Label label4;
|
||||
private TextBox textBox3;
|
||||
private CheckBox checkBox4;
|
||||
private Button button6;
|
||||
private Button button5;
|
||||
private TextBox textBox5;
|
||||
private Label label6;
|
||||
private Button button4;
|
||||
private TextBox textBox4;
|
||||
private Label label5;
|
||||
private Button button9;
|
||||
private Button button8;
|
||||
private Button button7;
|
||||
private GroupBox groupBox3;
|
||||
private RichTextBox richTextBox1;
|
||||
private Button button13;
|
||||
private Button button12;
|
||||
private TextBox textBox6;
|
||||
private Label label9;
|
||||
private GroupBox groupBox5;
|
||||
private Label label10;
|
||||
private ComboBox comboBox1;
|
||||
private Button button14;
|
||||
private CheckBox checkBox6;
|
||||
private CheckBox checkBox5;
|
||||
private Label label12;
|
||||
private Label label11;
|
||||
private CheckBox checkBox8;
|
||||
private CheckBox checkBox7;
|
||||
private Button button17;
|
||||
private TextBox textBox7;
|
||||
private Label label13;
|
||||
private Button button16;
|
||||
private Button button15;
|
||||
private RichTextBox richTextBox2;
|
||||
private GroupBox groupBox6;
|
||||
private SplitContainer splitContainer1;
|
||||
private Label label18;
|
||||
private Label label17;
|
||||
private Label label14;
|
||||
private Label label16;
|
||||
private Label label15;
|
||||
private Label label30;
|
||||
private Label label21;
|
||||
private Label label20;
|
||||
private Label label19;
|
||||
private Label label31;
|
||||
private Label label29;
|
||||
private Label label28;
|
||||
private Label label27;
|
||||
private Label label26;
|
||||
private Label label25;
|
||||
private Label label24;
|
||||
private Label label23;
|
||||
private Label label22;
|
||||
private GroupBox groupBox7;
|
||||
private Button button18;
|
||||
private CheckBox checkBox11;
|
||||
private CheckBox checkBox12;
|
||||
private CheckBox checkBox9;
|
||||
private CheckBox checkBox10;
|
||||
}
|
||||
}
|
|
@ -1,18 +1,21 @@
|
|||
using DiffPlex.DiffBuilder.Model;
|
||||
using DiffPlex.DiffBuilder;
|
||||
using OfficeOpenXml;
|
||||
using System.Data.SQLite;
|
||||
using System.Diagnostics;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace AsmrManage
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
public Form1() //init
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void Button1_Click(object sender, EventArgs e)
|
||||
private void Button1_Click(object sender, EventArgs e) //P2 xlsx文件选框
|
||||
{
|
||||
OpenFileDialog openFileDialog1 = new OpenFileDialog();
|
||||
openFileDialog1.Title = "请选择符合的xlsx表格文件";
|
||||
|
@ -25,7 +28,7 @@ namespace AsmrManage
|
|||
|
||||
}
|
||||
|
||||
private void Button2_Click(object sender, EventArgs e)
|
||||
private void Button2_Click(object sender, EventArgs e) //P2 db文件位置选框
|
||||
{
|
||||
FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog();
|
||||
folderBrowserDialog1.UseDescriptionForTitle = true;
|
||||
|
@ -36,13 +39,13 @@ namespace AsmrManage
|
|||
}
|
||||
}
|
||||
|
||||
private void Log(string message)
|
||||
private void Log(string message) //xlsx2db log function
|
||||
{
|
||||
logBox1.AppendText(message + Environment.NewLine);
|
||||
logBox1.ScrollToCaret();
|
||||
}
|
||||
|
||||
private void Button3_Click(object sender, EventArgs e)
|
||||
private void Button3_Click(object sender, EventArgs e) //xlsx2db 开始处理
|
||||
{
|
||||
Log("开始处理");
|
||||
string excelFilePath = textBox1.Text;
|
||||
|
@ -55,7 +58,7 @@ namespace AsmrManage
|
|||
{
|
||||
databaseLocation = textBox2.Text;
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(excelFilePath) || string.IsNullOrEmpty(databaseLocation))
|
||||
{
|
||||
Log("TextBox1 或 TextBox2 为空,无法继续处理");
|
||||
|
@ -162,15 +165,751 @@ namespace AsmrManage
|
|||
}
|
||||
});
|
||||
}
|
||||
private void CheckBox2_CheckedChanged(object sender, EventArgs e)
|
||||
private void CheckBox2_CheckedChanged(object sender, EventArgs e) //转换使用源文件位置
|
||||
{
|
||||
textBox2.Enabled = !checkBox2.Checked;
|
||||
button2.Enabled = !checkBox2.Checked;
|
||||
}
|
||||
private void CheckBox4_CheckedChanged(object sender, EventArgs e)
|
||||
private void CheckBox4_CheckedChanged(object sender, EventArgs e) //文件是否受密码保护
|
||||
{
|
||||
textBox3.ReadOnly = !checkBox4.Checked;
|
||||
}
|
||||
|
||||
private void TabControl1_SelectedIndexChanged(object sender, EventArgs e) //切换标签页
|
||||
{
|
||||
ResetPage1();
|
||||
ResetPage2();
|
||||
ResetPage3();
|
||||
ResetPage4();
|
||||
if (tabControl1.SelectedTab == tabPage4)
|
||||
{
|
||||
RefreshSettingPageInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshSettingPageInfo() //重新获取P4信息
|
||||
{
|
||||
Program.config ??= ConfigManager.LoadConfig();
|
||||
textBox4.Text = Program.config.DatabaseFilePath;
|
||||
textBox5.Text = Program.config.DBBrowserPath;
|
||||
}
|
||||
|
||||
private void ResetPage4()
|
||||
{
|
||||
textBox4.Text = string.Empty;
|
||||
textBox5.Text = string.Empty;
|
||||
} //刷新P4
|
||||
private void ResetPage3() //刷新P3
|
||||
{
|
||||
textBox7.Text = string.Empty;
|
||||
label18.Text = string.Empty;
|
||||
label19.Text = string.Empty;
|
||||
label20.Text = string.Empty;
|
||||
label21.Text = string.Empty;
|
||||
label26.Text = string.Empty;
|
||||
label27.Text = string.Empty;
|
||||
label28.Text = string.Empty;
|
||||
label29.Text = string.Empty;
|
||||
checkBox9.Checked = false;
|
||||
checkBox10.Checked = false;
|
||||
checkBox11.Checked = false;
|
||||
checkBox12.Checked = false;
|
||||
richTextBox2.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void ResetPage2()
|
||||
{
|
||||
// 重置内容
|
||||
textBox1.Text = string.Empty;
|
||||
textBox2.Text = string.Empty;
|
||||
textBox3.Text = string.Empty;
|
||||
logBox1.Text = string.Empty;
|
||||
|
||||
// 取消选中checkBox1~4
|
||||
checkBox1.Checked = false;
|
||||
checkBox2.Checked = false;
|
||||
checkBox3.Checked = false;
|
||||
checkBox4.Checked = false;
|
||||
} //刷新P2
|
||||
|
||||
private void ResetPage1() //刷新P1
|
||||
{
|
||||
textBox6.Text = string.Empty;
|
||||
comboBox1.SelectedItem = null;
|
||||
label12.Text = string.Empty;
|
||||
checkBox5.Checked = false;
|
||||
checkBox6.Checked = false;
|
||||
checkBox7.Checked = false;
|
||||
checkBox8.Checked = false;
|
||||
richTextBox1.Text = string.Empty;
|
||||
button13.Enabled = false;
|
||||
}
|
||||
|
||||
private void Button7_Click(object sender, EventArgs e) //读取配置文件
|
||||
{
|
||||
Program.config = ConfigManager.LoadConfig();
|
||||
RefreshSettingPageInfo();
|
||||
MessageBox.Show("配置信息已重新加载。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void button8_Click(object sender, EventArgs e) //保存配置文件
|
||||
{
|
||||
//保存前信息检查
|
||||
string path1 = textBox4.Text.Trim();
|
||||
string path2 = textBox5.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(path1) && !File.Exists(path1))
|
||||
{
|
||||
MessageBox.Show("指定的DB路径不存在。请检查路径是否正确。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(path2) && !File.Exists(path2))
|
||||
{
|
||||
MessageBox.Show("指定的DB Browser路径不存在。请检查路径是否正确。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
//开始保存
|
||||
Program.config ??= ConfigManager.LoadConfig();
|
||||
Program.config.DatabaseFilePath = path1;
|
||||
Program.config.DBBrowserPath = path2;
|
||||
ConfigManager.SaveConfig(Program.config);
|
||||
}
|
||||
|
||||
private void button9_Click(object sender, EventArgs e) //重置配置文件
|
||||
{
|
||||
Program.config = null;
|
||||
ConfigManager.SaveConfig(new AppConfig());
|
||||
RefreshSettingPageInfo();
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e) //P4 文件选框1
|
||||
{
|
||||
OpenFileDialog openFileDialog1 = new OpenFileDialog();
|
||||
openFileDialog1.Title = "请选择正确的db数据库文件";
|
||||
openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
openFileDialog1.Filter = "sqlite db文件|asmr.db";
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
textBox4.Text = openFileDialog1.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e) //p4 EXE文件位置选框2
|
||||
{
|
||||
OpenFileDialog openFileDialog1 = new OpenFileDialog();
|
||||
openFileDialog1.Title = "请选择DB Browser for SQLite主程序";
|
||||
openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
openFileDialog1.Filter = "DB Browser for SQLite主程序|DB Browser for SQLite.exe";
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
textBox5.Text = openFileDialog1.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void button6_Click(object sender, EventArgs e) //p4 调用db browser预览数据库
|
||||
{
|
||||
if (Program.config == null) { Program.config = ConfigManager.LoadConfig(); }
|
||||
string db_path = Program.config.DatabaseFilePath;
|
||||
string dbb_path = Program.config.DBBrowserPath;
|
||||
//检查路径是否存在
|
||||
if (File.Exists(db_path) && File.Exists(dbb_path))
|
||||
{
|
||||
ProcessStartInfo psi = new ProcessStartInfo
|
||||
{
|
||||
FileName = dbb_path,
|
||||
Arguments = db_path
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
Process.Start(psi);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("发生错误:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("指定路径不存在。请检查路径是否正确。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void button13_Click(object sender, EventArgs e) //添加
|
||||
{
|
||||
Program.config = ConfigManager.LoadConfig();
|
||||
string DbPath = Program.config.DatabaseFilePath;
|
||||
string keyword = textBox6.Text.Trim().ToUpper();
|
||||
string? selectedText = comboBox1.SelectedItem.ToString();
|
||||
if (selectedText == "Auto")
|
||||
{
|
||||
if (keyword.StartsWith("RJ"))
|
||||
{
|
||||
selectedText = "H_RJ";
|
||||
}
|
||||
else if (keyword.StartsWith("D"))
|
||||
{
|
||||
selectedText = "H_D";
|
||||
}
|
||||
else if (keyword.StartsWith("VJ"))
|
||||
{
|
||||
selectedText = "H_VJ";
|
||||
}
|
||||
else
|
||||
{
|
||||
Logp1("无法自动检测类型");
|
||||
return;
|
||||
}
|
||||
}
|
||||
bool Feature_Auto_Clear = checkBox6.Checked; //添加后自动清空输入框
|
||||
string connectionString = $"Data Source={DbPath};Version=3"; // SQLite数据库连接字符串
|
||||
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
|
||||
{
|
||||
connection.Open();
|
||||
if (label12.Text == "不存在")
|
||||
{
|
||||
// 开始添加记录
|
||||
string number = string.Empty;
|
||||
foreach (char c in keyword)
|
||||
{
|
||||
if (char.IsDigit(c))
|
||||
{
|
||||
number += c;
|
||||
}
|
||||
else if (number.Length > 0)
|
||||
{
|
||||
// 已经提取到数字部分,遇到非数字字符则停止提取
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (int.TryParse(number, out int asmr_order_id))
|
||||
{
|
||||
using (SQLiteCommand addCommand = new SQLiteCommand($"INSERT INTO {selectedText} (asmr_id, asmr_order_id) VALUES (@asmr_id, @asmr_order_id)", connection))
|
||||
{
|
||||
addCommand.Parameters.AddWithValue("@asmr_id", keyword);
|
||||
addCommand.Parameters.AddWithValue("@asmr_order_id", asmr_order_id);
|
||||
addCommand.ExecuteNonQuery();
|
||||
|
||||
// 添加成功后的逻辑
|
||||
label12.Text = "成功";
|
||||
Logp1($"{keyword} 已成功添加到 {selectedText} 表");
|
||||
if (Feature_Auto_Clear)
|
||||
{
|
||||
textBox6.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 无法提取数字部分的情况
|
||||
Logp1("无法提取数字部分,添加失败");
|
||||
}
|
||||
|
||||
}
|
||||
connection.Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void button12_Click(object sender, EventArgs e) //P1查找
|
||||
{
|
||||
//查找前检查
|
||||
//验证数据库配置文件是否正确
|
||||
Program.config = ConfigManager.LoadConfig();
|
||||
string DbPath = Program.config.DatabaseFilePath;
|
||||
if (!File.Exists(DbPath))
|
||||
{
|
||||
Logp1("DB文件路径错误,请先检查配置文件");
|
||||
return;
|
||||
}
|
||||
//获取查找/添加关键词,检查是否符合规则
|
||||
string keyword = textBox6.Text.Trim();
|
||||
string pattern = "^(RJ|VJ|D)[0-9]+$"; // 匹配以RJ、VJ、D开头,后跟数字的模式
|
||||
|
||||
if (Regex.IsMatch(keyword, pattern))
|
||||
{
|
||||
keyword = keyword.ToUpper(); // 将关键词转为大写
|
||||
}
|
||||
else
|
||||
{
|
||||
Logp1("输入内容格式有误,请检查格式是否正确");
|
||||
return;
|
||||
}
|
||||
//获取类别选择
|
||||
//现支持Auto,H_RJ,H_D,H_VJ,NonH_RJ
|
||||
//其中Auto不支持NonH_RJ
|
||||
object selectedValue = comboBox1.SelectedItem;
|
||||
string? selectedText;
|
||||
if (selectedValue != null)
|
||||
{
|
||||
selectedText = selectedValue.ToString();
|
||||
switch (selectedText)
|
||||
{
|
||||
case "H_RJ":
|
||||
case "NonH_RJ":
|
||||
if (System.Text.RegularExpressions.Regex.IsMatch(keyword, @"^RJ\d+$"))
|
||||
{
|
||||
// RJ + 数字 的情况
|
||||
break;
|
||||
}
|
||||
Logp1("输入内容与选择的类别不匹配");
|
||||
return;
|
||||
case "Auto": // Auto Detect Type
|
||||
if (keyword.StartsWith("RJ"))
|
||||
{
|
||||
selectedText = "H_RJ";
|
||||
}
|
||||
else if (keyword.StartsWith("D"))
|
||||
{
|
||||
selectedText = "H_D";
|
||||
}
|
||||
else if (keyword.StartsWith("VJ"))
|
||||
{
|
||||
selectedText = "H_VJ";
|
||||
}
|
||||
else
|
||||
{
|
||||
Logp1("无法自动检测类型");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "H_D":
|
||||
if (System.Text.RegularExpressions.Regex.IsMatch(keyword, @"^D\d+$"))
|
||||
{
|
||||
// D + 数字 的情况
|
||||
break;
|
||||
}
|
||||
Logp1("输入内容与选择的类别不匹配");
|
||||
return;
|
||||
|
||||
case "H_VJ":
|
||||
if (System.Text.RegularExpressions.Regex.IsMatch(keyword, @"^VJ\d+$"))
|
||||
{
|
||||
// VJ + 数字 的情况
|
||||
break;
|
||||
}
|
||||
Logp1("输入内容与选择的类别不匹配");
|
||||
return;
|
||||
|
||||
default:
|
||||
Logp1("程序异常");
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Logp1("未选择类别,请先选择类别");
|
||||
return;
|
||||
}
|
||||
//获取选项值
|
||||
bool Feature_Auto_Add = checkBox5.Checked; //查找后缺少时自动添加
|
||||
bool Feature_Auto_Clear = checkBox6.Checked; //添加后自动清空输入框
|
||||
//bool Feature_Auto_Detect_Type = checkBox7.Checked; //自动检测类型 //功能已移动
|
||||
bool Feature_Auto_Backup = checkBox8.Checked; //自动备份数据库
|
||||
//执行备份(如果有需要)
|
||||
if (Feature_Auto_Backup)
|
||||
{
|
||||
// 创建备份目录
|
||||
string backupDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "backup");
|
||||
if (!Directory.Exists(backupDir))
|
||||
{
|
||||
Directory.CreateDirectory(backupDir);
|
||||
}
|
||||
|
||||
// 构造备份文件名(使用日期时间作为文件名)
|
||||
string backupFileName = DateTime.Now.ToString("yyyyMMdd") + ".7z";
|
||||
string backupFilePath = Path.Combine(backupDir, backupFileName);
|
||||
// 检查备份是否已存在
|
||||
if (!File.Exists(backupFilePath))
|
||||
{
|
||||
string sevenZipPath;
|
||||
|
||||
// 判断系统位数
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
sevenZipPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "x64", "7za.exe");
|
||||
}
|
||||
else
|
||||
{
|
||||
sevenZipPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7za.exe");
|
||||
}
|
||||
|
||||
if (!File.Exists(sevenZipPath))
|
||||
{
|
||||
Logp1("错误,丢失7za.exe文件");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 执行备份
|
||||
ProcessStartInfo processInfo = new ProcessStartInfo();
|
||||
processInfo.FileName = sevenZipPath; // 7-Zip的可执行文件路径
|
||||
processInfo.Arguments = $"a -mx9 \"{backupFilePath}\" \"{DbPath}\""; // 执行7z压缩命令
|
||||
|
||||
Process process = new Process();
|
||||
process.StartInfo = processInfo;
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
|
||||
// 检查备份是否成功
|
||||
if (File.Exists(backupFilePath))
|
||||
{
|
||||
Logp1($"自动备份成功!数据库已备份至{backupFilePath}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logp1("备份失败!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Logp1("今日已备份");
|
||||
}
|
||||
}
|
||||
|
||||
//开始查找(根据selectedText选择需要查询的数据表,查询keyword是否出现在字段"ID"
|
||||
//string DbPath = Program.config.DatabaseFilePath;
|
||||
//keyword
|
||||
//selectedText:H_RJ,H_D,H_VJ,NonH_RJ
|
||||
//对应表:H_RJ,H_D,H_VJ,NonH_RJ
|
||||
QueryDB(DbPath, keyword, selectedText, Feature_Auto_Add, Feature_Auto_Clear);
|
||||
}
|
||||
|
||||
private void QueryDB(string DbPath, string keyword, string selectedText, bool Feature_Auto_Add, bool Feature_Auto_Clear)
|
||||
{
|
||||
string connectionString = $"Data Source={DbPath};Version=3"; // SQLite数据库连接字符串
|
||||
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
using (SQLiteCommand command = new SQLiteCommand($"SELECT COUNT(*) FROM {selectedText} WHERE asmr_id = @keyword", connection))
|
||||
{
|
||||
command.Parameters.AddWithValue("@keyword", keyword);
|
||||
|
||||
int count = Convert.ToInt32(command.ExecuteScalar());
|
||||
button13.Enabled = false;
|
||||
if (count == 1)
|
||||
{
|
||||
label12.Text = "已存在";
|
||||
Logp1($"{keyword}已存在");
|
||||
}
|
||||
else if (count <= 0)
|
||||
{
|
||||
label12.Text = "不存在";
|
||||
button13.Enabled = true;
|
||||
Logp1($"{keyword}不存在");
|
||||
}
|
||||
else
|
||||
{
|
||||
label12.Text = "已存在且重复";
|
||||
Logp1($"异常,{keyword}不存在");
|
||||
}
|
||||
}
|
||||
if (Feature_Auto_Add && label12.Text == "不存在")
|
||||
{
|
||||
// 开始添加记录
|
||||
string number = string.Empty;
|
||||
foreach (char c in keyword)
|
||||
{
|
||||
if (char.IsDigit(c))
|
||||
{
|
||||
number += c;
|
||||
}
|
||||
else if (number.Length > 0)
|
||||
{
|
||||
// 已经提取到数字部分,遇到非数字字符则停止提取
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (int.TryParse(number, out int asmr_order_id))
|
||||
{
|
||||
using (SQLiteCommand addCommand = new SQLiteCommand($"INSERT INTO {selectedText} (asmr_id, asmr_order_id) VALUES (@asmr_id, @asmr_order_id)", connection))
|
||||
{
|
||||
addCommand.Parameters.AddWithValue("@asmr_id", keyword);
|
||||
addCommand.Parameters.AddWithValue("@asmr_order_id", asmr_order_id);
|
||||
addCommand.ExecuteNonQuery();
|
||||
|
||||
// 添加成功后的逻辑
|
||||
label12.Text = "成功";
|
||||
Logp1($"{keyword} 已成功添加到 {selectedText} 表");
|
||||
if (Feature_Auto_Clear)
|
||||
{
|
||||
textBox6.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 无法提取数字部分的情况
|
||||
Logp1("无法提取数字部分,添加失败");
|
||||
}
|
||||
|
||||
}
|
||||
connection.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void button17_Click(object sender, EventArgs e) //P3 读取信息
|
||||
{
|
||||
string driveLetter = textBox7.Text.Trim().ToUpper(); // 获取用户输入的盘符并转换为大写
|
||||
string drivePath = $"{driveLetter}:\\"; // 组合成盘符路径
|
||||
|
||||
string filePath = Path.Combine(drivePath, "asmr_storage.txt"); // 组合路径
|
||||
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
Logp3("标识符已找到,即将开始读取信息");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logp3("指定路径下未找到标识符,无法进行下一步操作");
|
||||
return;
|
||||
}
|
||||
|
||||
string folderPath = Path.Combine(drivePath, "H");
|
||||
string folderPath2 = Path.Combine(drivePath, "Non-H");
|
||||
|
||||
// 获取指定文件夹下的所有目录
|
||||
string[] directories = Directory.GetDirectories(folderPath);
|
||||
string[] directories2 = Directory.GetDirectories(folderPath2);
|
||||
|
||||
// 创建List来保存不同前缀的目录名称
|
||||
List<string> rjDirectories = new List<string>();
|
||||
List<string> dDirectories = new List<string>();
|
||||
List<string> vjDirectories = new List<string>();
|
||||
List<string> nonhrjDirectories = new List<string>();
|
||||
|
||||
// 遍历目录,根据前缀添加到对应的List中
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
string directoryName = Path.GetFileName(directory);
|
||||
if (directoryName.EndsWith(".fin") || directoryName.EndsWith(".now"))
|
||||
{
|
||||
directoryName = directoryName.Substring(0, directoryName.Length - 4);
|
||||
}
|
||||
|
||||
if (directoryName.StartsWith("RJ", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
rjDirectories.Add(directoryName);
|
||||
}
|
||||
else if (directoryName.StartsWith("D", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
dDirectories.Add(directoryName);
|
||||
}
|
||||
else if (directoryName.StartsWith("VJ", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
vjDirectories.Add(directoryName);
|
||||
}
|
||||
}
|
||||
foreach (string directory in directories2)
|
||||
{
|
||||
string directoryName = Path.GetFileName(directory);
|
||||
if (directoryName.EndsWith(".fin") || directoryName.EndsWith(".now"))
|
||||
{
|
||||
directoryName = directoryName.Substring(0, directoryName.Length - 4);
|
||||
}
|
||||
if (directoryName.StartsWith("RJ", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
nonhrjDirectories.Add(directoryName);
|
||||
}
|
||||
}
|
||||
label18.Text = rjDirectories.Count.ToString();
|
||||
label19.Text = dDirectories.Count.ToString();
|
||||
label20.Text = vjDirectories.Count.ToString();
|
||||
label21.Text = nonhrjDirectories.Count.ToString();
|
||||
|
||||
Program.config ??= ConfigManager.LoadConfig();
|
||||
string connectionString = $"Data Source={Program.config.DatabaseFilePath};Version=3"; // SQLite数据库连接字符串
|
||||
|
||||
// 创建List来保存不同类型的数据
|
||||
List<string> rjData = new List<string>();
|
||||
List<string> dData = new List<string>();
|
||||
List<string> vjData = new List<string>();
|
||||
List<string> nonhrjData = new List<string>();
|
||||
|
||||
// 连接SQLite数据库
|
||||
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
// 获取H_RJ表中的数据
|
||||
using (SQLiteCommand command = new SQLiteCommand("SELECT asmr_id FROM H_RJ", connection))
|
||||
using (SQLiteDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
string asmrName = reader.GetString(0);
|
||||
rjData.Add(asmrName);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取H_D表中的数据
|
||||
using (SQLiteCommand command = new SQLiteCommand("SELECT asmr_id FROM H_D", connection))
|
||||
using (SQLiteDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
string asmrName = reader.GetString(0);
|
||||
dData.Add(asmrName);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取H_VJ表中的数据
|
||||
using (SQLiteCommand command = new SQLiteCommand("SELECT asmr_id FROM H_VJ", connection))
|
||||
using (SQLiteDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
string asmrName = reader.GetString(0);
|
||||
vjData.Add(asmrName);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取NonH_RJ表中的数据
|
||||
using (SQLiteCommand command = new SQLiteCommand("SELECT asmr_id FROM NonH_RJ", connection))
|
||||
using (SQLiteDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
string asmrName = reader.GetString(0);
|
||||
nonhrjData.Add(asmrName);
|
||||
}
|
||||
}
|
||||
|
||||
connection.Close();
|
||||
}
|
||||
label26.Text = rjData.Count.ToString();
|
||||
label27.Text = dData.Count.ToString();
|
||||
label28.Text = vjData.Count.ToString();
|
||||
label29.Text = nonhrjData.Count.ToString();
|
||||
|
||||
SaveDataP3(rjDirectories, dDirectories, vjDirectories, nonhrjDirectories, rjData, dData, vjData, nonhrjData);
|
||||
Logp3("读取完毕");
|
||||
|
||||
}
|
||||
|
||||
private static void SaveDataP3(List<string> rjDirectories, List<string> dDirectories, List<string> vjDirectories, List<string> nonhrjDirectories, List<string> rjData, List<string> dData, List<string> vjData, List<string> nonhrjData) //读取配套任务,保存读取到的数据用以后期比较
|
||||
{
|
||||
NaturalOrderComparer comparer = new NaturalOrderComparer();
|
||||
rjDirectories.Sort(comparer);
|
||||
dDirectories.Sort(comparer);
|
||||
vjDirectories.Sort(comparer);
|
||||
nonhrjDirectories.Sort(comparer);
|
||||
rjData.Sort(comparer);
|
||||
dData.Sort(comparer);
|
||||
vjData.Sort(comparer);
|
||||
nonhrjData.Sort(comparer);
|
||||
Program.data ??= new AsmrData();
|
||||
Program.data.file_rj_str = string.Join(Environment.NewLine, rjDirectories);
|
||||
Program.data.file_d_str = string.Join(Environment.NewLine, dDirectories);
|
||||
Program.data.file_vj_str = string.Join(Environment.NewLine, vjDirectories);
|
||||
Program.data.file_nonhrj_str = string.Join(Environment.NewLine, nonhrjDirectories);
|
||||
Program.data.db_rj_str = string.Join(Environment.NewLine, rjData);
|
||||
Program.data.db_d_str = string.Join(Environment.NewLine, dData);
|
||||
Program.data.db_vj_str = string.Join(Environment.NewLine, vjData);
|
||||
Program.data.db_nonhrj_str = string.Join(Environment.NewLine, nonhrjData);
|
||||
}
|
||||
|
||||
private void Logp3(string message) //p3 log function
|
||||
{
|
||||
richTextBox2.AppendText(message + Environment.NewLine);
|
||||
richTextBox2.ScrollToCaret();
|
||||
}
|
||||
private void Logp1(string message) //p1 log function
|
||||
{
|
||||
richTextBox1.AppendText(message + Environment.NewLine);
|
||||
richTextBox1.ScrollToCaret();
|
||||
}
|
||||
|
||||
private void button18_Click(object sender, EventArgs e) //p3比较
|
||||
{
|
||||
Program.data ??= new AsmrData();
|
||||
if (checkBox9.Checked)
|
||||
{
|
||||
Logp3("# H_RJ差异情况:");
|
||||
DiffContent(Program.data.file_rj_str, Program.data.db_rj_str);
|
||||
}
|
||||
if (checkBox10.Checked)
|
||||
{
|
||||
Logp3("# H_D差异情况:");
|
||||
DiffContent(Program.data.file_d_str, Program.data.db_d_str);
|
||||
}
|
||||
if (checkBox11.Checked)
|
||||
{
|
||||
Logp3("# H_VJ差异情况:");
|
||||
DiffContent(Program.data.file_vj_str, Program.data.db_vj_str);
|
||||
}
|
||||
if (checkBox12.Checked)
|
||||
{
|
||||
Logp3("# NonH_RJ差异情况:");
|
||||
DiffContent(Program.data.file_nonhrj_str, Program.data.db_nonhrj_str);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void DiffContent(string before, string after) //内容比较,给出差异细节并输出
|
||||
{
|
||||
var diff_rj = InlineDiffBuilder.Diff(before, after);
|
||||
foreach (var line in diff_rj.Lines)
|
||||
{
|
||||
switch (line.Type)
|
||||
{
|
||||
case ChangeType.Inserted:
|
||||
Logp3("+ " + line.Text);
|
||||
break;
|
||||
case ChangeType.Deleted:
|
||||
Logp3("- " + line.Text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void button15_Click(object sender, EventArgs e) //save p3 log
|
||||
{
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.Filter = "Log Files|*.log";
|
||||
saveFileDialog.Title = "Save Log File";
|
||||
saveFileDialog.FileName = DateTime.Now.ToString("yyyy-MM-dd") + ".log";
|
||||
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string filePath = saveFileDialog.FileName;
|
||||
|
||||
try
|
||||
{
|
||||
using (StreamWriter writer = new StreamWriter(filePath))
|
||||
{
|
||||
writer.Write(richTextBox2.Text);
|
||||
}
|
||||
|
||||
MessageBox.Show("日志已成功保存。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("保存日志时发生错误:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void button16_Click(object sender, EventArgs e) //清空p3日志
|
||||
{
|
||||
richTextBox2.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void button14_Click(object sender, EventArgs e) //清空p1日志
|
||||
{
|
||||
textBox6.Text = string.Empty;
|
||||
richTextBox2.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void textBox6_TextChanged(object sender, EventArgs e) //当keyword改变时
|
||||
{
|
||||
button13.Enabled = false;
|
||||
label12.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -117,4 +117,171 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAACQAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAP///////wAA////////
|
||||
AAD///////8AAP9////9/wAA/j////j/AAD8H///8H8AAPgP///gPwAA+Af//8AfAAD8A///gD8AAP4B
|
||||
//8AfwAA/wD//gD/AAD/gH/8Af8AAP/AP/gD/wAA/+Af8Af/AAD/8A/gD/8AAP/4B8Af/wAA//wDgD//
|
||||
AAD//gHAf/8AAP//AOD//wAA//+Acf//AAD//8A7//8AAP//4B///wAA///wD///AAD/j8AH//8AAP8P
|
||||
gAP//wAA/g8AAf//AAD8CgAA//8AAPgAAYB//wAA8AADwAD/AADgAAfgAH8AAOAAD/AAPwAA8AAf+AAf
|
||||
AAD+AA/4AB8AAPwAH/gAHwAA/gA/+AAPAAD/AB/4Bg8AAP+AD/gPDwAA/8AH+A+fAAD/4AP4B/8AAP/w
|
||||
AfwD/wAA//gB/gH/AAD//AP/AP8AAP//D//j/wAA////////AAD///////8AAP///////wAA////////
|
||||
AAA=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsmrManage
|
||||
{
|
||||
internal class NaturalOrderComparer : IComparer<string> //自然排序(自定义规则)
|
||||
{
|
||||
public int Compare(string? x, string? y)
|
||||
{
|
||||
// 提取字符串中的数字部分并将其转换为数字进行比较
|
||||
int numX = ExtractNumber(x);
|
||||
int numY = ExtractNumber(y);
|
||||
|
||||
return numX.CompareTo(numY);
|
||||
}
|
||||
|
||||
private int ExtractNumber(string? input) // 截取数字部分
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
string number = string.Empty;
|
||||
foreach (char c in input)
|
||||
{
|
||||
if (char.IsDigit(c))
|
||||
{
|
||||
number += c;
|
||||
}
|
||||
else if (number.Length > 0)
|
||||
{
|
||||
// 已经提取到数字部分,遇到非数字字符则停止提取
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (int.TryParse(number, out int result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
// 默认情况下,无法提取数字,则返回 0
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,11 +5,18 @@ namespace AsmrManage
|
|||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
public static AppConfig? config;
|
||||
public static AsmrData? data;
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
if (!File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config.json")))
|
||||
{
|
||||
ConfigManager.SaveConfig(new AppConfig());
|
||||
}
|
||||
config = ConfigManager.LoadConfig(); //fetch configuration data
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
Reference in New Issue