Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
66d477cd61
9 files changed
+107
-148
No files matched your search
@@ -7,6 +7,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
namespace DyeingComputer
|
||||
{
|
||||
|
||||
+16
-2
@@ -71,6 +71,11 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.zh-CN.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.zh-TW.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.zh-TW.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserClass\CRCcheck16.cs" />
|
||||
<Compile Include="UserClass\DataGridHelper.cs" />
|
||||
<Compile Include="UserClass\DataTableForToObservableCollection.cs" />
|
||||
@@ -81,6 +86,7 @@
|
||||
<Compile Include="UserClass\LogGing.cs" />
|
||||
<Compile Include="UserClass\MD5check.cs" />
|
||||
<Compile Include="UserClass\PressKey.cs" />
|
||||
<Compile Include="UserClass\SqliteHelper.cs" />
|
||||
<Compile Include="UserClass\StrToInt.cs" />
|
||||
<Compile Include="UserClass\TCPServer.cs" />
|
||||
<Page Include="MainWindow.xaml">
|
||||
@@ -114,7 +120,6 @@
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.en-US.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.ja-JP.resx" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
@@ -123,7 +128,10 @@
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.zh-CN.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.zh-TW.resx" />
|
||||
<EmbeddedResource Include="Properties\Resources.zh-TW.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.zh-TW.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<Resource Include="Fonts\FontAwesome.otf" />
|
||||
<None Include="Fonts\font-awesome-4.7.0.zip" />
|
||||
<None Include="Fonts\font-awesome-4.7.0\fonts\fontawesome-webfont.eot" />
|
||||
@@ -179,12 +187,18 @@
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces">
|
||||
<Version>8.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Data.Sqlite">
|
||||
<Version>8.0.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Buffers">
|
||||
<Version>4.5.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.ComponentModel.Annotations">
|
||||
<Version>5.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Data.SQLite">
|
||||
<Version>1.0.118</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Memory">
|
||||
<Version>4.5.5</Version>
|
||||
</PackageReference>
|
||||
|
||||
+3
-1
@@ -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)
|
||||
|
||||
Generated
+12
-12
@@ -61,7 +61,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 Curve 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CurveDiagram {
|
||||
get {
|
||||
@@ -70,7 +70,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 Engineer 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string EngineerSet {
|
||||
get {
|
||||
@@ -79,7 +79,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 Simulation 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string EquipmentSimulation {
|
||||
get {
|
||||
@@ -88,7 +88,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 History 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string HistoryRecords {
|
||||
get {
|
||||
@@ -97,7 +97,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 I/O 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string InOut {
|
||||
get {
|
||||
@@ -106,7 +106,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 Next 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Next {
|
||||
get {
|
||||
@@ -115,7 +115,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 Parameter 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ParameterSet {
|
||||
get {
|
||||
@@ -124,7 +124,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 back 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Previous {
|
||||
get {
|
||||
@@ -133,7 +133,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 ProgramGroup 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Programgroup {
|
||||
get {
|
||||
@@ -142,7 +142,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 System 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SysSet {
|
||||
get {
|
||||
@@ -151,7 +151,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 Process 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TechnologicalProcess {
|
||||
get {
|
||||
@@ -160,7 +160,7 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 的本地化字符串。
|
||||
/// 查找类似 Worklist 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string WorkOrder {
|
||||
get {
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<value>Engineer</value>
|
||||
</data>
|
||||
<data name="EquipmentSimulation" xml:space="preserve">
|
||||
<value>Simulation!</value>
|
||||
<value>Simulation</value>
|
||||
</data>
|
||||
<data name="InOut" xml:space="preserve">
|
||||
<value>I/O</value>
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+12
-12
@@ -118,39 +118,39 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CurveDiagram" xml:space="preserve">
|
||||
<value />
|
||||
<value>Curve</value>
|
||||
</data>
|
||||
<data name="EngineerSet" xml:space="preserve">
|
||||
<value />
|
||||
<value>Engineer</value>
|
||||
</data>
|
||||
<data name="EquipmentSimulation" xml:space="preserve">
|
||||
<value />
|
||||
<value>Simulation</value>
|
||||
</data>
|
||||
<data name="HistoryRecords" xml:space="preserve">
|
||||
<value />
|
||||
<value>History</value>
|
||||
</data>
|
||||
<data name="InOut" xml:space="preserve">
|
||||
<value />
|
||||
<value>I/O</value>
|
||||
</data>
|
||||
<data name="Next" xml:space="preserve">
|
||||
<value />
|
||||
<value>Next</value>
|
||||
</data>
|
||||
<data name="ParameterSet" xml:space="preserve">
|
||||
<value />
|
||||
<value>Parameter</value>
|
||||
</data>
|
||||
<data name="Previous" xml:space="preserve">
|
||||
<value />
|
||||
<value>back</value>
|
||||
</data>
|
||||
<data name="Programgroup" xml:space="preserve">
|
||||
<value />
|
||||
<value>ProgramGroup</value>
|
||||
</data>
|
||||
<data name="SysSet" xml:space="preserve">
|
||||
<value />
|
||||
<value>System</value>
|
||||
</data>
|
||||
<data name="TechnologicalProcess" xml:space="preserve">
|
||||
<value />
|
||||
<value>Process</value>
|
||||
</data>
|
||||
<data name="WorkOrder" xml:space="preserve">
|
||||
<value />
|
||||
<value>Worklist</value>
|
||||
</data>
|
||||
</root>
|
||||
Whitespace-only changes.
@@ -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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 事务的基类
|
||||
/// </summary>
|
||||
private DbTransaction DBtrans;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库地址
|
||||
/// </summary>
|
||||
private readonly string dbFile = "Data Source=" + Environment.CurrentDirectory + "\\DataBase\\COMPUTER.db;Version3";
|
||||
/// <summary>
|
||||
/// 数据库密码
|
||||
/// </summary>
|
||||
private readonly string mPassWord;
|
||||
private readonly string LockName = null;
|
||||
/// <summary>
|
||||
/// 打开一个SQLite数据库文件,如果文件不存在,则创建(无密码)
|
||||
/// </summary>
|
||||
/// <param name="dataFile"></param>
|
||||
/// <returns>SQLiteConnection 类</returns>
|
||||
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); }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user