Browse Source

Merge a07b233b04 into de2e4ed071

pull/22/merge
Cookie Tang 5 years ago
committed by GitHub
parent
commit
905b36ac67
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .gitignore
  2. BIN
      SCADA/Program/.vs/DataExchange/v15/.suo
  3. BIN
      SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide
  4. BIN
      SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide-shm
  5. BIN
      SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide-wal
  6. BIN
      SCADA/Program/ABPLCReader/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  7. 2
      SCADA/Program/BatchCoreService/ProjectInstaller.Designer.cs
  8. 2
      SCADA/Program/BatchCoreService/ProjectInstaller.resx
  9. BIN
      SCADA/Program/BatchCoreService/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  10. BIN
      SCADA/Program/BatchCoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  11. BIN
      SCADA/Program/ClientDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  12. 199
      SCADA/Program/CoreTest/obj/x86/Debug/AlarmSet.g.i.cs
  13. 78
      SCADA/Program/CoreTest/obj/x86/Debug/App.g.i.cs
  14. BIN
      SCADA/Program/CoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  15. 62
      SCADA/Program/CoreTest/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs
  16. 205
      SCADA/Program/CoreTest/obj/x86/Debug/Login.g.i.cs
  17. 188
      SCADA/Program/CoreTest/obj/x86/Debug/RuntimeChart.g.i.cs
  18. 151
      SCADA/Program/CoreTest/obj/x86/Debug/StartDevice.g.i.cs
  19. 136
      SCADA/Program/CoreTest/obj/x86/Debug/TagMonitor.g.i.cs
  20. 264
      SCADA/Program/CoreTest/obj/x86/Debug/Trend.g.i.cs
  21. BIN
      SCADA/Program/DDEDriver/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  22. 44
      SCADA/Program/DataExchange.sln
  23. 82
      SCADA/Program/DataHelper/MssqlFactory.cs
  24. BIN
      SCADA/Program/DataHelper/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  25. 26
      SCADA/Program/DataService/CacheReader.cs
  26. 2
      SCADA/Program/DataService/Enums.cs
  27. 2
      SCADA/Program/DataService/ExtensionMethods.cs
  28. 121
      SCADA/Program/DataService/PLCGroup.cs
  29. BIN
      SCADA/Program/DataService/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  30. BIN
      SCADA/Program/FileDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  31. BIN
      SCADA/Program/HMIControl/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  32. 62
      SCADA/Program/HMIControl/obj/Debug/GeneratedInternalTypeHelper.g.i.cs
  33. 20
      SCADA/Program/HMIControl/obj/Debug/HMIControl_MarkupCompile.i.cache
  34. 4
      SCADA/Program/HMIControl/obj/Debug/HMIControl_MarkupCompile.i.lref
  35. BIN
      SCADA/Program/LinkableControlDesignTime/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  36. 1405
      SCADA/Program/MelsecDriver/FxSerialReader.cs
  37. 61
      SCADA/Program/MelsecDriver/MelsecDriver.csproj
  38. 36
      SCADA/Program/MelsecDriver/Properties/AssemblyInfo.cs
  39. 4
      SCADA/Program/ModbusDriver/ModbusRTUDriver.cs
  40. 30
      SCADA/Program/ModbusDriver/ModbusTCPDriver.cs
  41. BIN
      SCADA/Program/ModbusDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  42. BIN
      SCADA/Program/OPCDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  43. BIN
      SCADA/Program/OPCLib/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  44. BIN
      SCADA/Program/OmronPlcDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  45. BIN
      SCADA/Program/PanasonicDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  46. BIN
      SCADA/Program/SiemensPLCDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  47. BIN
      SCADA/Program/TagConfig/TagConfig/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

4
.gitignore

@ -6,4 +6,6 @@ ehthumbs.db
Desktop.ini
!*.exe
!*.dll
!*.bak
!*.bak
/.vs
/SCADA/Program/packages/Newtonsoft.Json.11.0.2

BIN
SCADA/Program/.vs/DataExchange/v15/.suo

Binary file not shown.

BIN
SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide

Binary file not shown.

BIN
SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide-shm

Binary file not shown.

BIN
SCADA/Program/.vs/DataExchange/v15/Server/sqlite3/storage.ide-wal

Binary file not shown.

BIN
SCADA/Program/ABPLCReader/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

