diff --git a/SCADA/DataConfig/host.ini b/SCADA/DataConfig/host.ini index b802d79..90e032d 100644 --- a/SCADA/DataConfig/host.ini +++ b/SCADA/DataConfig/host.ini @@ -4,3 +4,4 @@ SERVER=lochost [DATABASE] CONNSTRING=Data Source=.\SQLEXPRESS;Initial Catalog=SCADA;Integrated Security=True ARCHIVE=D:\HDA +TYPE=MSSQL diff --git a/SCADA/Database/mysql.sql b/SCADA/Database/mysql.sql new file mode 100644 index 0000000..7a0b6df --- /dev/null +++ b/SCADA/Database/mysql.sql @@ -0,0 +1,22 @@ +DROP PROCEDURE IF EXISTS `scada`.`InitServer`; + +CREATE DEFINER=`root`@`localhost` PROCEDURE `InitServer`(IN pTYPE int) +BEGIN + IF pTYPE<>1 THEN + SELECT M.DRIVERID,DRIVERNAME,SERVER,TIMEOUT,R.AssemblyName,R.ClassFullName,Spare1,Spare2 FROM META_DRIVER M INNER JOIN RegisterModule R ON M.DRIVERTYPE=R.DriverID; + END IF; + SELECT COUNT(*) FROM META_TAG; + SELECT TAGID,GROUPID,RTRIM(TAGNAME),ADDRESS,DATATYPE,DATASIZE,ARCHIVE,MAXIMUM,MINIMUM,CYCLE FROM META_TAG WHERE ISACTIVE=1; + IF pTYPE<>1 THEN + SELECT DRIVERID,GROUPNAME,GROUPID,UPDATERATE,DEADBAND,ISACTIVE FROM META_GROUP ; + END IF; + IF pTYPE=0 THEN + SELECT SOURCE FROM META_Condition WHERE EVENTTYPE=2; + END IF; + IF pTYPE<>2 THEN + SELECT TYPEID,SOURCE,ALARMTYPE,A.ISENABLED,CONDITIONTYPE,PARA,IFNULL(COMMENT,''),DEADBAND,DELAY,SUBALARMTYPE,Threshold,SEVERITY, + IFNULL(MESSAGE,''),B.ISENABLE FROM META_Condition a LEFT OUTER JOIN META_SUBCONDITION b ON a.TypeID=b.ConditionID WHERE EVENTTYPE<>2; + END IF; + -- LEFT OUTER JOIN META_TAG c ON a.SOURCEID=c.TAGID + SELECT SCALEID,SCALETYPE,EUHI,EULO,RAWHI,RAWLO FROM META_SCALE; +END \ No newline at end of file diff --git a/SCADA/Program/BatchCoreService/DAService.cs b/SCADA/Program/BatchCoreService/DAService.cs index cbdc38f..9a0d219 100644 --- a/SCADA/Program/BatchCoreService/DAService.cs +++ b/SCADA/Program/BatchCoreService/DAService.cs @@ -186,7 +186,7 @@ namespace BatchCoreService if (list != null && list.Count() > 0) { string sql = "SELECT TAGID,DESCRIPTION FROM META_TAG WHERE TAGID IN(" + string.Join(",", list) + ");"; - using (var reader = DataHelper.ExecuteReader(sql)) + using (var reader = DataHelper.Instance.ExecuteReader(sql)) { if (reader != null) { @@ -415,7 +415,7 @@ namespace BatchCoreService void InitServerByDatabase() { - using (var dataReader = DataHelper.ExecuteProcedureReader("InitServer", new SqlParameter("@TYPE", SqlDbType.Int) { Value = 0 })) + using (var dataReader = DataHelper.Instance.ExecuteProcedureReader("InitServer", new SqlParameter("@TYPE", SqlDbType.Int) { Value = 0 })) { if (dataReader == null) return;// Stopwatch sw = Stopwatch.StartNew(); while (dataReader.Read()) @@ -1178,37 +1178,12 @@ namespace BatchCoreService lock (_hdaRoot) { if (_hda.Count == 0) return; - //_array.CopyTo(data, 0); - SqlConnection m_Conn = new SqlConnection(DataHelper.ConnectString); - SqlTransaction sqlT = null; - try + if (DataHelper.Instance.BulkCopy(new HDASqlReader(_hda, this), "Log_HData", + string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP]>'{0}'", _hda[0].TimeStamp.ToString()))) { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - sqlT = m_Conn.BeginTransaction(); - SqlCommand cmd = new SqlCommand(string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP]>'{0}'", - _hda[0].TimeStamp.ToString()), m_Conn); - cmd.Transaction = sqlT; - cmd.ExecuteNonQuery(); - HDASqlReader reader = new HDASqlReader(_hda, this); - SqlBulkCopy copy = new SqlBulkCopy(m_Conn, SqlBulkCopyOptions.Default, sqlT); - copy.DestinationTableName = "Log_HData"; - copy.BulkCopyTimeout = 100000; - //copy.BatchSize = _capacity; - copy.WriteToServer(reader); - //Clear(); - sqlT.Commit(); - m_Conn.Close(); _hda.Clear(); _hdastart = DateTime.Now; } - catch (Exception e) - { - if (sqlT != null) - sqlT.Rollback(); - m_Conn.Close(); - DataHelper.AddErrorLog(e); - } } } @@ -1216,35 +1191,8 @@ namespace BatchCoreService { var tempdata = _hda.ToArray(); if (tempdata.Length == 0) return true; - SqlConnection m_Conn = new SqlConnection(DataHelper.ConnectString); - SqlTransaction sqlT = null; - try - { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - sqlT = m_Conn.BeginTransaction(); - SqlCommand cmd = new SqlCommand(string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP] BETWEEN '{0}' AND '{1}'", - startTime, endTime), m_Conn); - cmd.Transaction = sqlT; - cmd.ExecuteNonQuery(); - SqlBulkCopy copy = new SqlBulkCopy(m_Conn, SqlBulkCopyOptions.Default, sqlT); - copy.DestinationTableName = "Log_HData"; - copy.BulkCopyTimeout = 100000; - //copy.BatchSize = _capacity; - copy.WriteToServer(new HDASqlReader(GetData(tempdata, startTime, endTime), this)); - //Clear(); - sqlT.Commit(); - m_Conn.Close(); - return true; - } - catch (Exception e) - { - if (sqlT != null) - sqlT.Rollback(); - m_Conn.Close(); - DataHelper.AddErrorLog(e); - return false; - } + return DataHelper.Instance.BulkCopy(new HDASqlReader(GetData(tempdata, startTime, endTime), this), "Log_HData", + string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP] BETWEEN '{0}' AND '{1}'", startTime, endTime)); } public void OnUpdate(object stateInfo) @@ -1258,40 +1206,11 @@ namespace BatchCoreService //Reverse(data); DateTime start = _hda[0].TimeStamp; //_array.CopyTo(data, 0); - SqlConnection m_Conn = new SqlConnection(DataHelper.ConnectString); - SqlTransaction sqlT = null; - try - { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - sqlT = m_Conn.BeginTransaction(); - SqlCommand cmd = new SqlCommand(string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP]>'{0}'", - start.ToString()), m_Conn); - cmd.Transaction = sqlT; - cmd.ExecuteNonQuery(); - HDASqlReader reader = new HDASqlReader(_hda, this); - SqlBulkCopy copy = new SqlBulkCopy(m_Conn, SqlBulkCopyOptions.Default, sqlT); - copy.DestinationTableName = "Log_HData"; - copy.BulkCopyTimeout = 100000; - //copy.BatchSize = _capacity; - copy.WriteToServer(reader);//如果写入失败,考虑不能无限增加线程数 - //Clear(); - sqlT.Commit(); - m_Conn.Close(); + if (DataHelper.Instance.BulkCopy(new HDASqlReader(_hda, this), "Log_HData", + string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP]>'{0}'", start.ToString()))) _hdastart = DateTime.Now; - } - catch (Exception e) - { - if (sqlT != null) - sqlT.Rollback(); - m_Conn.Close(); - ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(this.SaveCachedData), _hda.ToArray()); - DataHelper.AddErrorLog(e); - } - finally - { - _hda.Clear(); - } + else ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(this.SaveCachedData), _hda.ToArray()); + _hda.Clear(); } } } @@ -1307,35 +1226,12 @@ namespace BatchCoreService while (true) { if (count >= 5) return; - SqlConnection m_Conn = new SqlConnection(DataHelper.ConnectString); - SqlTransaction sqlT = null; - try + if (DataHelper.Instance.BulkCopy(new HDASqlReader(tempData, this), "Log_HData", + string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP] BETWEEN '{0}' AND '{1}'", + startTime, endTime))) { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - sqlT = m_Conn.BeginTransaction(); - SqlCommand cmd = new SqlCommand(string.Format("DELETE FROM Log_HData WHERE [TIMESTAMP] BETWEEN '{0}' AND '{1}'", - startTime, endTime), m_Conn); - cmd.Transaction = sqlT; - cmd.ExecuteNonQuery(); - SqlBulkCopy copy = new SqlBulkCopy(m_Conn, SqlBulkCopyOptions.Default, sqlT); - copy.DestinationTableName = "Log_HData"; - copy.BulkCopyTimeout = 100000; - //copy.BatchSize = _capacity; - copy.WriteToServer(new HDASqlReader(tempData, this)); - //Clear(); - sqlT.Commit(); - m_Conn.Close(); stateInfo = null; _hdastart = DateTime.Now; - return; - } - catch (Exception e) - { - if (sqlT != null) - sqlT.Rollback(); - m_Conn.Close(); - DataHelper.AddErrorLog(e); } count++; Thread.Sleep(CYCLE2); @@ -1361,10 +1257,10 @@ namespace BatchCoreService void OnValueChanged(object sender, ValueChangedEventArgs e) { var tag = sender as ITag; - DataHelper.ExecuteStoredProcedure("AddEventLog", - new SqlParameter("@StartTime", SqlDbType.DateTime) { SqlValue = tag.TimeStamp }, - new SqlParameter("@Source", SqlDbType.NVarChar, 50) { SqlValue = tag.ID.ToString() }, - new SqlParameter("@Comment", SqlDbType.NVarChar, 50) { SqlValue = tag.ToString() }); + DataHelper.Instance.ExecuteStoredProcedure("AddEventLog", + DataHelper.CreateParam("@StartTime", SqlDbType.DateTime, tag.TimeStamp), + DataHelper.CreateParam("@Source", SqlDbType.NVarChar, tag.ID.ToString(), 50), + DataHelper.CreateParam("@StartTime", SqlDbType.NVarChar, tag.ToString(), 50)); } public HistoryData[] BatchRead(DataSource source, bool sync, params ITag[] itemArray) @@ -1485,9 +1381,7 @@ namespace BatchCoreService byte[] dt = BitConverter.GetBytes(id); sendBuffer[j++] = dt[0]; sendBuffer[j++] = dt[1]; - var index = GetItemProperties(id); - if (index < 0 || index >= _list.Count) continue; - switch (_list[index].DataType) + switch (_list[GetItemProperties(id)].DataType) { case DataType.BOOL: sendBuffer[j++] = 1; @@ -1805,23 +1699,13 @@ namespace BatchCoreService private bool SaveAlarm() { if (_alarmList.Count == 0) return true; - try + if (DataHelper.Instance.BulkCopy(new AlarmDataReader(_alarmList), "Log_Alarm", null, SqlBulkCopyOptions.KeepIdentity)) { - AlarmDataReader reader = new AlarmDataReader(_alarmList); - using (SqlBulkCopy bulk = new SqlBulkCopy(DataHelper.ConnectString, SqlBulkCopyOptions.KeepIdentity)) - { - bulk.DestinationTableName = "Log_Alarm"; - bulk.WriteToServer(reader); - } _alarmList.Clear(); _alarmstart = DateTime.Now; return true; } - catch (Exception e) - { - AddErrorLog(e); - return false; - } + return false; } public ICondition GetCondition(string tagName, AlarmType type) @@ -2005,7 +1889,7 @@ namespace BatchCoreService public bool ReadExpression(string expression) { Func func; - if (_exprdict.TryGetValue(expression, out func)) + if (_exprdict.TryGetValue(expression, out func)) { return func(); } diff --git a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.exe.config b/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.exe.config deleted file mode 100644 index 88a4443..0000000 --- a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.exe.config +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe b/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe deleted file mode 100644 index 681ab77..0000000 Binary files a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe and /dev/null differ diff --git a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe.config b/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe.config deleted file mode 100644 index 88a4443..0000000 --- a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe.config +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe.manifest b/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe.manifest deleted file mode 100644 index 061c9ca..0000000 --- a/SCADA/Program/BatchCoreTest/bin/Debug/BatchCoreTest.vshost.exe.manifest +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.FileListAbsolute.txt b/SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.FileListAbsolute.txt deleted file mode 100644 index 7f441ff..0000000 --- a/SCADA/Program/BatchCoreTest/obj/x86/Debug/BatchCoreTest.csproj.FileListAbsolute.txt +++ /dev/null @@ -1 +0,0 @@ -C:\Users\Yinan\Documents\Github\SharpSCADA\SCADA\Program\BatchCoreTest\bin\Debug\BatchCoreTest.exe.config diff --git a/SCADA/Program/CoreTest/AlarmSet.xaml.cs b/SCADA/Program/CoreTest/AlarmSet.xaml.cs index df2aeb6..8d34b92 100644 --- a/SCADA/Program/CoreTest/AlarmSet.xaml.cs +++ b/SCADA/Program/CoreTest/AlarmSet.xaml.cs @@ -1,12 +1,12 @@ -using System; +using DatabaseLib; +using DataService; +using System; using System.Collections.Generic; using System.Collections.Specialized; -using System.Data.SqlClient; +using System.Data; using System.Windows; using System.Windows.Input; using System.Windows.Media; -using DatabaseLib; -using DataService; namespace CoreTest { @@ -66,7 +66,9 @@ namespace CoreTest this.CommandBindings.Add(new CommandBinding(MyCommands.Query, (sender, e) => { List alist = new List(); - using (var reader = DataHelper.ExecuteProcedureReader("GetAlarm", new SqlParameter("@StartTime", dtstart.Value.Value), new SqlParameter("@EndTime", dtend.Value.Value))) + using (var reader = DataHelper.Instance.ExecuteProcedureReader("GetAlarm", + DataHelper.CreateParam("@StartTime", SqlDbType.DateTime, dtstart.Value.Value), + DataHelper.CreateParam("@EndTime", SqlDbType.DateTime, dtend.Value.Value))) { if (reader != null) { diff --git a/SCADA/Program/CoreTest/ClientService.cs b/SCADA/Program/CoreTest/ClientService.cs index b18111e..3ee99b1 100644 --- a/SCADA/Program/CoreTest/ClientService.cs +++ b/SCADA/Program/CoreTest/ClientService.cs @@ -155,7 +155,7 @@ namespace CoreTest { try { - using (var dataReader = DataHelper.ExecuteProcedureReader("InitServer", new SqlParameter("@TYPE", 1))) + using (var dataReader = DataHelper.Instance.ExecuteProcedureReader("InitServer", DataHelper.CreateParam("@TYPE", System.Data.SqlDbType.Int, 1))) { if (dataReader == null) Environment.Exit(0); //dataReader.Read(); @@ -784,7 +784,7 @@ namespace CoreTest if (list != null && list.Count() > 0) { string sql = "SELECT TAGID,DESCRIPTION FROM META_TAG WHERE TAGID IN(" + string.Join(",", list) + ");"; - using (var reader = DataHelper.ExecuteReader(sql)) + using (var reader = DataHelper.Instance.ExecuteReader(sql)) { if (reader != null) { diff --git a/SCADA/Program/CoreTest/MemberPrincipal.cs b/SCADA/Program/CoreTest/MemberPrincipal.cs index 2039fce..7c75a7f 100644 --- a/SCADA/Program/CoreTest/MemberPrincipal.cs +++ b/SCADA/Program/CoreTest/MemberPrincipal.cs @@ -35,7 +35,7 @@ namespace CoreTest public MemberPrincipal(MemberIdentity identity) { _identity = identity; - using (var reader = DataHelper.ExecuteReader("SELECT ROLE FROM Membership WHERE UserName='" + + using (var reader = DataHelper.Instance.ExecuteReader("SELECT ROLE FROM Membership WHERE UserName='" + _identity.Name + "'")) { if (reader != null) @@ -92,7 +92,7 @@ namespace CoreTest return -1; if (IsExceeded) return -4; string sql = "SELECT Password FROM dbo.Membership WHERE Username='" + _name + "'"; - using (var reader = DataHelper.ExecuteReader(sql)) + using (var reader = DataHelper.Instance.ExecuteReader(sql)) { if (reader != null) { @@ -143,7 +143,7 @@ namespace CoreTest string sql = string.Format("DELETE FROM dbo.Membership WHERE UserName='{0}';" + "INSERT INTO dbo.Membership(UserName,Password,ROLE) VALUES('{0}','{1}',{2})", name, EncodePassword(password), (int)role); - return DataHelper.ExecuteNonQuery(sql); + return DataHelper.Instance.ExecuteNonQuery(sql); } public void ChangeUser(string newName) @@ -163,7 +163,7 @@ namespace CoreTest if (newPassword.Length > 10) return -7; int result = 0; string sql = "SELECT Password FROM dbo.Membership WHERE Username='" + _name + "'"; - using (var reader = DataHelper.ExecuteReader(sql)) + using (var reader = DataHelper.Instance.ExecuteReader(sql)) { if (reader != null) { @@ -176,7 +176,7 @@ namespace CoreTest { sql = "UPDATE dbo.Membership SET Password='" + EncodePassword(newPassword) + "' WHERE Username='" + _name + "'"; - result = DataHelper.ExecuteNonQuery(sql); + result = DataHelper.Instance.ExecuteNonQuery(sql); if (result >= 0) result = 0; } else diff --git a/SCADA/Program/CoreTest/SystemLog.cs b/SCADA/Program/CoreTest/SystemLog.cs index 7289ee4..6ea430b 100644 --- a/SCADA/Program/CoreTest/SystemLog.cs +++ b/SCADA/Program/CoreTest/SystemLog.cs @@ -76,7 +76,7 @@ namespace CoreTest { string sql = string.Format("INSERT INTO dbo.LOG_EVENT(EVENTTYPE,SEVERITY,ACTIVETIME,SOURCE,COMMENT) VALUES({0},{1},'{2}','{3}','{4}');", (int)log._eventtype, (int)log._severity, log._time, log._source, log._comment); - return DataHelper.ExecuteNonQuery(sql); + return DataHelper.Instance.ExecuteNonQuery(sql); } public static SystemLog FindFirstEvent(EventType eventtype, DateTime? firsttime = null, string source = null) @@ -85,7 +85,7 @@ namespace CoreTest string cond2 = string.IsNullOrEmpty(source) ? "" : " AND SOURCE='" + source + "'"; string sql = string.Format("SELECT TOP 1 SEVERITY,ACTIVETIME,COMMENT FROM dbo.LOG_EVENT WHERE EVENTTYPE={0} {1} {2} ORDER BY ACTIVETIME", (int)eventtype, cond1, cond2); - using (var reader = DataHelper.ExecuteReader(sql)) + using (var reader = DataHelper.Instance.ExecuteReader(sql)) { while (reader.Read()) { @@ -101,7 +101,7 @@ namespace CoreTest string cond2 = string.IsNullOrEmpty(source) ? "" : " AND SOURCE='" + source + "'"; string sql = string.Format("SELECT TOP 1 SEVERITY,ACTIVETIME,COMMENT FROM dbo.LOG_EVENT WHERE EVENTTYPE={0} {1} {2} ORDER BY ACTIVETIME DESC", (int)eventtype, cond1, cond2); - using (var reader = DataHelper.ExecuteReader(sql)) + using (var reader = DataHelper.Instance.ExecuteReader(sql)) { while (reader.Read()) { @@ -119,7 +119,7 @@ namespace CoreTest string cond3 = endtime == null ? "" : " AND ACTIVETIME<='" + endtime + "'"; string sql = string.Format("SELECT SEVERITY,ACTIVETIME,COMMENT FROM dbo.LOG_EVENT WHERE EVENTTYPE={0} {1} {2} {3} ORDER BY ACTIVETIME", (int)eventtype, cond1, cond2, cond3); - using (var reader = DataHelper.ExecuteReader(sql)) + using (var reader = DataHelper.Instance.ExecuteReader(sql)) { while (reader.Read()) { @@ -131,12 +131,12 @@ namespace CoreTest public static void GetEventTime(EventType eventtype, string source, string comment, out DateTime? startime, out DateTime? endtime) { - var parm1 = new SqlParameter("@STARTTIME", SqlDbType.DateTime) { Direction = ParameterDirection.Output }; - var parm2 = new SqlParameter("@ENDTIME", SqlDbType.DateTime) { Direction = ParameterDirection.Output }; - if (DataHelper.ExecuteStoredProcedure("GetEventTime", - new SqlParameter("@EVENTTYPE", SqlDbType.Int) { SqlValue = (int)eventtype }, - new SqlParameter("@SOURCE", SqlDbType.NVarChar, 50) { SqlValue = source }, - new SqlParameter("@COMMENT", SqlDbType.NVarChar, 50) { SqlValue = comment }, + var parm1 = DataHelper.CreateParam("@STARTTIME", SqlDbType.DateTime, null, 0, ParameterDirection.Output); + var parm2 = DataHelper.CreateParam("@ENDTIME", SqlDbType.DateTime, null, 0, ParameterDirection.Output); + if (DataHelper.Instance.ExecuteStoredProcedure("GetEventTime", + DataHelper.CreateParam("@EVENTTYPE", SqlDbType.Int, (int)eventtype), + DataHelper.CreateParam("@SOURCE", SqlDbType.NVarChar, source, 50), + DataHelper.CreateParam("@COMMENT", SqlDbType.NVarChar, comment, 50), parm1, parm2) >= 0) { if (parm1.Value == DBNull.Value) diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/AlarmSet.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/AlarmSet.g.i.cs deleted file mode 100644 index e35074f..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/AlarmSet.g.i.cs +++ /dev/null @@ -1,199 +0,0 @@ -#pragma checksum "..\..\..\AlarmSet.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "59BFA4F8D2CBCFAA5AAF46E345571EEF" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using CoreTest; -using Microsoft.Windows.Controls; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// AlarmSet - /// - public partial class AlarmSet : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 20 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TabControl tab1; - - #line default - #line hidden - - - #line 22 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.DataGrid list0; - - #line default - #line hidden - - - #line 45 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ListView list2; - - #line default - #line hidden - - - #line 65 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ToolBar toolBar1; - - #line default - #line hidden - - - #line 70 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.DateTimePicker dtstart; - - #line default - #line hidden - - - #line 72 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.DateTimePicker dtend; - - #line default - #line hidden - - - #line 75 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.ColorPicker colorpicker; - - #line default - #line hidden - - - #line 77 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ListView list1; - - #line default - #line hidden - - - #line 94 "..\..\..\AlarmSet.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ListBox list3; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/alarmset.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\AlarmSet.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - - #line 6 "..\..\..\AlarmSet.xaml" - ((CoreTest.AlarmSet)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); - - #line default - #line hidden - - #line 6 "..\..\..\AlarmSet.xaml" - ((CoreTest.AlarmSet)(target)).Closed += new System.EventHandler(this.Window_Closed); - - #line default - #line hidden - return; - case 2: - this.tab1 = ((System.Windows.Controls.TabControl)(target)); - return; - case 3: - this.list0 = ((System.Windows.Controls.DataGrid)(target)); - return; - case 4: - this.list2 = ((System.Windows.Controls.ListView)(target)); - return; - case 5: - this.toolBar1 = ((System.Windows.Controls.ToolBar)(target)); - return; - case 6: - this.dtstart = ((Microsoft.Windows.Controls.DateTimePicker)(target)); - return; - case 7: - this.dtend = ((Microsoft.Windows.Controls.DateTimePicker)(target)); - return; - case 8: - this.colorpicker = ((Microsoft.Windows.Controls.ColorPicker)(target)); - - #line 75 "..\..\..\AlarmSet.xaml" - this.colorpicker.SelectedColorChanged += new System.Windows.RoutedPropertyChangedEventHandler(this.ColorPicker_SelectedColorChanged); - - #line default - #line hidden - return; - case 9: - this.list1 = ((System.Windows.Controls.ListView)(target)); - return; - case 10: - this.list3 = ((System.Windows.Controls.ListBox)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/App.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/App.g.i.cs deleted file mode 100644 index 1aa37be..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/App.g.i.cs +++ /dev/null @@ -1,78 +0,0 @@ -#pragma checksum "..\..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "87C752EAB1D8111DD0461A1A34A553FD" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using Microsoft.Windows.Controls; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// App - /// - public partial class App : System.Windows.Application { - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/app.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\App.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - /// - /// Application Entry Point. - /// - [System.STAThreadAttribute()] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public static void Main() { - CoreTest.App app = new CoreTest.App(); - app.InitializeComponent(); - app.Run(); - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs deleted file mode 100644 index 136dd1b..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs +++ /dev/null @@ -1,62 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 XamlGeneratedNamespace { - - - /// - /// GeneratedInternalTypeHelper - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { - - /// - /// CreateInstance - /// - protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { - return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) - | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); - } - - /// - /// GetPropertyValue - /// - protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { - return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); - } - - /// - /// SetPropertyValue - /// - protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { - propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); - } - - /// - /// CreateDelegate - /// - protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { - return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod - | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { - delegateType, - handler}, null))); - } - - /// - /// AddEventHandler - /// - protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { - eventInfo.AddEventHandler(target, handler); - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/Guage.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/Guage.g.i.cs deleted file mode 100644 index ddfa7fd..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/Guage.g.i.cs +++ /dev/null @@ -1,113 +0,0 @@ -#pragma checksum "..\..\..\Guage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "5243A05AE807D390F1D9E6B6C6368646" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using CoreTest; -using HMIControl; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// Guage - /// - public partial class Guage : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 11 "..\..\..\Guage.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HVScale hVScale1; - - #line default - #line hidden - - - #line 13 "..\..\..\Guage.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HVValueIndicator hVValueIndicator1; - - #line default - #line hidden - - - #line 14 "..\..\..\Guage.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Frame frame1; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/guage.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\Guage.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - this.hVScale1 = ((HMIControl.HVScale)(target)); - return; - case 2: - this.hVValueIndicator1 = ((HMIControl.HVValueIndicator)(target)); - return; - case 3: - this.frame1 = ((HMIControl.Frame)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/Login.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/Login.g.i.cs deleted file mode 100644 index fc2fcf0..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/Login.g.i.cs +++ /dev/null @@ -1,203 +0,0 @@ -#pragma checksum "..\..\..\Login.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "375A0423B4D66B38B66903C58FC0AA60" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// Login - /// - public partial class Login : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 10 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Button button1; - - #line default - #line hidden - - - #line 11 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Button button2; - - #line default - #line hidden - - - #line 12 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock2; - - #line default - #line hidden - - - #line 13 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock3; - - #line default - #line hidden - - - #line 14 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBox txtUser; - - #line default - #line hidden - - - #line 15 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock4; - - #line default - #line hidden - - - #line 16 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.PasswordBox txtPassword; - - #line default - #line hidden - - - #line 17 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock txterr; - - #line default - #line hidden - - - #line 18 "..\..\..\Login.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Button button3; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/login.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\Login.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - - #line 4 "..\..\..\Login.xaml" - ((CoreTest.Login)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); - - #line default - #line hidden - return; - case 2: - this.button1 = ((System.Windows.Controls.Button)(target)); - - #line 10 "..\..\..\Login.xaml" - this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click); - - #line default - #line hidden - return; - case 3: - this.button2 = ((System.Windows.Controls.Button)(target)); - - #line 11 "..\..\..\Login.xaml" - this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click); - - #line default - #line hidden - return; - case 4: - this.textBlock2 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 5: - this.textBlock3 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 6: - this.txtUser = ((System.Windows.Controls.TextBox)(target)); - return; - case 7: - this.textBlock4 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 8: - this.txtPassword = ((System.Windows.Controls.PasswordBox)(target)); - return; - case 9: - this.txterr = ((System.Windows.Controls.TextBlock)(target)); - return; - case 10: - this.button3 = ((System.Windows.Controls.Button)(target)); - - #line 19 "..\..\..\Login.xaml" - this.button3.Click += new System.Windows.RoutedEventHandler(this.button3_Click); - - #line default - #line hidden - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/MainWindow.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/MainWindow.g.i.cs deleted file mode 100644 index 6c1e03c..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/MainWindow.g.i.cs +++ /dev/null @@ -1,320 +0,0 @@ -#pragma checksum "..\..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "43579B96290DBB82B39AB2820CBC1A0C" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using CoreTest; -using HMIControl; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// MainWindow - /// - public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 73 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Grid grd1; - - #line default - #line hidden - - - #line 79 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Label label1; - - #line default - #line hidden - - - #line 80 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Label label2; - - #line default - #line hidden - - - #line 82 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Border cvs1; - - #line default - #line hidden - - - #line 84 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ToolBarTray toolBarTray; - - #line default - #line hidden - - - #line 106 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMIButton btngrind1; - - #line default - #line hidden - - - #line 107 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMIButton btngrind2; - - #line default - #line hidden - - - #line 111 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ToolBarTray cvs3; - - #line default - #line hidden - - - #line 113 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMIButton btnRT; - - #line default - #line hidden - - - #line 114 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMIButton btnTrend; - - #line default - #line hidden - - - #line 115 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMIButton btnTag; - - #line default - #line hidden - - - #line 116 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMIButton hMIButton2; - - #line default - #line hidden - - - #line 117 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMIButton hMIButton7; - - #line default - #line hidden - - - #line 120 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Canvas statusbar; - - #line default - #line hidden - - - #line 121 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMILable txtuser; - - #line default - #line hidden - - - #line 122 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.HMILable txttime; - - #line default - #line hidden - - - #line 123 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Button btnStart; - - #line default - #line hidden - - - #line 125 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Canvas cvsAlarm; - - #line default - #line hidden - - - #line 126 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock txtAlarm; - - #line default - #line hidden - - - #line 129 "..\..\..\MainWindow.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Shapes.Ellipse p1_lamp1; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/mainwindow.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\MainWindow.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - - #line 7 "..\..\..\MainWindow.xaml" - ((CoreTest.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); - - #line default - #line hidden - return; - case 2: - this.grd1 = ((System.Windows.Controls.Grid)(target)); - return; - case 3: - this.label1 = ((System.Windows.Controls.Label)(target)); - return; - case 4: - this.label2 = ((System.Windows.Controls.Label)(target)); - return; - case 5: - this.cvs1 = ((System.Windows.Controls.Border)(target)); - return; - case 6: - this.toolBarTray = ((System.Windows.Controls.ToolBarTray)(target)); - return; - case 7: - this.btngrind1 = ((HMIControl.HMIButton)(target)); - return; - case 8: - this.btngrind2 = ((HMIControl.HMIButton)(target)); - return; - case 9: - this.cvs3 = ((System.Windows.Controls.ToolBarTray)(target)); - return; - case 10: - this.btnRT = ((HMIControl.HMIButton)(target)); - return; - case 11: - this.btnTrend = ((HMIControl.HMIButton)(target)); - return; - case 12: - this.btnTag = ((HMIControl.HMIButton)(target)); - return; - case 13: - this.hMIButton2 = ((HMIControl.HMIButton)(target)); - return; - case 14: - this.hMIButton7 = ((HMIControl.HMIButton)(target)); - - #line 117 "..\..\..\MainWindow.xaml" - this.hMIButton7.Click += new System.Windows.RoutedEventHandler(this.hMIButton7_Click); - - #line default - #line hidden - return; - case 15: - this.statusbar = ((System.Windows.Controls.Canvas)(target)); - return; - case 16: - this.txtuser = ((HMIControl.HMILable)(target)); - return; - case 17: - this.txttime = ((HMIControl.HMILable)(target)); - return; - case 18: - this.btnStart = ((System.Windows.Controls.Button)(target)); - - #line 123 "..\..\..\MainWindow.xaml" - this.btnStart.Click += new System.Windows.RoutedEventHandler(this.btnStart_Click); - - #line default - #line hidden - return; - case 19: - this.cvsAlarm = ((System.Windows.Controls.Canvas)(target)); - return; - case 20: - this.txtAlarm = ((System.Windows.Controls.TextBlock)(target)); - return; - case 21: - this.p1_lamp1 = ((System.Windows.Shapes.Ellipse)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/MaterialRecivingLine.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/MaterialRecivingLine.g.i.cs deleted file mode 100644 index 226d00d..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/MaterialRecivingLine.g.i.cs +++ /dev/null @@ -1,1169 +0,0 @@ -#pragma checksum "..\..\..\MaterialRecivingLine.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "CE67AEE956DAC38D8ED6BB721B8FC695" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using HMIControl; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// MaterialRecivingLine - /// - public partial class MaterialRecivingLine : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { - - - #line 7 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal CoreTest.MaterialRecivingLine MaterialRecivingLine1; - - #line default - #line hidden - - - #line 9 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Canvas cvs1; - - #line default - #line hidden - - - #line 10 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock productline; - - #line default - #line hidden - - - #line 11 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ManualAddControl manualAddControl1; - - #line default - #line hidden - - - #line 12 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor1; - - #line default - #line hidden - - - #line 14 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ManualAddControl manualAddControl2; - - #line default - #line hidden - - - #line 15 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor2; - - #line default - #line hidden - - - #line 17 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Elevator elevator1; - - #line default - #line hidden - - - #line 18 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Elevator elevator2; - - #line default - #line hidden - - - #line 19 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Elevator elevator3; - - #line default - #line hidden - - - #line 20 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin1; - - #line default - #line hidden - - - #line 21 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin2; - - #line default - #line hidden - - - #line 22 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin3; - - #line default - #line hidden - - - #line 23 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin4; - - #line default - #line hidden - - - #line 24 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin5; - - #line default - #line hidden - - - #line 25 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin6; - - #line default - #line hidden - - - #line 26 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.MagnetCleaner magnetCleaner1; - - #line default - #line hidden - - - #line 27 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.MagnetCleaner magnetCleaner2; - - #line default - #line hidden - - - #line 28 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.MagnetCleaner magnetCleaner3; - - #line default - #line hidden - - - #line 29 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.PreCleaner preCleaner1; - - #line default - #line hidden - - - #line 30 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.PreCleaner preCleaner2; - - #line default - #line hidden - - - #line 31 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor3; - - #line default - #line hidden - - - #line 32 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Divert divert1; - - #line default - #line hidden - - - #line 33 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FourWays fourWays1; - - #line default - #line hidden - - - #line 34 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor4; - - #line default - #line hidden - - - #line 35 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo1; - - #line default - #line hidden - - - #line 47 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo2; - - #line default - #line hidden - - - #line 48 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo3; - - #line default - #line hidden - - - #line 49 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo4; - - #line default - #line hidden - - - #line 50 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo5; - - #line default - #line hidden - - - #line 51 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo6; - - #line default - #line hidden - - - #line 57 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo7; - - #line default - #line hidden - - - #line 61 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SelectSwitch selectSwitch1; - - #line default - #line hidden - - - #line 62 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SelectSwitch selectSwitch3; - - #line default - #line hidden - - - #line 63 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo8; - - #line default - #line hidden - - - #line 64 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo9; - - #line default - #line hidden - - - #line 67 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo10; - - #line default - #line hidden - - - #line 69 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo11; - - #line default - #line hidden - - - #line 71 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo13; - - #line default - #line hidden - - - #line 72 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate6; - - #line default - #line hidden - - - #line 73 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate1; - - #line default - #line hidden - - - #line 74 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate2; - - #line default - #line hidden - - - #line 75 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate3; - - #line default - #line hidden - - - #line 76 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate4; - - #line default - #line hidden - - - #line 77 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate5; - - #line default - #line hidden - - - #line 78 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate7; - - #line default - #line hidden - - - #line 79 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo12; - - #line default - #line hidden - - - #line 81 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin7; - - #line default - #line hidden - - - #line 82 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin8; - - #line default - #line hidden - - - #line 83 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin9; - - #line default - #line hidden - - - #line 84 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin10; - - #line default - #line hidden - - - #line 85 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin11; - - #line default - #line hidden - - - #line 86 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.BufferBin bufferBin12; - - #line default - #line hidden - - - #line 87 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Elevator elevator4; - - #line default - #line hidden - - - #line 88 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ManualAddControl manualAddControl3; - - #line default - #line hidden - - - #line 89 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor5; - - #line default - #line hidden - - - #line 91 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo14; - - #line default - #line hidden - - - #line 93 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Divert divert2; - - #line default - #line hidden - - - #line 94 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.PreCleaner preCleaner3; - - #line default - #line hidden - - - #line 95 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.MagnetCleaner magnetCleaner4; - - #line default - #line hidden - - - #line 96 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor6; - - #line default - #line hidden - - - #line 98 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo15; - - #line default - #line hidden - - - #line 101 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate9; - - #line default - #line hidden - - - #line 102 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate10; - - #line default - #line hidden - - - #line 103 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate11; - - #line default - #line hidden - - - #line 104 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate12; - - #line default - #line hidden - - - #line 105 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate13; - - #line default - #line hidden - - - #line 106 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate14; - - #line default - #line hidden - - - #line 115 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor7; - - #line default - #line hidden - - - #line 124 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock2; - - #line default - #line hidden - - - #line 125 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock1; - - #line default - #line hidden - - - #line 126 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock3; - - #line default - #line hidden - - - #line 127 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock4; - - #line default - #line hidden - - - #line 128 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock5; - - #line default - #line hidden - - - #line 129 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock6; - - #line default - #line hidden - - - #line 130 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock7; - - #line default - #line hidden - - - #line 131 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock8; - - #line default - #line hidden - - - #line 132 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock9; - - #line default - #line hidden - - - #line 133 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock10; - - #line default - #line hidden - - - #line 134 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock11; - - #line default - #line hidden - - - #line 135 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock12; - - #line default - #line hidden - - - #line 136 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock13; - - #line default - #line hidden - - - #line 137 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock14; - - #line default - #line hidden - - - #line 138 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock15; - - #line default - #line hidden - - - #line 139 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock16; - - #line default - #line hidden - - - #line 140 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock17; - - #line default - #line hidden - - - #line 141 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock18; - - #line default - #line hidden - - - #line 142 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock20; - - #line default - #line hidden - - - #line 143 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock21; - - #line default - #line hidden - - - #line 144 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock22; - - #line default - #line hidden - - - #line 145 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock23; - - #line default - #line hidden - - - #line 146 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock24; - - #line default - #line hidden - - - #line 147 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock25; - - #line default - #line hidden - - - #line 148 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock26; - - #line default - #line hidden - - - #line 149 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock27; - - #line default - #line hidden - - - #line 150 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock28; - - #line default - #line hidden - - - #line 151 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock29; - - #line default - #line hidden - - - #line 152 "..\..\..\MaterialRecivingLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock textBlock30; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/materialrecivingline.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\MaterialRecivingLine.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - this.MaterialRecivingLine1 = ((CoreTest.MaterialRecivingLine)(target)); - - #line 8 "..\..\..\MaterialRecivingLine.xaml" - this.MaterialRecivingLine1.Loaded += new System.Windows.RoutedEventHandler(this.HMI_Loaded); - - #line default - #line hidden - - #line 8 "..\..\..\MaterialRecivingLine.xaml" - this.MaterialRecivingLine1.Unloaded += new System.Windows.RoutedEventHandler(this.HMI_Unloaded); - - #line default - #line hidden - return; - case 2: - this.cvs1 = ((System.Windows.Controls.Canvas)(target)); - return; - case 3: - this.productline = ((System.Windows.Controls.TextBlock)(target)); - return; - case 4: - this.manualAddControl1 = ((HMIControl.ManualAddControl)(target)); - return; - case 5: - this.chainConveyor1 = ((HMIControl.ChainConveyor)(target)); - return; - case 6: - this.manualAddControl2 = ((HMIControl.ManualAddControl)(target)); - return; - case 7: - this.chainConveyor2 = ((HMIControl.ChainConveyor)(target)); - return; - case 8: - this.elevator1 = ((HMIControl.Elevator)(target)); - return; - case 9: - this.elevator2 = ((HMIControl.Elevator)(target)); - return; - case 10: - this.elevator3 = ((HMIControl.Elevator)(target)); - return; - case 11: - this.bufferBin1 = ((HMIControl.BufferBin)(target)); - return; - case 12: - this.bufferBin2 = ((HMIControl.BufferBin)(target)); - return; - case 13: - this.bufferBin3 = ((HMIControl.BufferBin)(target)); - return; - case 14: - this.bufferBin4 = ((HMIControl.BufferBin)(target)); - return; - case 15: - this.bufferBin5 = ((HMIControl.BufferBin)(target)); - return; - case 16: - this.bufferBin6 = ((HMIControl.BufferBin)(target)); - return; - case 17: - this.magnetCleaner1 = ((HMIControl.MagnetCleaner)(target)); - return; - case 18: - this.magnetCleaner2 = ((HMIControl.MagnetCleaner)(target)); - return; - case 19: - this.magnetCleaner3 = ((HMIControl.MagnetCleaner)(target)); - return; - case 20: - this.preCleaner1 = ((HMIControl.PreCleaner)(target)); - return; - case 21: - this.preCleaner2 = ((HMIControl.PreCleaner)(target)); - return; - case 22: - this.chainConveyor3 = ((HMIControl.ChainConveyor)(target)); - return; - case 23: - this.divert1 = ((HMIControl.Divert)(target)); - return; - case 24: - this.fourWays1 = ((HMIControl.FourWays)(target)); - return; - case 25: - this.chainConveyor4 = ((HMIControl.ChainConveyor)(target)); - return; - case 26: - this.fromTo1 = ((HMIControl.FromTo)(target)); - return; - case 27: - this.fromTo2 = ((HMIControl.FromTo)(target)); - return; - case 28: - this.fromTo3 = ((HMIControl.FromTo)(target)); - return; - case 29: - this.fromTo4 = ((HMIControl.FromTo)(target)); - return; - case 30: - this.fromTo5 = ((HMIControl.FromTo)(target)); - return; - case 31: - this.fromTo6 = ((HMIControl.FromTo)(target)); - return; - case 32: - this.fromTo7 = ((HMIControl.FromTo)(target)); - return; - case 33: - this.selectSwitch1 = ((HMIControl.SelectSwitch)(target)); - return; - case 34: - this.selectSwitch3 = ((HMIControl.SelectSwitch)(target)); - return; - case 35: - this.fromTo8 = ((HMIControl.FromTo)(target)); - return; - case 36: - this.fromTo9 = ((HMIControl.FromTo)(target)); - return; - case 37: - this.fromTo10 = ((HMIControl.FromTo)(target)); - return; - case 38: - this.fromTo11 = ((HMIControl.FromTo)(target)); - return; - case 39: - this.fromTo13 = ((HMIControl.FromTo)(target)); - return; - case 40: - this.slideGate6 = ((HMIControl.SlideGate)(target)); - return; - case 41: - this.slideGate1 = ((HMIControl.SlideGate)(target)); - return; - case 42: - this.slideGate2 = ((HMIControl.SlideGate)(target)); - return; - case 43: - this.slideGate3 = ((HMIControl.SlideGate)(target)); - return; - case 44: - this.slideGate4 = ((HMIControl.SlideGate)(target)); - return; - case 45: - this.slideGate5 = ((HMIControl.SlideGate)(target)); - return; - case 46: - this.slideGate7 = ((HMIControl.SlideGate)(target)); - return; - case 47: - this.fromTo12 = ((HMIControl.FromTo)(target)); - return; - case 48: - this.bufferBin7 = ((HMIControl.BufferBin)(target)); - return; - case 49: - this.bufferBin8 = ((HMIControl.BufferBin)(target)); - return; - case 50: - this.bufferBin9 = ((HMIControl.BufferBin)(target)); - return; - case 51: - this.bufferBin10 = ((HMIControl.BufferBin)(target)); - return; - case 52: - this.bufferBin11 = ((HMIControl.BufferBin)(target)); - return; - case 53: - this.bufferBin12 = ((HMIControl.BufferBin)(target)); - return; - case 54: - this.elevator4 = ((HMIControl.Elevator)(target)); - return; - case 55: - this.manualAddControl3 = ((HMIControl.ManualAddControl)(target)); - return; - case 56: - this.chainConveyor5 = ((HMIControl.ChainConveyor)(target)); - return; - case 57: - this.fromTo14 = ((HMIControl.FromTo)(target)); - return; - case 58: - this.divert2 = ((HMIControl.Divert)(target)); - return; - case 59: - this.preCleaner3 = ((HMIControl.PreCleaner)(target)); - return; - case 60: - this.magnetCleaner4 = ((HMIControl.MagnetCleaner)(target)); - return; - case 61: - this.chainConveyor6 = ((HMIControl.ChainConveyor)(target)); - return; - case 62: - this.fromTo15 = ((HMIControl.FromTo)(target)); - return; - case 63: - this.slideGate9 = ((HMIControl.SlideGate)(target)); - return; - case 64: - this.slideGate10 = ((HMIControl.SlideGate)(target)); - return; - case 65: - this.slideGate11 = ((HMIControl.SlideGate)(target)); - return; - case 66: - this.slideGate12 = ((HMIControl.SlideGate)(target)); - return; - case 67: - this.slideGate13 = ((HMIControl.SlideGate)(target)); - return; - case 68: - this.slideGate14 = ((HMIControl.SlideGate)(target)); - return; - case 69: - this.chainConveyor7 = ((HMIControl.ChainConveyor)(target)); - return; - case 70: - this.textBlock2 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 71: - this.textBlock1 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 72: - this.textBlock3 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 73: - this.textBlock4 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 74: - this.textBlock5 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 75: - this.textBlock6 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 76: - this.textBlock7 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 77: - this.textBlock8 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 78: - this.textBlock9 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 79: - this.textBlock10 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 80: - this.textBlock11 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 81: - this.textBlock12 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 82: - this.textBlock13 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 83: - this.textBlock14 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 84: - this.textBlock15 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 85: - this.textBlock16 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 86: - this.textBlock17 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 87: - this.textBlock18 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 88: - this.textBlock20 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 89: - this.textBlock21 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 90: - this.textBlock22 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 91: - this.textBlock23 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 92: - this.textBlock24 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 93: - this.textBlock25 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 94: - this.textBlock26 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 95: - this.textBlock27 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 96: - this.textBlock28 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 97: - this.textBlock29 = ((System.Windows.Controls.TextBlock)(target)); - return; - case 98: - this.textBlock30 = ((System.Windows.Controls.TextBlock)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/RuntimeChart.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/RuntimeChart.g.i.cs deleted file mode 100644 index 74c07ab..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/RuntimeChart.g.i.cs +++ /dev/null @@ -1,186 +0,0 @@ -#pragma checksum "..\..\..\RuntimeChart.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "DC1BFB7524CCB66F5D58735A70216F0A" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using Microsoft.Research.DynamicDataDisplay; -using Microsoft.Research.DynamicDataDisplay.Charts; -using Microsoft.Research.DynamicDataDisplay.Charts.Axes; -using Microsoft.Research.DynamicDataDisplay.Charts.Axes.Numeric; -using Microsoft.Research.DynamicDataDisplay.Charts.Isolines; -using Microsoft.Research.DynamicDataDisplay.Charts.Markers; -using Microsoft.Research.DynamicDataDisplay.Charts.Navigation; -using Microsoft.Research.DynamicDataDisplay.Charts.Shapes; -using Microsoft.Research.DynamicDataDisplay.Common.Palettes; -using Microsoft.Research.DynamicDataDisplay.Converters; -using Microsoft.Research.DynamicDataDisplay.DataSources; -using Microsoft.Research.DynamicDataDisplay.MarkupExtensions; -using Microsoft.Research.DynamicDataDisplay.Navigation; -using Microsoft.Research.DynamicDataDisplay.PointMarkers; -using Microsoft.Research.DynamicDataDisplay.ViewportRestrictions; -using Microsoft.Windows.Controls; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// RuntimeChart - /// - public partial class RuntimeChart : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 16 "..\..\..\RuntimeChart.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ComboBox comb1; - - #line default - #line hidden - - - #line 18 "..\..\..\RuntimeChart.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.ColorPicker colorpicker; - - #line default - #line hidden - - - #line 20 "..\..\..\RuntimeChart.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.ChartPlotter chartPlotter1; - - #line default - #line hidden - - - #line 22 "..\..\..\RuntimeChart.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.Charts.HorizontalDateTimeAxis hTimeSpanAxis; - - #line default - #line hidden - - - #line 24 "..\..\..\RuntimeChart.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.Charts.HorizontalLine hilevel; - - #line default - #line hidden - - - #line 25 "..\..\..\RuntimeChart.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.Charts.HorizontalLine lolevel; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/runtimechart.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\RuntimeChart.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - - #line 8 "..\..\..\RuntimeChart.xaml" - ((CoreTest.RuntimeChart)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); - - #line default - #line hidden - - #line 8 "..\..\..\RuntimeChart.xaml" - ((CoreTest.RuntimeChart)(target)).Closed += new System.EventHandler(this.Window_Closed); - - #line default - #line hidden - return; - case 2: - this.comb1 = ((System.Windows.Controls.ComboBox)(target)); - - #line 16 "..\..\..\RuntimeChart.xaml" - this.comb1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comb1_SelectionChanged); - - #line default - #line hidden - return; - case 3: - this.colorpicker = ((Microsoft.Windows.Controls.ColorPicker)(target)); - - #line 18 "..\..\..\RuntimeChart.xaml" - this.colorpicker.SelectedColorChanged += new System.Windows.RoutedPropertyChangedEventHandler(this.ColorPicker_SelectedColorChanged); - - #line default - #line hidden - return; - case 4: - this.chartPlotter1 = ((Microsoft.Research.DynamicDataDisplay.ChartPlotter)(target)); - return; - case 5: - this.hTimeSpanAxis = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalDateTimeAxis)(target)); - return; - case 6: - this.hilevel = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalLine)(target)); - return; - case 7: - this.lolevel = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalLine)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/SiloProductLine.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/SiloProductLine.g.i.cs deleted file mode 100644 index 07494ed..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/SiloProductLine.g.i.cs +++ /dev/null @@ -1,410 +0,0 @@ -#pragma checksum "..\..\..\SiloProductLine.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "A5AB0964D726C00F3D396892042986D6" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using HMIControl; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// SiloProductLine - /// - public partial class SiloProductLine : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { - - - #line 7 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal CoreTest.SiloProductLine SiloProductLine1; - - #line default - #line hidden - - - #line 9 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Canvas cvs1; - - #line default - #line hidden - - - #line 10 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Silo silo1; - - #line default - #line hidden - - - #line 11 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Silo silo2; - - #line default - #line hidden - - - #line 12 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Elevator elevator1; - - #line default - #line hidden - - - #line 13 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Elevator elevator2; - - #line default - #line hidden - - - #line 14 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.PreCleaner preCleaner1; - - #line default - #line hidden - - - #line 15 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Bucket bucket1; - - #line default - #line hidden - - - #line 16 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Truck truck1; - - #line default - #line hidden - - - #line 17 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor1; - - #line default - #line hidden - - - #line 18 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.MagnetCleaner magnetCleaner1; - - #line default - #line hidden - - - #line 19 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor2; - - #line default - #line hidden - - - #line 20 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor3; - - #line default - #line hidden - - - #line 21 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.ChainConveyor chainConveyor4; - - #line default - #line hidden - - - #line 22 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Cyclone cyclone1; - - #line default - #line hidden - - - #line 30 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock productline; - - #line default - #line hidden - - - #line 31 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo12; - - #line default - #line hidden - - - #line 33 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SelectSwitch selectSwitch1; - - #line default - #line hidden - - - #line 34 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SelectSwitch selectSwitch3; - - #line default - #line hidden - - - #line 35 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo1; - - #line default - #line hidden - - - #line 36 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo2; - - #line default - #line hidden - - - #line 38 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo3; - - #line default - #line hidden - - - #line 41 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate1; - - #line default - #line hidden - - - #line 42 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate2; - - #line default - #line hidden - - - #line 43 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo4; - - #line default - #line hidden - - - #line 45 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo5; - - #line default - #line hidden - - - #line 47 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.SlideGate slideGate3; - - #line default - #line hidden - - - #line 48 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.Cyclone cyclone2; - - #line default - #line hidden - - - #line 50 "..\..\..\SiloProductLine.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal HMIControl.FromTo fromTo6; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/siloproductline.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\SiloProductLine.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - this.SiloProductLine1 = ((CoreTest.SiloProductLine)(target)); - - #line 8 "..\..\..\SiloProductLine.xaml" - this.SiloProductLine1.Loaded += new System.Windows.RoutedEventHandler(this.HMI_Loaded); - - #line default - #line hidden - - #line 8 "..\..\..\SiloProductLine.xaml" - this.SiloProductLine1.Unloaded += new System.Windows.RoutedEventHandler(this.HMI_Unloaded); - - #line default - #line hidden - return; - case 2: - this.cvs1 = ((System.Windows.Controls.Canvas)(target)); - return; - case 3: - this.silo1 = ((HMIControl.Silo)(target)); - return; - case 4: - this.silo2 = ((HMIControl.Silo)(target)); - return; - case 5: - this.elevator1 = ((HMIControl.Elevator)(target)); - return; - case 6: - this.elevator2 = ((HMIControl.Elevator)(target)); - return; - case 7: - this.preCleaner1 = ((HMIControl.PreCleaner)(target)); - return; - case 8: - this.bucket1 = ((HMIControl.Bucket)(target)); - return; - case 9: - this.truck1 = ((HMIControl.Truck)(target)); - return; - case 10: - this.chainConveyor1 = ((HMIControl.ChainConveyor)(target)); - return; - case 11: - this.magnetCleaner1 = ((HMIControl.MagnetCleaner)(target)); - return; - case 12: - this.chainConveyor2 = ((HMIControl.ChainConveyor)(target)); - return; - case 13: - this.chainConveyor3 = ((HMIControl.ChainConveyor)(target)); - return; - case 14: - this.chainConveyor4 = ((HMIControl.ChainConveyor)(target)); - return; - case 15: - this.cyclone1 = ((HMIControl.Cyclone)(target)); - return; - case 16: - this.productline = ((System.Windows.Controls.TextBlock)(target)); - return; - case 17: - this.fromTo12 = ((HMIControl.FromTo)(target)); - return; - case 18: - this.selectSwitch1 = ((HMIControl.SelectSwitch)(target)); - return; - case 19: - this.selectSwitch3 = ((HMIControl.SelectSwitch)(target)); - return; - case 20: - this.fromTo1 = ((HMIControl.FromTo)(target)); - return; - case 21: - this.fromTo2 = ((HMIControl.FromTo)(target)); - return; - case 22: - this.fromTo3 = ((HMIControl.FromTo)(target)); - return; - case 23: - this.slideGate1 = ((HMIControl.SlideGate)(target)); - return; - case 24: - this.slideGate2 = ((HMIControl.SlideGate)(target)); - return; - case 25: - this.fromTo4 = ((HMIControl.FromTo)(target)); - return; - case 26: - this.fromTo5 = ((HMIControl.FromTo)(target)); - return; - case 27: - this.slideGate3 = ((HMIControl.SlideGate)(target)); - return; - case 28: - this.cyclone2 = ((HMIControl.Cyclone)(target)); - return; - case 29: - this.fromTo6 = ((HMIControl.FromTo)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/StartDevice.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/StartDevice.g.i.cs deleted file mode 100644 index 40e632f..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/StartDevice.g.i.cs +++ /dev/null @@ -1,150 +0,0 @@ -#pragma checksum "..\..\..\StartDevice.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "14206CA5E5BB144386A3AAAB0A6BD5A5" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// StartDevice - /// - public partial class StartDevice : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 8 "..\..\..\StartDevice.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Grid grd; - - #line default - #line hidden - - - #line 20 "..\..\..\StartDevice.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Border border1; - - #line default - #line hidden - - - #line 21 "..\..\..\StartDevice.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBlock devicename; - - #line default - #line hidden - - - #line 22 "..\..\..\StartDevice.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Button btnStop; - - #line default - #line hidden - - - #line 23 "..\..\..\StartDevice.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Button btnExit; - - #line default - #line hidden - - - #line 24 "..\..\..\StartDevice.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Button btnStart; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/startdevice.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\StartDevice.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - this.grd = ((System.Windows.Controls.Grid)(target)); - return; - case 2: - this.border1 = ((System.Windows.Controls.Border)(target)); - return; - case 3: - this.devicename = ((System.Windows.Controls.TextBlock)(target)); - return; - case 4: - this.btnStop = ((System.Windows.Controls.Button)(target)); - return; - case 5: - this.btnExit = ((System.Windows.Controls.Button)(target)); - - #line 23 "..\..\..\StartDevice.xaml" - this.btnExit.Click += new System.Windows.RoutedEventHandler(this.btnExit_Click); - - #line default - #line hidden - return; - case 6: - this.btnStart = ((System.Windows.Controls.Button)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/TagMonitor.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/TagMonitor.g.i.cs deleted file mode 100644 index d95bb9c..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/TagMonitor.g.i.cs +++ /dev/null @@ -1,136 +0,0 @@ -#pragma checksum "..\..\..\TagMonitor.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "0A98A6F201A7031A640A21A10F8B84E7" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using CoreTest; -using Microsoft.Windows.Controls; -using Microsoft.Windows.Controls.PropertyGrid; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// TagMonitor - /// - public partial class TagMonitor : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 16 "..\..\..\TagMonitor.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.DataGrid list1; - - #line default - #line hidden - - - #line 24 "..\..\..\TagMonitor.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.ChildWindow childWindow1; - - #line default - #line hidden - - - #line 26 "..\..\..\TagMonitor.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.TextBox textBox1; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/tagmonitor.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\TagMonitor.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - - #line 7 "..\..\..\TagMonitor.xaml" - ((CoreTest.TagMonitor)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); - - #line default - #line hidden - - #line 7 "..\..\..\TagMonitor.xaml" - ((CoreTest.TagMonitor)(target)).Closed += new System.EventHandler(this.Window_Closed); - - #line default - #line hidden - return; - case 2: - this.list1 = ((System.Windows.Controls.DataGrid)(target)); - return; - case 3: - this.childWindow1 = ((Microsoft.Windows.Controls.ChildWindow)(target)); - return; - case 4: - this.textBox1 = ((System.Windows.Controls.TextBox)(target)); - return; - case 5: - - #line 27 "..\..\..\TagMonitor.xaml" - ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); - - #line default - #line hidden - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/CoreTest/obj/x86/Debug/Trend.g.i.cs b/SCADA/Program/CoreTest/obj/x86/Debug/Trend.g.i.cs deleted file mode 100644 index 98c80e6..0000000 --- a/SCADA/Program/CoreTest/obj/x86/Debug/Trend.g.i.cs +++ /dev/null @@ -1,264 +0,0 @@ -#pragma checksum "..\..\..\Trend.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1B342724173D1F60676E7E203DB0077B" -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -using CoreTest; -using Microsoft.Research.DynamicDataDisplay; -using Microsoft.Research.DynamicDataDisplay.Charts; -using Microsoft.Research.DynamicDataDisplay.Charts.Axes; -using Microsoft.Research.DynamicDataDisplay.Charts.Axes.Numeric; -using Microsoft.Research.DynamicDataDisplay.Charts.Isolines; -using Microsoft.Research.DynamicDataDisplay.Charts.Markers; -using Microsoft.Research.DynamicDataDisplay.Charts.Navigation; -using Microsoft.Research.DynamicDataDisplay.Charts.Shapes; -using Microsoft.Research.DynamicDataDisplay.Common.Palettes; -using Microsoft.Research.DynamicDataDisplay.Converters; -using Microsoft.Research.DynamicDataDisplay.DataSources; -using Microsoft.Research.DynamicDataDisplay.MarkupExtensions; -using Microsoft.Research.DynamicDataDisplay.Navigation; -using Microsoft.Research.DynamicDataDisplay.PointMarkers; -using Microsoft.Research.DynamicDataDisplay.ViewportRestrictions; -using Microsoft.Windows.Controls; -using System; -using System.Diagnostics; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Forms.Integration; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Markup; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Effects; -using System.Windows.Media.Imaging; -using System.Windows.Media.Media3D; -using System.Windows.Media.TextFormatting; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Shell; - - -namespace CoreTest { - - - /// - /// Trend - /// - public partial class Trend : System.Windows.Window, System.Windows.Markup.IComponentConnector { - - - #line 15 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ToolBar toolBar1; - - #line default - #line hidden - - - #line 23 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.DateTimePicker dtstart; - - #line default - #line hidden - - - #line 25 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.DateTimePicker dtend; - - #line default - #line hidden - - - #line 27 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.CheckBox PCheckBox; - - #line default - #line hidden - - - #line 28 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.Primitives.Popup popusBottom; - - #line default - #line hidden - - - #line 34 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.CheckListBox chklist; - - #line default - #line hidden - - - #line 40 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.ComboBox comodel; - - #line default - #line hidden - - - #line 45 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal System.Windows.Controls.CheckBox chkshow; - - #line default - #line hidden - - - #line 46 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Windows.Controls.ColorPicker colorpicker; - - #line default - #line hidden - - - #line 48 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.ChartPlotter chartPlotter1; - - #line default - #line hidden - - - #line 50 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.Charts.HorizontalDateTimeAxis hTimeSpanAxis; - - #line default - #line hidden - - - #line 52 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.Charts.Navigation.CursorCoordinateGraph cursor; - - #line default - #line hidden - - - #line 53 "..\..\..\Trend.xaml" - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] - internal Microsoft.Research.DynamicDataDisplay.Charts.Navigation.AxisCursorGraph axiscuror; - - #line default - #line hidden - - private bool _contentLoaded; - - /// - /// InitializeComponent - /// - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() { - if (_contentLoaded) { - return; - } - _contentLoaded = true; - System.Uri resourceLocater = new System.Uri("/CoreTest;component/trend.xaml", System.UriKind.Relative); - - #line 1 "..\..\..\Trend.xaml" - System.Windows.Application.LoadComponent(this, resourceLocater); - - #line default - #line hidden - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] - void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { - switch (connectionId) - { - case 1: - - #line 9 "..\..\..\Trend.xaml" - ((CoreTest.Trend)(target)).Closed += new System.EventHandler(this.Window_Closed); - - #line default - #line hidden - return; - case 2: - this.toolBar1 = ((System.Windows.Controls.ToolBar)(target)); - return; - case 3: - this.dtstart = ((Microsoft.Windows.Controls.DateTimePicker)(target)); - return; - case 4: - this.dtend = ((Microsoft.Windows.Controls.DateTimePicker)(target)); - return; - case 5: - this.PCheckBox = ((System.Windows.Controls.CheckBox)(target)); - return; - case 6: - this.popusBottom = ((System.Windows.Controls.Primitives.Popup)(target)); - return; - case 7: - this.chklist = ((Microsoft.Windows.Controls.CheckListBox)(target)); - return; - case 8: - this.comodel = ((System.Windows.Controls.ComboBox)(target)); - - #line 40 "..\..\..\Trend.xaml" - this.comodel.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comodel_SelectionChanged); - - #line default - #line hidden - return; - case 9: - this.chkshow = ((System.Windows.Controls.CheckBox)(target)); - - #line 45 "..\..\..\Trend.xaml" - this.chkshow.Click += new System.Windows.RoutedEventHandler(this.chkshow_Click); - - #line default - #line hidden - return; - case 10: - this.colorpicker = ((Microsoft.Windows.Controls.ColorPicker)(target)); - - #line 46 "..\..\..\Trend.xaml" - this.colorpicker.SelectedColorChanged += new System.Windows.RoutedPropertyChangedEventHandler(this.ColorPicker_SelectedColorChanged); - - #line default - #line hidden - return; - case 11: - this.chartPlotter1 = ((Microsoft.Research.DynamicDataDisplay.ChartPlotter)(target)); - return; - case 12: - this.hTimeSpanAxis = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalDateTimeAxis)(target)); - return; - case 13: - this.cursor = ((Microsoft.Research.DynamicDataDisplay.Charts.Navigation.CursorCoordinateGraph)(target)); - return; - case 14: - this.axiscuror = ((Microsoft.Research.DynamicDataDisplay.Charts.Navigation.AxisCursorGraph)(target)); - return; - } - this._contentLoaded = true; - } - } -} - diff --git a/SCADA/Program/DataHelper/DataHelper.cs b/SCADA/Program/DataHelper/DataHelper.cs index 3416206..0025df3 100644 --- a/SCADA/Program/DataHelper/DataHelper.cs +++ b/SCADA/Program/DataHelper/DataHelper.cs @@ -1,5 +1,7 @@ -using System; +using MySql.Data.MySqlClient; +using System; using System.Data; +using System.Data.Common; using System.Data.SqlClient; using System.Diagnostics; using System.IO; @@ -9,12 +11,30 @@ using System.Text; namespace DatabaseLib { - - public class DataHelper //:MarshalByRefObject + public static class DataHelper { static string m_ConnStr = @"Data Source=.\SQLEXPRESS;Initial Catalog=SharpSCADA;Integrated Security=True"; static string m_Path = @"D:\HDA"; static string m_host = Environment.MachineName; + static string m_type = "MSSQL"; + //数据库工厂接口 + const string CFGPATH = @"C:\DataConfig\host.cfg"; + const string INIPATH = @"C:\DataConfig\host.ini"; + const string DATALOGSOURCE = "Data Operations"; + const string DATALOGNAME = "Data Log"; + const int STRINGMAX = 255; + + static EventLog Log; + #region GetInstance + private static IDataFactory _ins; + + public static IDataFactory Instance + { + get + { + return _ins; + } + } public static string HostName { @@ -30,15 +50,11 @@ namespace DatabaseLib { get { return m_Path; } } - - const string CFGPATH = @"C:\DataConfig\host.cfg"; - const string INIPATH = @"C:\DataConfig\host.ini"; - const string DATALOGSOURCE = "Data Operations"; - const string DATALOGNAME = "Data Log"; - const int STRINGMAX = 255; - - static EventLog Log; - + #endregion + /// + /// 数据库工厂构造函数 + /// + /// 数据库枚举 static DataHelper() { if (!EventLog.SourceExists(DATALOGSOURCE)) @@ -46,16 +62,7 @@ namespace DatabaseLib Log = new EventLog(DATALOGNAME); try { - if (File.Exists(CFGPATH)) - { - using (StreamReader objReader = new StreamReader(CFGPATH)) - { - m_host = objReader.ReadLine(); - m_ConnStr = objReader.ReadLine(); - m_Path = objReader.ReadLine(); - } - } - else if (File.Exists(INIPATH)) + if (File.Exists(INIPATH)) { StringBuilder sb = new StringBuilder(STRINGMAX); WinAPI.GetPrivateProfileString("HOST", "SERVER", m_host, sb, STRINGMAX, INIPATH); @@ -64,691 +71,160 @@ namespace DatabaseLib m_ConnStr = sb.ToString(); WinAPI.GetPrivateProfileString("DATABASE", "ARCHIVE", m_Path, sb, STRINGMAX, INIPATH); m_Path = sb.ToString(); + WinAPI.GetPrivateProfileString("DATABASE", "TYPE", m_type, sb, STRINGMAX, INIPATH); + m_type = sb.ToString(); } - IPAddress addr; - if (string.IsNullOrEmpty(m_host) || !IPAddress.TryParse(m_host, out addr)) - { - m_host = Environment.MachineName; - } - } - catch (Exception e) - { - AddErrorLog(e); - } - } - - public static void AddErrorLog(Exception e) - { - string err = ""; - Exception exp = e; - while (exp != null) - { - err += string.Format("\n {0}", exp.Message); - exp = exp.InnerException; - } - err += string.Format("\n {0}", e.StackTrace); - Log.Source = DATALOGSOURCE; - Log.WriteEntry(err, EventLogEntryType.Error); - } - - public static void CallException(string message) - { - AddErrorLog(new Exception(message)); - } - - public static bool ConnectionTest() - { - //创建连接对象 - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - //mySqlConnection.ConnectionTimeout = 1;//设置连接超时的时间 - try + else if (File.Exists(CFGPATH)) { - //Open DataBase - //打开数据库 - m_Conn.Open(); - if (m_Conn.State == ConnectionState.Open) - { - return true; - } - } - catch (Exception e) - { - CallException(e.Message); - } - } - //mySqlConnection is a SqlConnection object - return false; - } - - public static SqlParameter CreateInputParam(string paramName, SqlDbType dbType, object objValue) - { - SqlParameter parameter = new SqlParameter(paramName, dbType); - if (objValue == null) - { - parameter.IsNullable = true; - parameter.Value = DBNull.Value; - return parameter; - } - parameter.Value = objValue; - return parameter; - } - - #region ExecuteDataset //执行查询语句,返回一个记录集 - - /// - /// 返回记录集 - /// - /// 用于返回记录集的SQL语句 - /// 记录集 - public static DataSet ExecuteDataset(string SQL) - { - DataSet ds = new DataSet(); - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - try - { - SqlDataAdapter da = new SqlDataAdapter(); - SqlCommand cmd = new SqlCommand(SQL, m_Conn); - da.SelectCommand = cmd; - da.Fill(ds); - } - catch (Exception e) - { - CallException(SQL + " " + e.Message); - } - } - return ds; - } - - - /// - /// 返回记录集 - /// - /// 用于返回记录集的SQL语句 - /// 映射表名 - /// 记录集 - public static DataSet ExecuteDataset(string SQL, string TableName) - { - DataSet ds = new DataSet(); - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - try - { - SqlDataAdapter da = new SqlDataAdapter(); - SqlCommand cmd = new SqlCommand(SQL, m_Conn); - da.SelectCommand = cmd; - da.Fill(ds, TableName); - } - catch (Exception e) - { - CallException(SQL + " " + e.Message); - } - } - return ds; - } - - /// - /// 返回包含多个表的记录集 - /// - /// 用于返回记录集的SQL语句 - /// 映射表名 - /// 记录集 - - public static DataSet ExecuteDataset(string[] SQLs, string[] TableNames) - { - DataSet ds = new DataSet(); - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - try - { - for (int i = 0; i < SQLs.Length; i++) + using (StreamReader objReader = new StreamReader(CFGPATH)) { - - SqlDataAdapter da = new SqlDataAdapter(); - SqlCommand cmd = new SqlCommand(SQLs[i], m_Conn); - da.SelectCommand = cmd; - da.Fill(ds, TableNames[i]); + m_host = objReader.ReadLine(); + m_ConnStr = objReader.ReadLine(); + m_Path = objReader.ReadLine(); } } - catch (Exception e) - { - CallException(SQLs + " " + e.Message); - } - } - return ds; - } - - #endregion ExecuteDataset - - /// - /// 返回表 - /// - /// 用于返回记录集的SQL语句 - /// 记录集 - public static DataTable ExecuteDataTable(string SQL) - { - DataTable dt = new DataTable(); - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - try + IPAddress addr; + if (string.IsNullOrEmpty(m_host) || !IPAddress.TryParse(m_host, out addr)) { - SqlDataAdapter da = new SqlDataAdapter(); - SqlCommand cmd = new SqlCommand(SQL, m_Conn); - da.SelectCommand = cmd; - da.Fill(dt); + m_host = Environment.MachineName; } - catch (Exception e) + switch (m_type.ToUpper()) { - CallException(SQL + " " + e.Message); + case "MSSQL": + _ins = new MssqlFactory(); + break; + case "MYSQL": + _ins = new MysqlFactory(); + break; + default: + _ins = new MssqlFactory(); + break; } } - return dt; - } - - #region ExecuteNonQuery //执行非查询语句 - - /// - /// 执行一条INSERT、UPDATE、DELETE语句 - /// - /// T-SQL语句 - /// 返回影响的行数 - public static int ExecuteNonQuery(string SQL) - { - int res = -1; - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) + catch (Exception e) { - SqlTransaction sqlT = null; - try - { - using (SqlCommand cmd = new SqlCommand(SQL, m_Conn)) - { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - cmd.Connection = m_Conn; - sqlT = m_Conn.BeginTransaction(); - cmd.Transaction = sqlT; - res = cmd.ExecuteNonQuery(); - sqlT.Commit(); - } - } - catch (Exception e) - { - if (sqlT != null) - sqlT.Rollback(); - CallException(SQL + " " + e.Message); - return -1; - } - return res; + AddErrorLog(e); } } - /// - /// 执行一组INSERT、UPDATE、DELETE语句 - /// - /// T-SQL语句 - /// 返回影响的行数 - public static int ExecuteNonQuery(string[] SQLs) + public static DbParameter CreateParam(string paramName, SqlDbType dbType, object objValue, int size = 0, ParameterDirection direction = ParameterDirection.Input) { - int res = -1; - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - SqlTransaction sqlT = null; - SqlCommand cmd = new SqlCommand(); - try - { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - cmd.Connection = m_Conn; - sqlT = m_Conn.BeginTransaction(); - cmd.Transaction = sqlT; - for (int i = 0; i < SQLs.Length; i++) - { - cmd.CommandText = SQLs[i]; - res = cmd.ExecuteNonQuery(); - } - sqlT.Commit(); - } - catch (Exception e) - { - if (sqlT != null) - sqlT.Rollback(); - CallException(SQLs + " " + e.Message); - res = -1; - } - return res; - } + return _ins.CreateParam(paramName, dbType, objValue, size, direction); } - /// - /// 执行一组INSERT、UPDATE、DELETE语句 - /// - /// T-SQL语句 - /// 执行参数 - /// 返回影响的行数 - public static int ExecuteNonQuery(string[] SQLs, object[][] Pars) + public static string DataTableToCsv(DataTable table) { - int res = -1; - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) + //以半角逗号(即,)作分隔符,列为空也要表达其存在。 + //列内容如存在半角逗号(即,)则用半角引号(即"")将该字段值包含起来。 + //列内容如存在半角引号(即")则应替换成半角双引号("")转义,并用半角引号(即"")将该字段值包含起来。 + StringBuilder sb = new StringBuilder(); + DataColumn colum; + foreach (DataRow row in table.Rows) { - SqlTransaction sqlT = null; - SqlCommand cmd = new SqlCommand(); - try + for (int i = 0; i < table.Columns.Count; i++) { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - cmd.Connection = m_Conn; - sqlT = m_Conn.BeginTransaction(); - cmd.Transaction = sqlT; - for (int i = 0; i < SQLs.Length; i++) + colum = table.Columns[i]; + if (i != 0) sb.Append(","); + var txt = row[colum] == null ? "" : row[colum].ToString(); + if (colum.DataType == typeof(string) && txt.Contains(",")) { - cmd.CommandText = SQLs[i]; - cmd.Parameters.Clear(); - for (int j = 0; j < Pars[i].Length; j++) - { - cmd.Parameters.AddWithValue("@p" + j.ToString(), Pars[i][j]); - } - res = cmd.ExecuteNonQuery(); + sb.Append("\"" + txt.Replace("\"", "\"\"") + "\""); } - sqlT.Commit(); + else sb.Append(txt); } - catch (Exception e) - { - if (sqlT != null) - sqlT.Rollback(); - CallException(SQLs + " " + e.Message); - res = -1; - } - return res; + sb.AppendLine(); } + return sb.ToString(); } - #endregion ExecuteNonQuery - - #region FillDataSet //填充一个记录集 - - /// - /// 用指定的SQL语句来填充一个记录集 - /// - /// 记录集 - /// SELECT语句 - /// 映射表名 - public static void FillDataSet(ref DataSet ds, string SQL, string TableName) - { - try - { - SqlConnection m_Conn; - m_Conn = new SqlConnection(m_ConnStr); - SqlDataAdapter da = new SqlDataAdapter(); - SqlCommand cmd = new SqlCommand(SQL, m_Conn); - da.SelectCommand = cmd; - da.Fill(ds, TableName); - } - catch (Exception e) - { - CallException(SQL + " " + e.Message); - } - } - - #endregion FillDataSet - - #region - // - /// 返回一个SqlDataReader - /// - public static SqlDataReader ExecuteReader(string sSQL) - { - SqlConnection connection = new SqlConnection(m_ConnStr); - SqlCommand command = new SqlCommand(sSQL, connection); - if (connection.State == ConnectionState.Closed) - connection.Open(); - return command.ExecuteReader(CommandBehavior.CloseConnection); - } - - - public static SqlDataReader ExecuteProcedureReader(string sSQL, params SqlParameter[] ParaName) - { - SqlConnection connection = new SqlConnection(m_ConnStr); - SqlCommand command = new SqlCommand(sSQL, connection); - command.CommandType = CommandType.StoredProcedure; - if (ParaName != null) + public static string ReaderToCsv(IDataReader reader) + { + StringBuilder sb = new StringBuilder(); + var colcount = reader.FieldCount; + while (reader.Read()) { - command.Parameters.AddRange(ParaName); - } - try - { - if (connection.State == ConnectionState.Closed) - connection.Open(); - return command.ExecuteReader(CommandBehavior.CloseConnection); - } - catch (Exception e) - { - CallException(sSQL + " " + e.Message); - return null; - } - } - #endregion - - #region ExecuteScalar //执行查询,并返回查询所返回的结果集中第一行的第一列 - - /// - /// 执行查询,并返回查询所返回的结果集中第一行的第一列 - /// - /// SQL语句 - /// - public static object ExecuteScalar(string sSQL) - { - SqlTransaction sqlT = null; - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - SqlCommand cmd = new SqlCommand(sSQL, m_Conn); - try - { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - sqlT = m_Conn.BeginTransaction(); - cmd.Transaction = sqlT; - var res = cmd.ExecuteScalar(); - sqlT.Commit(); - if (res == DBNull.Value) res = null; - return res; - } - catch (Exception e) + for (int i = 0; i < colcount; i++) { - if (sqlT != null) - sqlT.Rollback(); - CallException(sSQL + " " + e.Message); - return null; - } - } - } - - #endregion ExecuteScalar - - #region ExecuteStoredProcedure //执行一个存储过程 - - /// - /// 执行一个带参数的存储过程 - /// - /// 存储过程名 - /// 参数名称 - /// 参数方向,Input参数是输入参数 InputOutput参数既能输入,也能输出 Output参数是输出参数 ReturnValue参数存储过程返回值。 - /// 参数对象数组 - /// 成功返回true,失败返回false - public static int ExecuteStoredProcedure(string ProName, params SqlParameter[] ParaName) - { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - try - { - SqlCommand cmd = new SqlCommand(ProName, m_Conn) - { - CommandType = CommandType.StoredProcedure - }; - if (ParaName != null) - { - cmd.Parameters.AddRange(ParaName); - } - SqlParameter param = new SqlParameter(); - cmd.Parameters.Add(param); - param.Direction = ParameterDirection.ReturnValue; - if (m_Conn.State == ConnectionState.Closed) + if (i != 0) sb.Append(","); + var txt = reader[i] == null ? "" : reader[i].ToString(); + if (txt.Contains(",")) { - m_Conn.Open(); + sb.Append("\"" + txt.Replace("\"", "\"\"") + "\""); } - cmd.ExecuteNonQuery(); - return (int)param.Value; - } - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return -1; - } - } - } - - /// - /// 执行一个没有参数和返回值的存储过程(默认参数类型) - /// - /// 存储过程名 - /// 参数对象数组 - /// 成功返回true,失败返回false - public static bool ExecuteStoredProcedure(string ProName) - { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - try - { - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - SqlCommand cmd = new SqlCommand(ProName, m_Conn); - cmd.CommandType = CommandType.StoredProcedure; - cmd.ExecuteNonQuery(); - return true; - } - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return false; + else sb.Append(txt); } + sb.AppendLine(); } + return sb.ToString(); } - /// - /// 执行一个带参数的存储过程,并返回数据集 - /// - /// 存储过程名 - /// 参数名称 - /// 参数对象数组 - /// 执行过程中返回的数据集 - /// 成功返回true,失败返回false - public static DataSet ExecuteDataSetProcedure(string ProName, ref int returnValue, params SqlParameter[] ParaName) + public static void AddErrorLog(Exception e) { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) + string err = ""; + Exception exp = e; + while (exp != null) { - DataSet ds = new DataSet(); - try - { - SqlCommand cmd = new SqlCommand(ProName, m_Conn); - cmd.CommandType = CommandType.StoredProcedure; - if (ParaName != null) - { - cmd.Parameters.AddRange(ParaName); - } - SqlParameter param = new SqlParameter { Direction = ParameterDirection.ReturnValue }; - cmd.Parameters.Add(param); - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - da.Fill(ds); - returnValue = (int)param.Value; - return ds; - } - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return null; - } + err += string.Format("\n {0}", exp.Message); + exp = exp.InnerException; } + err += string.Format("\n {0}", e.StackTrace); + Log.Source = DATALOGSOURCE; + Log.WriteEntry(err, EventLogEntryType.Error); } - public static DataSet ExecuteDataSetProcedure(string ProName, params SqlParameter[] ParaName) + public static string GetNullableString(this DbDataReader reader, int index) { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) + SqlDataReader dataReader = reader as SqlDataReader; + if (dataReader != null) { - DataSet ds = new DataSet(); - try - { - SqlCommand cmd = new SqlCommand(ProName, m_Conn); - cmd.CommandType = CommandType.StoredProcedure; - if (ParaName != null) - { - cmd.Parameters.AddRange(ParaName); - } - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - da.Fill(ds); - return ds; - } - - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return null; - } + var svr = dataReader.GetSqlString(index); + return svr.IsNull ? null : svr.Value; } + else return reader.GetString(index); } - /// - /// 执行一个带参数的存储过程,并返回数据集 - /// - /// 存储过程名 - /// 参数名称 - /// 参数对象数组 - /// 执行过程中返回的数据集 - /// 成功返回true,失败返回false - /// - public static DataTable ExecuteDataTableProcedure(string ProName, params SqlParameter[] ParaName) + public static DateTime? GetNullableTime(this DbDataReader reader, int index) { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) - { - DataTable ds = new DataTable(); - try - { - SqlCommand cmd = new SqlCommand(ProName, m_Conn); - cmd.CommandType = CommandType.StoredProcedure; - if (ParaName != null) - { - cmd.Parameters.AddRange(ParaName); - } - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - da.Fill(ds); - return ds; - } - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return null; - } - } + SqlDataReader dataReader = reader as SqlDataReader; + var svr = dataReader.GetSqlDateTime(index); + return svr.IsNull ? default(Nullable) : svr.Value; } - public static DataTable ExecuteDataTableProcedure(string ProName, ref int returnValue, SqlParameter[] ParaName) + public static int GetTimeTick(this DbDataReader reader, int index) { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) + SqlDataReader dataReader = reader as SqlDataReader; + if (dataReader != null) { - DataTable ds = new DataTable(); - try - { - SqlCommand cmd = new SqlCommand(ProName, m_Conn); - cmd.CommandType = CommandType.StoredProcedure; - if (ParaName != null) - { - cmd.Parameters.AddRange(ParaName); - } - SqlParameter param = new SqlParameter { Direction = ParameterDirection.ReturnValue }; - cmd.Parameters.Add(param); - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - da.Fill(ds); - returnValue = (int)param.Value; - return ds; - } - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return null; - } + return dataReader.GetSqlDateTime(index).TimeTicks; } + var datetime = reader.GetDateTime(index); + var value = datetime.Subtract(new DateTime(1900, 1, 1)); + long num2 = value.Ticks - value.Days * 864000000000; + if (num2 < 0) + num2 += 864000000000; + int num3 = (int)(num2 / 10000.0 * 0.3 + 0.5); + if (num3 > 300 * 60 * 60 * 24 - 1) + num3 = 0; + return num3; } - /// - /// 执行一个带参数的存储过程,同时输出一行 - /// - /// 存储过程名 - /// 参数名称 - /// 参数对象数组 - /// 返回整数 - public static DataRow ExecuteDataRowProcedure(string ProName, params SqlParameter[] ParaName) + public static object GetSqlValue(this DbDataReader reader, int index) { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) + SqlDataReader dataReader = reader as SqlDataReader; + if (dataReader != null) { - try - { - SqlCommand cmd = new SqlCommand(ProName, m_Conn); - cmd.CommandType = CommandType.StoredProcedure; - if (ParaName != null) - { - cmd.Parameters.AddRange(ParaName); - } - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - DataTable table = new DataTable(); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - da.Fill(table); - if (table.Rows.Count > 0) - return table.Rows[0]; - else - return table.NewRow(); - } - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return null; - } + return dataReader.GetSqlValue(index); } - } - - /// - /// 执行一个带参数的存储过程,同时输出一行 - /// - /// 存储过程名 - /// 参数名称 - /// 参数对象数组 - /// 返回整数 - public static DataRowView ExecuteDataRowViewProcedure(string ProName, params SqlParameter[] ParaName) - { - using (SqlConnection m_Conn = new SqlConnection(m_ConnStr)) + var mq = reader as MySqlDataReader; + if (mq != null) { - try - { - SqlCommand cmd = new SqlCommand(ProName, m_Conn); - cmd.CommandType = CommandType.StoredProcedure; - if (ParaName != null) - { - cmd.Parameters.AddRange(ParaName); - } - if (m_Conn.State == ConnectionState.Closed) - m_Conn.Open(); - DataTable table = new DataTable(); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - da.Fill(table); - if (table.Rows.Count > 0) - return table.DefaultView[0]; - else - return table.DefaultView.AddNew(); - } - catch (Exception e) - { - CallException(ProName + " " + e.Message); - return null; - } + return mq.GetValue(index); } + return ""; } - - #endregion ExecuteStoredProcedure } + public static class WinAPI { @@ -760,4 +236,4 @@ namespace DatabaseLib [DllImport("kernel32")] public static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retval, int size, string filePath); } -} +} \ No newline at end of file diff --git a/SCADA/Program/DataHelper/DataHelper.csproj b/SCADA/Program/DataHelper/DataHelper.csproj index 4609bfe..19f6a52 100644 --- a/SCADA/Program/DataHelper/DataHelper.csproj +++ b/SCADA/Program/DataHelper/DataHelper.csproj @@ -139,6 +139,10 @@ false + + ..\packages\MySql.Data.6.9.10\lib\net40\MySql.Data.dll + True + @@ -146,6 +150,9 @@ + + + @@ -154,6 +161,10 @@ DataService + + + +