diff --git a/App.xaml.cs b/App.xaml.cs index 36f4a71..d500038 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows; +using Microsoft.Data.Sqlite; namespace DyeingComputer { diff --git a/DyeingComputer.csproj b/DyeingComputer.csproj index 8a0413e..30b29c1 100644 --- a/DyeingComputer.csproj +++ b/DyeingComputer.csproj @@ -71,6 +71,11 @@ True Resources.zh-CN.resx + + True + True + Resources.zh-TW.resx + @@ -81,6 +86,7 @@ + @@ -114,7 +120,6 @@ PublicResXFileCodeGenerator Resources.en-US.Designer.cs - PublicResXFileCodeGenerator Resources.Designer.cs @@ -123,7 +128,10 @@ PublicResXFileCodeGenerator Resources.zh-CN.Designer.cs - + + PublicResXFileCodeGenerator + Resources.zh-TW.Designer.cs + @@ -179,12 +187,18 @@ 8.0.0 + + 8.0.7 + 4.5.1 5.0.0 + + 1.0.118 + 4.5.5 diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 652f672..c2addf4 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -1,4 +1,5 @@ -using System; +using DyeingComputer.UserClass; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -23,6 +24,7 @@ namespace DyeingComputer public MainWindow() { InitializeComponent(); + } private void RadioButton_toolbar(object sender, RoutedEventArgs e) diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 0ec146f..b2882da 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -61,7 +61,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Curve 的本地化字符串。 /// public static string CurveDiagram { get { @@ -70,7 +70,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Engineer 的本地化字符串。 /// public static string EngineerSet { get { @@ -79,7 +79,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Simulation 的本地化字符串。 /// public static string EquipmentSimulation { get { @@ -88,7 +88,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 History 的本地化字符串。 /// public static string HistoryRecords { get { @@ -97,7 +97,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 I/O 的本地化字符串。 /// public static string InOut { get { @@ -106,7 +106,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Next 的本地化字符串。 /// public static string Next { get { @@ -115,7 +115,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Parameter 的本地化字符串。 /// public static string ParameterSet { get { @@ -124,7 +124,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 back 的本地化字符串。 /// public static string Previous { get { @@ -133,7 +133,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 ProgramGroup 的本地化字符串。 /// public static string Programgroup { get { @@ -142,7 +142,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 System 的本地化字符串。 /// public static string SysSet { get { @@ -151,7 +151,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Process 的本地化字符串。 /// public static string TechnologicalProcess { get { @@ -160,7 +160,7 @@ namespace DyeingComputer.Properties { } /// - /// 查找类似 的本地化字符串。 + /// 查找类似 Worklist 的本地化字符串。 /// public static string WorkOrder { get { diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx index cf3d38a..7ea2447 100644 --- a/Properties/Resources.en-US.resx +++ b/Properties/Resources.en-US.resx @@ -130,7 +130,7 @@ Engineer - Simulation! + Simulation I/O diff --git a/Properties/Resources.ja-JP.resx b/Properties/Resources.ja-JP.resx deleted file mode 100644 index d58980a..0000000 --- a/Properties/Resources.ja-JP.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 86f7d20..5f85504 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -118,39 +118,39 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Curve - + Engineer - + Simulation - + History - + I/O - + Next - + Parameter - + back - + ProgramGroup - + System - + Process - + Worklist \ No newline at end of file diff --git a/Properties/Resources.zh-TW.Designer.cs b/Properties/Resources.zh-TW.Designer.cs new file mode 100644 index 0000000..e69de29 diff --git a/UserClass/SqliteHelper.cs b/UserClass/SqliteHelper.cs new file mode 100644 index 0000000..3d5e037 --- /dev/null +++ b/UserClass/SqliteHelper.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.IO; +using Microsoft.Data.Sqlite; +using System.Data.Common; +using System.Windows.Media.Animation; +using System.Data.SQLite; + +namespace DyeingComputer.UserClass +{ + internal class SqliteHelper + { + + /// + /// 事务的基类 + /// + private DbTransaction DBtrans; + + /// + /// 数据库地址 + /// + private readonly string dbFile = "Data Source=" + Environment.CurrentDirectory + "\\DataBase\\COMPUTER.db;Version3"; + /// + /// 数据库密码 + /// + private readonly string mPassWord; + private readonly string LockName = null; + /// + /// 打开一个SQLite数据库文件,如果文件不存在,则创建(无密码) + /// + /// + /// SQLiteConnection 类 + private SQLiteConnection OpenConnection(string dataFile) + { + if (dataFile == null) + { + throw new ArgumentNullException("dataFiledataFile=null"); + } + if (!File.Exists(dataFile)) + { + SQLiteConnection.CreateFile(dataFile); + } + SQLiteConnection conn = new SQLiteConnection(); + SQLiteConnectionStringBuilder conStr = new SQLiteConnectionStringBuilder + { + DataSource = dataFile + }; + conn.ConnectionString = conStr.ToString(); + conn.Open(); + return conn; + } + + public void qe() + { } + public void SqliteHe() + { OpenConnection(dbFile); } + } +}