2
SCADA/Program/BatchCoreService/ProjectInstaller.Designer.cs

@ -42,7 +42,7 @@
this.serviceInstaller1.Description = "数据服务";
this.serviceInstaller1.ServiceName = "BatchCoreService";
this.serviceInstaller1.ServicesDependedOn = new string[] {
"MSSQL$SQLEXPRESS"};
"HaoSQL2008"};
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
//
// ProjectInstaller

2
SCADA/Program/BatchCoreService/ProjectInstaller.resx

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="serviceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
<value>17, 55</value>
</metadata>
<metadata name="serviceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>196, 17</value>

BIN
SCADA/Program/BatchCoreService/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/BatchCoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/ClientDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

199
SCADA/Program/CoreTest/obj/x86/Debug/AlarmSet.g.i.cs

@ -0,0 +1,199 @@
#pragma checksum "..\..\..\AlarmSet.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "11D7D1142659883006DE8D16FF16C98ECF5D96E5"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
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 {
/// <summary>
/// AlarmSet
/// </summary>
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;
/// <summary>
/// InitializeComponent
/// </summary>
[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<System.Windows.Media.Color>(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;
}
}
}

78
SCADA/Program/CoreTest/obj/x86/Debug/App.g.i.cs

@ -0,0 +1,78 @@
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E1F43B7F6CA36743FBDCC124511923BCB538201D"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
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 {
/// <summary>
/// App
/// </summary>
public partial class App : System.Windows.Application {
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[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
}
/// <summary>
/// Application Entry Point.
/// </summary>
[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();
}
}
}

BIN
SCADA/Program/CoreTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

62
SCADA/Program/CoreTest/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[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 {
/// <summary>
/// CreateInstance
/// </summary>
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);
}
/// <summary>
/// GetPropertyValue
/// </summary>
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);
}
/// <summary>
/// SetPropertyValue
/// </summary>
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);
}
/// <summary>
/// CreateDelegate
/// </summary>
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)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

205
SCADA/Program/CoreTest/obj/x86/Debug/Login.g.i.cs

@ -0,0 +1,205 @@
#pragma checksum "..\..\..\Login.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "AE28E95762DCC3C98413991AB3FD0D23F37D3CE3"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
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 {
/// <summary>
/// Login
/// </summary>
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;
/// <summary>
/// InitializeComponent
/// </summary>
[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;
}
}
}

188
SCADA/Program/CoreTest/obj/x86/Debug/RuntimeChart.g.i.cs

@ -0,0 +1,188 @@
#pragma checksum "..\..\..\RuntimeChart.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8AE27EC0F869EF1ADB433A4756BFD002B4305BD3"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using CoreTest;
using HMIControl;
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 {
/// <summary>
/// RuntimeChart
/// </summary>
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;
/// <summary>
/// InitializeComponent
/// </summary>
[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<System.Windows.Media.Color>(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;
}
}
}

151
SCADA/Program/CoreTest/obj/x86/Debug/StartDevice.g.i.cs

@ -0,0 +1,151 @@
#pragma checksum "..\..\..\StartDevice.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0EEE22AD3B597E0CB717D8885FB4F7D7B3D7EBF9"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
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 {
/// <summary>
/// StartDevice
/// </summary>
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;
/// <summary>
/// InitializeComponent
/// </summary>
[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;
}
}
}

136
SCADA/Program/CoreTest/obj/x86/Debug/TagMonitor.g.i.cs

@ -0,0 +1,136 @@
#pragma checksum "..\..\..\TagMonitor.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "28C5AB6899D56BC8ADA97D3865FFFC890B9A3DDD"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
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 {
/// <summary>
/// TagMonitor
/// </summary>
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;
/// <summary>
/// InitializeComponent
/// </summary>
[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;
}
}
}

264
SCADA/Program/CoreTest/obj/x86/Debug/Trend.g.i.cs

@ -0,0 +1,264 @@
#pragma checksum "..\..\..\Trend.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A699E208959857EF7ABA7FAB7613F3E3383D42FE"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
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 {
/// <summary>
/// Trend
/// </summary>
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;
/// <summary>
/// InitializeComponent
/// </summary>
[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<System.Windows.Media.Color>(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;
}
}
}

BIN
SCADA/Program/DDEDriver/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

44
SCADA/Program/DataExchange.sln

@ -39,6 +39,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ABPLCDriver", "ABPLCReader\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DDEDriver", "DDEDriver\DDEDriver.csproj", "{14938033-7870-477D-925C-A447933A44E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MelsecDriver", "MelsecDriver\MelsecDriver.csproj", "{AE7D9641-3F7D-4282-B752-2FA14619CFBF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HslCommunication_Net45", "..\..\..\HslCommunication\HslCommunication_Net45\HslCommunication_Net45.csproj", "{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -359,6 +363,46 @@ Global
{14938033-7870-477D-925C-A447933A44E7}.Release|x64.ActiveCfg = Release|x86
{14938033-7870-477D-925C-A447933A44E7}.Release|x86.ActiveCfg = Release|x86
{14938033-7870-477D-925C-A447933A44E7}.Release|x86.Build.0 = Release|x86
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|Itanium.ActiveCfg = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|Itanium.Build.0 = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|x64.ActiveCfg = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|x64.Build.0 = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|x86.ActiveCfg = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Debug|x86.Build.0 = Debug|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|Any CPU.Build.0 = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|Itanium.ActiveCfg = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|Itanium.Build.0 = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|x64.ActiveCfg = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|x64.Build.0 = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|x86.ActiveCfg = Release|Any CPU
{AE7D9641-3F7D-4282-B752-2FA14619CFBF}.Release|x86.Build.0 = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|Itanium.ActiveCfg = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|Itanium.Build.0 = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|x64.ActiveCfg = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|x64.Build.0 = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|x86.ActiveCfg = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Debug|x86.Build.0 = Debug|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|Any CPU.Build.0 = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|Itanium.ActiveCfg = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|Itanium.Build.0 = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|x64.ActiveCfg = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|x64.Build.0 = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|x86.ActiveCfg = Release|Any CPU
{7F8029DA-1B94-4B1D-B91F-5B21DBF2F3A2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

82
SCADA/Program/DataHelper/MssqlFactory.cs

@ -12,6 +12,11 @@ namespace DatabaseLib
DataHelper.AddErrorLog(new Exception(message));
}
public void CallException(Exception e)
{
DataHelper.AddErrorLog(e);
}
public bool ConnectionTest()
{
//创建连接对象
@ -30,7 +35,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(e.Message);
CallException(e);
}
}
//mySqlConnection is a SqlConnection object
@ -77,7 +82,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(SQL + " " + e.Message);
CallException(new Exception(SQL + " " + e.Message, e));
}
}
return ds;
@ -104,7 +109,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(SQL + " " + e.Message);
CallException(new Exception(SQL + " " + e.Message, e));
}
}
return ds;
@ -135,7 +140,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(SQLs + " " + e.Message);
CallException(new Exception(SQLs + " " + e.Message, e));
}
}
return ds;
@ -162,7 +167,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(SQL + " " + e.Message);
CallException(new Exception(SQL + " " + e.Message, e));
}
}
return dt;
@ -198,7 +203,7 @@ namespace DatabaseLib
{
if (sqlT != null)
sqlT.Rollback();
CallException(SQL + " " + e.Message);
CallException(new Exception(SQL + " " + e.Message, e));
return -1;
}
return res;
@ -235,7 +240,7 @@ namespace DatabaseLib
{
if (sqlT != null)
sqlT.Rollback();
CallException(SQLs + " " + e.Message);
CallException(new Exception(SQLs + " " + e.Message, e));
res = -1;
}
return res;
@ -278,7 +283,7 @@ namespace DatabaseLib
{
if (sqlT != null)
sqlT.Rollback();
CallException(SQLs + " " + e.Message);
CallException(new Exception(SQLs + " " + e.Message, e));
res = -1;
}
return res;
@ -308,7 +313,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(SQL + " " + e.Message);
CallException(new Exception(SQL + " " + e.Message, e));
}
}
@ -345,7 +350,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(sSQL + " " + e.Message);
CallException(new Exception(sSQL + " " + e.Message, e));
return null;
}
}
@ -379,7 +384,7 @@ namespace DatabaseLib
{
if (sqlT != null)
sqlT.Rollback();
CallException(sSQL + " " + e.Message);
CallException(new Exception(sSQL + " " + e.Message, e));
return null;
}
}
@ -423,7 +428,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return -1;
}
}
@ -450,7 +455,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return false;
}
}
@ -489,7 +494,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return null;
}
}
@ -518,7 +523,7 @@ namespace DatabaseLib
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return null;
}
}
@ -555,7 +560,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return null;
}
}
@ -586,7 +591,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return null;
}
}
@ -624,7 +629,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return null;
}
}
@ -662,7 +667,7 @@ namespace DatabaseLib
}
catch (Exception e)
{
CallException(ProName + " " + e.Message);
CallException(new Exception(ProName + " " + e.Message, e));
return null;
}
}
@ -701,7 +706,44 @@ namespace DatabaseLib
if (sqlT != null)
sqlT.Rollback();
m_Conn.Close();
CallException(e.Message);
CallException(e);
return false;
}
}
}
public bool BulkCopy(DataTable reader, string tableName, string command = null, SqlBulkCopyOptions options = SqlBulkCopyOptions.Default)
{
using (SqlConnection m_Conn = new SqlConnection(DataHelper.ConnectString))
{
SqlTransaction sqlT = null;
try
{
if (m_Conn.State == ConnectionState.Closed)
m_Conn.Open();
sqlT = m_Conn.BeginTransaction();
if (!string.IsNullOrEmpty(command))
{
SqlCommand cmd = new SqlCommand(command, m_Conn);
cmd.Transaction = sqlT;
cmd.ExecuteNonQuery();
}
SqlBulkCopy copy = new SqlBulkCopy(m_Conn, options, sqlT);
copy.DestinationTableName = tableName;
copy.BulkCopyTimeout = 100000;
//copy.BatchSize = _capacity;
copy.WriteToServer(reader);//如果写入失败,考虑不能无限增加线程数
//Clear();
sqlT.Commit();
m_Conn.Close();
return true;
}
catch (Exception e)
{
if (sqlT != null)
sqlT.Rollback();
m_Conn.Close();
CallException(e);
return false;
}
}

BIN
SCADA/Program/DataHelper/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

26
SCADA/Program/DataService/CacheReader.cs

@ -139,8 +139,8 @@ namespace DataService
public int WriteString(DeviceAddress address, string str)
{
byte[] b = Encoding.ASCII.GetBytes(str);
int index = address.CacheIndex;
Array.Copy(_cache, index, b, 0, b.Length);
int index = address.CacheIndex * 2;
Buffer.BlockCopy(b, 0, _cache, index, b.Length);
return 0;
}
@ -301,8 +301,8 @@ namespace DataService
public int WriteString(DeviceAddress address, string str)
{
byte[] b = Encoding.ASCII.GetBytes(str);
int index = address.CacheIndex;
Array.Copy(_cache, index, b, 0, b.Length);
int index = address.CacheIndex * 2;
Buffer.BlockCopy(b, 0, _cache, index, b.Length);
return 0;
}
@ -495,8 +495,8 @@ namespace DataService
public int WriteString(DeviceAddress address, string str)
{
byte[] b = Encoding.ASCII.GetBytes(str);
int index = address.CacheIndex;
Buffer.BlockCopy(_cache, index, b, 0, b.Length);
int index = address.CacheIndex * 2;
Buffer.BlockCopy(b, 0, _cache, index, b.Length);
return 0;
}
@ -582,7 +582,7 @@ namespace DataService
}
else
{
result = (IPAddress.HostToNetworkOrder(_cache[startIndex]) << 16) | ((ushort)IPAddress.HostToNetworkOrder(_cache[startIndex + 1]));
result = (_cache[startIndex + 1] << 16) | ((ushort)_cache[startIndex]);
}
return new ItemData<int>(result, 0, QUALITIES.QUALITY_GOOD);
}
@ -694,8 +694,8 @@ namespace DataService
public int WriteString(DeviceAddress address, string str)
{
byte[] b = Encoding.ASCII.GetBytes(str);
int index = address.CacheIndex;
Buffer.BlockCopy(_cache, index, b, 0, b.Length);
int index = address.CacheIndex * 2;
Buffer.BlockCopy(b, 0, _cache, index, b.Length);
return 0;
}
@ -863,8 +863,8 @@ namespace DataService
public int WriteString(DeviceAddress address, string str)
{
byte[] b = Encoding.ASCII.GetBytes(str);
int index = address.CacheIndex;
Buffer.BlockCopy(_cache, index, b, 0, b.Length);
int index = address.CacheIndex * 2;
Buffer.BlockCopy(b, 0, _cache, index, b.Length);
return 0;
}
@ -1029,8 +1029,8 @@ namespace DataService
public int WriteString(DeviceAddress address, string str)
{
byte[] b = Encoding.ASCII.GetBytes(str);
int index = address.CacheIndex;
Buffer.BlockCopy(_cache, index, b, 0, b.Length);
int index = address.CacheIndex * 2;
Buffer.BlockCopy(b, 0, _cache, index, b.Length);
return 0;
}

2
SCADA/Program/DataService/Enums.cs

@ -20,7 +20,7 @@ namespace DataService
INT = 7,
FLOAT = 8,
SYS = 9,
STR = 11
STR = 10
}
[Flags]

2
SCADA/Program/DataService/ExtensionMethods.cs

@ -317,7 +317,7 @@ namespace DataService
int endIndex = 0;
while (endIndex < addrArr.Length)
{
if (start.Area != addrArr[endIndex].Area || start.DBNumber != addrArr[endIndex].DBNumber || endIndex - startIndex >= limit)
if (start.Area != addrArr[endIndex].Area || start.DBNumber != addrArr[endIndex].DBNumber || endIndex - startIndex >= limit || endIndex == addrArr.Length - 1)
{
for (int i = startIndex; i < endIndex; i++)
{

121
SCADA/Program/DataService/PLCGroup.cs

@ -191,7 +191,7 @@ namespace DataService
}
}
_items.TrimExcess();
_items.Sort();
_items.Sort((x, y) => x.Address.CompareTo(y.Address));
UpdatePDUArea();
return true;
}
@ -210,7 +210,7 @@ namespace DataService
}
}
_items.TrimExcess();
_items.Sort();
_items.Sort((x, y) => x.Address.CompareTo(y.Address));
UpdatePDUArea();
return true;
}
@ -284,7 +284,7 @@ namespace DataService
}
else
{
var size= _start.DataSize <= bitCount ? 1 : _start.DataSize / bitCount;
var size = _start.DataSize <= bitCount ? 1 : _start.DataSize / bitCount;
_rangeList.Add(new PDUArea(_start, size, 0, 1));
_cacheReader.Size = size;//改变Cache的Size属性值将创建Cache的内存区域
}
@ -303,9 +303,22 @@ namespace DataService
}
object sync = new object();
public void Flush()
{
lock (sync)
{
_changedList.Clear();
Poll();
if (_changedList.Count > 0)
Update();
}
}
protected void timer_Timer(object sender, EventArgs e)
{
if (_isActive)
//Modified Kevin
if (_isActive && !_plcReader.IsClosed)
{
lock (sync)
{
@ -838,7 +851,7 @@ namespace DataService
int offset = 0;
foreach (PDUArea area in _rangeList)
{
byte[] rcvBytes = _plcReader.ReadBytes(area.Start, (ushort)area.Len);//从PLC读取数据
byte[] rcvBytes = _plcReader.ReadBytes(area.Start, (ushort)area.Len);//从PLC读取数据
if (rcvBytes == null || rcvBytes.Length == 0)
{
offset += (area.Len + 1) / 2;
@ -848,66 +861,84 @@ namespace DataService
else
{
int len = rcvBytes.Length / 2;
fixed (byte* p1 = rcvBytes)
//判断长度必须
if (len == area.Len)
{
short* prcv = (short*)p1;
int index = area.StartIndex;//index指向_items中的Tag元数据
int count = index + area.Count;
while (index < count)
fixed (byte* p1 = rcvBytes)
{
DeviceAddress addr = _items[index].Address;
int iShort = addr.CacheIndex;
int iShort1 = iShort - offset;
if (addr.VarType == DataType.BOOL)
short* prcv = (short*)p1;
int index = area.StartIndex; //index指向_items中的Tag元数据
int count = index + area.Count;
while (index < count)
{
if (addr.ByteOrder.HasFlag(ByteOrder.Network)) prcv[iShort1] = IPAddress.HostToNetworkOrder(prcv[iShort1]);
int tmp = prcv[iShort1] ^ cache[iShort];
DeviceAddress next = addr;
if (tmp != 0)
DeviceAddress addr = _items[index].Address;
int iShort = addr.CacheIndex;
int iShort1 = iShort - offset;
if (addr.VarType == DataType.BOOL)
{
while (addr.Start == next.Start)
if (addr.ByteOrder.HasFlag(ByteOrder.Network))
prcv[iShort1] = IPAddress.HostToNetworkOrder(prcv[iShort1]);
int tmp = prcv[iShort1] ^ cache[iShort];
DeviceAddress next = addr;
if (tmp != 0)
{
if ((tmp & (1 << next.Bit)) > 0) _changedList.Add(index);
if (++index < count)
while (addr.Start == next.Start)
{
if ((tmp & (1 << next.Bit)) > 0) _changedList.Add(index);
if (++index < count)
next = _items[index].Address;
else
break;
}
}
else
{
while (addr.Start == next.Start && ++index < count)
{
next = _items[index].Address;
else
break;
}
}
}
else
{
while (addr.Start == next.Start && ++index < count)
if (addr.DataSize <= 2)
{
next = _items[index].Address;
if (prcv[iShort1] != cache[iShort]) _changedList.Add(index);
}
}
}
else
{
if (addr.DataSize <= 2)
{
if (prcv[iShort1] != cache[iShort]) _changedList.Add(index);
}
else
{
int size = addr.DataSize / 2;
for (int i = 0; i < size; i++)
else
{
if (prcv[iShort1 + i] != cache[iShort + i])
int size = addr.DataSize / 2;
for (int i = 0; i < size; i++)
{
_changedList.Add(index);
break;
if (prcv[iShort1 + i] != cache[iShort + i])
{
_changedList.Add(index);
break;
}
}
}
index++;
}
index++;
}
short[] prcvShorts = new short[len];
for (int i = 0; i < len; i++)
{
prcvShorts[i] = prcv[i];
}
//改成Array.Copy 由于线程安全的问题
Array.Copy(prcvShorts, 0, cache, offset, len);
/*
for (int j = 0; j < len; j++)
{
cache[j + offset] = prcv[j];
}//将PLC读取的数据写入到CacheReader中
*/
}
for (int j = 0; j < len; j++)
{
cache[j + offset] = prcv[j];
}//将PLC读取的数据写入到CacheReader中
}
offset += len;
}
}

BIN
SCADA/Program/DataService/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/FileDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/HMIControl/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

62
SCADA/Program/HMIControl/obj/Debug/GeneratedInternalTypeHelper.g.i.cs

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[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 {
/// <summary>
/// CreateInstance
/// </summary>
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);
}
/// <summary>
/// GetPropertyValue
/// </summary>
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);
}
/// <summary>
/// SetPropertyValue
/// </summary>
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);
}
/// <summary>
/// CreateDelegate
/// </summary>
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)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

20
SCADA/Program/HMIControl/obj/Debug/HMIControl_MarkupCompile.i.cache

@ -0,0 +1,20 @@
HMIControl
library
C#
.cs
D:\$MyWorkspace\GitHub\SharpSCADA\SCADA\Program\HMIControl\obj\Debug\
HMIControl
none
false
DEBUG;TRACE
1-731644535
911110599564
11-823603823
Themes\Generic.xaml;
True

4
SCADA/Program/HMIControl/obj/Debug/HMIControl_MarkupCompile.i.lref

@ -0,0 +1,4 @@
D:\$MyWorkspace\GitHub\SharpSCADA\SCADA\Program\HMIControl\obj\Debug\GeneratedInternalTypeHelper.g.i.cs
FD:\$MyWorkspace\GitHub\SharpSCADA\SCADA\Program\HMIControl\Themes\Generic.xaml;;

BIN
SCADA/Program/LinkableControlDesignTime/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

1405
SCADA/Program/MelsecDriver/FxSerialReader.cs

File diff suppressed because it is too large

61
SCADA/Program/MelsecDriver/MelsecDriver.csproj

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AE7D9641-3F7D-4282-B752-2FA14619CFBF}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MelsecDriver</RootNamespace>
<AssemblyName>MelsecDriver</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FxSerialReader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\HslCommunication\HslCommunication_Net45\HslCommunication_Net45.csproj">
<Project>{7f8029da-1b94-4b1d-b91f-5b21dbf2f3a2}</Project>
<Name>HslCommunication_Net45</Name>
</ProjectReference>
<ProjectReference Include="..\DataService\DataService.csproj">
<Project>{8965E389-6466-4B30-BD43-83C909044637}</Project>
<Name>DataService</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

36
SCADA/Program/MelsecDriver/Properties/AssemblyInfo.cs

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("MelsecDriver")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MelsecDriver")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("ae7d9641-3f7d-4282-b752-2fa14619cfbf")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

4
SCADA/Program/ModbusDriver/ModbusRTUDriver.cs

@ -408,10 +408,10 @@ namespace ModbusDriver
dv.DBNumber = Modbus.fctReadCoil;
int st;
int.TryParse(address, out st);
st--;
dv.Bit = (byte)(st % 16);
st /= 16;
dv.Start = st;
dv.Bit--;
}
break;
case '1':
@ -419,10 +419,10 @@ namespace ModbusDriver
dv.DBNumber = Modbus.fctReadDiscreteInputs;
int st;
int.TryParse(address.Substring(1), out st);
st--;
dv.Bit = (byte)(st % 16);
st /= 16;
dv.Start = st;
dv.Bit--;
}
break;
case '4':

30
SCADA/Program/ModbusDriver/ModbusTCPDriver.cs

@ -46,11 +46,11 @@ namespace ModbusDriver
dv.DBNumber = Modbus.fctReadCoil;
int st;
int.TryParse(address, out st);
st--;
//dv.Start = (st / 16) * 16;//???????????????????
dv.Bit = (byte)(st % 16);
st /= 16;
dv.Start = st;
dv.Bit--;
}
break;
case '1':
@ -58,11 +58,11 @@ namespace ModbusDriver
dv.DBNumber = Modbus.fctReadDiscreteInputs;
int st;
int.TryParse(address.Substring(1), out st);
st--;
//dv.Start = (st / 16) * 16;//???????????????????
dv.Bit = (byte)(st % 16);
st /= 16;
dv.Start = st;
dv.Bit--;
}
break;
case '4':
@ -370,6 +370,11 @@ namespace ModbusDriver
internal void CallException(int id, byte function, byte exception)
{
if (tcpSynCl == null) return;
//主动断开连接准备重连
if (exception == Modbus.excExceptionConnectionLost)
{
tcpSynCl.Close();
}
if (OnError != null)
OnError(this, new IOErrorEventArgs(Modbus.GetErrorString(exception)));
}
@ -480,7 +485,7 @@ namespace ModbusDriver
{
if (address.DBNumber < 3)
{
var data = WriteSingleCoils(address.Area, address.Start + address.Bit, bit);
var data = WriteSingleCoils(address.Area, address.Start * 16 + address.Bit, bit);
return data == null ? -1 : 0;
}
return -1;
@ -510,7 +515,15 @@ namespace ModbusDriver
public int WriteUInt32(DeviceAddress address, uint value)
{
if (address.DBNumber != 3) return -1;
var data = WriteMultipleRegister(address.Area, address.Start, BitConverter.GetBytes((uint)IPAddress.HostToNetworkOrder((int)value)));
byte[] b = BitConverter.GetBytes((int)value);
for (int j = 0; j < b.Length / 2; j++)
{
byte a = b[j * 2];
b[j * 2] = b[j * 2 + 1];
b[j * 2 + 1] = a;
}
//b = BitConverter.GetBytes((uint) IPAddress.HostToNetworkOrder((int) value));
var data = WriteMultipleRegister(address.Area, address.Start, b);
return data == null ? -1 : 0;
}
@ -531,7 +544,14 @@ namespace ModbusDriver
public int WriteString(DeviceAddress address, string str)
{
if (address.DBNumber != 3) return -1;
var data = WriteMultipleRegister(address.Area, address.Start, Encoding.ASCII.GetBytes(str));
byte[] b = Encoding.ASCII.GetBytes(str);
for (int j = 0; j < b.Length / 2; j++)
{
byte a = b[j * 2];
b[j * 2] = b[j * 2 + 1];
b[j * 2 + 1] = a;
}
var data = WriteMultipleRegister(address.Area, address.Start, b);
return data == null ? -1 : 0;
}

BIN
SCADA/Program/ModbusDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/OPCDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/OPCLib/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/OmronPlcDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/PanasonicDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/SiemensPLCDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

BIN
SCADA/Program/TagConfig/TagConfig/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.
Loading…
Cancel
Save