Browse Source

move tagconfig to program

pull/6/merge
Gavin 8 years ago
parent
commit
004595f0ef
  1. BIN
      SCADA/Example/BatchCoreTest.exe
  2. BIN
      SCADA/Example/ClientDriver.dll
  3. BIN
      SCADA/Example/CoreTest.exe
  4. BIN
      SCADA/Example/DataHelper.dll
  5. BIN
      SCADA/Example/DataService.dll
  6. BIN
      SCADA/Example/HMIControl.dll
  7. BIN
      SCADA/Example/MySql.Data.dll
  8. BIN
      SCADA/Example/TagConfig.exe
  9. 16
      SCADA/Program/DataExchange.sln
  10. 18
      SCADA/Program/DataService/PLCGroup.cs
  11. 62
      SCADA/Program/TagConfig/TagConfig.sln
  12. 0
      SCADA/Program/TagConfig/TagConfig/AlarmForm.Designer.cs
  13. 0
      SCADA/Program/TagConfig/TagConfig/AlarmForm.cs
  14. 0
      SCADA/Program/TagConfig/TagConfig/AlarmForm.resx
  15. 0
      SCADA/Program/TagConfig/TagConfig/AlarmParam.Designer.cs
  16. 0
      SCADA/Program/TagConfig/TagConfig/AlarmParam.cs
  17. 0
      SCADA/Program/TagConfig/TagConfig/AlarmParam.resx
  18. 0
      SCADA/Program/TagConfig/TagConfig/Condition.cs
  19. 74
      SCADA/Program/TagConfig/TagConfig/DataHelper.cs
  20. 0
      SCADA/Program/TagConfig/TagConfig/DriverSet.Designer.cs
  21. 3
      SCADA/Program/TagConfig/TagConfig/DriverSet.cs
  22. 0
      SCADA/Program/TagConfig/TagConfig/DriverSet.resx
  23. 0
      SCADA/Program/TagConfig/TagConfig/ExMethos.cs
  24. 0
      SCADA/Program/TagConfig/TagConfig/Form1.Designer.cs
  25. 193
      SCADA/Program/TagConfig/TagConfig/Form1.cs
  26. 0
      SCADA/Program/TagConfig/TagConfig/Form1.resx
  27. 0
      SCADA/Program/TagConfig/TagConfig/GroupParam.Designer.cs
  28. 0
      SCADA/Program/TagConfig/TagConfig/GroupParam.cs
  29. 0
      SCADA/Program/TagConfig/TagConfig/GroupParam.resx
  30. 0
      SCADA/Program/TagConfig/TagConfig/Program.cs
  31. 0
      SCADA/Program/TagConfig/TagConfig/Properties/AssemblyInfo.cs
  32. 0
      SCADA/Program/TagConfig/TagConfig/Properties/Resources.Designer.cs
  33. 0
      SCADA/Program/TagConfig/TagConfig/Properties/Resources.resx
  34. 0
      SCADA/Program/TagConfig/TagConfig/Properties/Settings.Designer.cs
  35. 0
      SCADA/Program/TagConfig/TagConfig/Properties/Settings.settings
  36. 0
      SCADA/Program/TagConfig/TagConfig/RegisterSet.Designer.cs
  37. 5
      SCADA/Program/TagConfig/TagConfig/RegisterSet.cs
  38. 0
      SCADA/Program/TagConfig/TagConfig/RegisterSet.resx
  39. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Attribute.gif
  40. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Clear.gif
  41. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Collect.gif
  42. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Copy.gif
  43. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Database.ico
  44. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Delete.gif
  45. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Excel.gif
  46. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Exit.gif
  47. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Find.gif
  48. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Help.gif
  49. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Link.ico
  50. 0
      SCADA/Program/TagConfig/TagConfig/Resources/PPrint.gif
  51. 0
      SCADA/Program/TagConfig/TagConfig/Resources/PSave.gif
  52. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Page-Setup.ico
  53. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Timer.gif
  54. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Tip.ico
  55. 0
      SCADA/Program/TagConfig/TagConfig/Resources/Tool.gif
  56. 0
      SCADA/Program/TagConfig/TagConfig/ScaleParam.Designer.cs
  57. 0
      SCADA/Program/TagConfig/TagConfig/ScaleParam.cs
  58. 0
      SCADA/Program/TagConfig/TagConfig/ScaleParam.resx
  59. 6
      SCADA/Program/TagConfig/TagConfig/TagConfig.csproj
  60. 0
      SCADA/Program/TagConfig/TagConfig/TagData.cs
  61. 0
      SCADA/Program/TagConfig/TagConfig/TagParam.Designer.cs
  62. 0
      SCADA/Program/TagConfig/TagConfig/TagParam.cs
  63. 0
      SCADA/Program/TagConfig/TagConfig/TagParam.resx
  64. 0
      SCADA/Program/TagConfig/TagConfig/Wizard.ico
  65. 0
      SCADA/Program/TagConfig/TagConfig/app.config
  66. 82
      SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/CHANGES
  67. BIN
      SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/MySql.Data.6.9.10.nupkg
  68. 15
      SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/Readme.txt
  69. 9
      SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/content/app.config.transform
  70. 9
      SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/content/web.config.transform
  71. BIN
      SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/lib/net40/MySql.Data.dll
  72. BIN
      SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/lib/net45/MySql.Data.dll
  73. BIN
      SCADA/TagConfig/DataService.dll
  74. BIN
      SCADA/TagConfig/TagConfig.exe
  75. 32
      SCADA/TagConfig/TagConfig.sln
  76. 739
      SCADA/TagConfig/TagConfig/DataHelper.cs
  77. BIN
      SCADA/TagConfig/TagConfig/bin/Debug/DataService.dll
  78. 6
      SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.exe.config
  79. BIN
      SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.vshost.exe
  80. 6
      SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.vshost.exe.config
  81. 11
      SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.vshost.exe.manifest
  82. BIN
      SCADA/TagConfig/TagConfig/bin/Release/DataService.dll
  83. 6
      SCADA/TagConfig/TagConfig/bin/Release/TagConfig.exe.config
  84. BIN
      SCADA/TagConfig/TagConfig/bin/Release/TagConfig.vshost.exe
  85. 6
      SCADA/TagConfig/TagConfig/bin/Release/TagConfig.vshost.exe.config
  86. 11
      SCADA/TagConfig/TagConfig/bin/Release/TagConfig.vshost.exe.manifest
  87. 1
      SCADA/TagConfig/TagConfig/obj/x86/Debug/TagConfig.csproj.FileListAbsolute.txt

BIN
SCADA/Example/BatchCoreTest.exe

Binary file not shown.

BIN
SCADA/Example/ClientDriver.dll

Binary file not shown.

BIN
SCADA/Example/CoreTest.exe

Binary file not shown.

BIN
SCADA/Example/DataHelper.dll

Binary file not shown.

BIN
SCADA/Example/DataService.dll

Binary file not shown.

BIN
SCADA/Example/HMIControl.dll

Binary file not shown.

BIN
SCADA/Example/MySql.Data.dll

Binary file not shown.

BIN
SCADA/Example/TagConfig.exe

Binary file not shown.

16
SCADA/Program/DataExchange.sln

@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModbusDriver", "ModbusDrive
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiemensPLCDriver", "SiemensPLCDriver\SiemensPLCDriver.csproj", "{9CEBFDA4-CF05-44D1-881B-13775AA46B27}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagConfig", "TagConfig\TagConfig\TagConfig.csproj", "{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -261,6 +263,20 @@ Global
{9CEBFDA4-CF05-44D1-881B-13775AA46B27}.Release|x64.Build.0 = Release|x64
{9CEBFDA4-CF05-44D1-881B-13775AA46B27}.Release|x86.ActiveCfg = Release|Any CPU
{9CEBFDA4-CF05-44D1-881B-13775AA46B27}.Release|x86.Build.0 = Release|Any CPU
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Any CPU.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Itanium.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Mixed Platforms.Build.0 = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x64.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x86.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x86.Build.0 = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Any CPU.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Itanium.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Mixed Platforms.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Mixed Platforms.Build.0 = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x64.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x86.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

18
SCADA/Program/DataService/PLCGroup.cs

@ -278,7 +278,11 @@ namespace DataService
_cacheReader.Size = cacheLength;
}
else
_cacheReader.Size = _start.DataSize <= bitCount ? 1 : _start.DataSize / bitCount;//改变Cache的Size属性值将创建Cache的内存区域
{
var size= _start.DataSize <= bitCount ? 1 : _start.DataSize / bitCount;
_rangeList.Add(new PDUArea(_start, size, 0, 1));
_cacheReader.Size = size;//改变Cache的Size属性值将创建Cache的内存区域
}
}
}
@ -313,18 +317,6 @@ namespace DataService
{
if (_plcReader.IsClosed) return -1;
byte[] cache = (byte[])_cacheReader.Cache;
if (_items.Count == 1)
{
byte[] rcvBytes = _plcReader.ReadBytes(_items[0].Address, (ushort)cache.Length);
if (rcvBytes == null) return -1;
for (int j = 0; j < rcvBytes.Length; j++)
{
if (cache[j] != rcvBytes[j])
_changedList.Add(0);
cache[j] = rcvBytes[j];
}
return 1;
}
int offset = 0;
foreach (PDUArea area in _rangeList)
{

62
SCADA/Program/TagConfig/TagConfig.sln

@ -0,0 +1,62 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagConfig", "TagConfig\TagConfig.csproj", "{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataHelper", "..\Program\DataHelper\DataHelper.csproj", "{755C5459-BCA4-4729-A93C-0C73A41BDF3C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Itanium = Debug|Itanium
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Itanium = Release|Itanium
Release|Mixed Platforms = Release|Mixed Platforms
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Any CPU.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Itanium.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Mixed Platforms.Build.0 = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x64.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x86.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x86.Build.0 = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Any CPU.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Itanium.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Mixed Platforms.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Mixed Platforms.Build.0 = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x64.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x86.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x86.Build.0 = Release|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|Itanium.ActiveCfg = Debug|Itanium
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|Itanium.Build.0 = Debug|Itanium
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|Mixed Platforms.Build.0 = Debug|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|x64.ActiveCfg = Debug|x64
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|x64.Build.0 = Debug|x64
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|x86.ActiveCfg = Debug|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Debug|x86.Build.0 = Debug|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|Any CPU.Build.0 = Release|Any CPU
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|Itanium.ActiveCfg = Release|Itanium
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|Itanium.Build.0 = Release|Itanium
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|Mixed Platforms.ActiveCfg = Release|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|Mixed Platforms.Build.0 = Release|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|x64.ActiveCfg = Release|x64
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|x64.Build.0 = Release|x64
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|x86.ActiveCfg = Release|x86
{755C5459-BCA4-4729-A93C-0C73A41BDF3C}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

0
SCADA/TagConfig/TagConfig/AlarmForm.Designer.cs → SCADA/Program/TagConfig/TagConfig/AlarmForm.Designer.cs

0
SCADA/TagConfig/TagConfig/AlarmForm.cs → SCADA/Program/TagConfig/TagConfig/AlarmForm.cs

0
SCADA/TagConfig/TagConfig/AlarmForm.resx → SCADA/Program/TagConfig/TagConfig/AlarmForm.resx

0
SCADA/TagConfig/TagConfig/AlarmParam.Designer.cs → SCADA/Program/TagConfig/TagConfig/AlarmParam.Designer.cs

0
SCADA/TagConfig/TagConfig/AlarmParam.cs → SCADA/Program/TagConfig/TagConfig/AlarmParam.cs

0
SCADA/TagConfig/TagConfig/AlarmParam.resx → SCADA/Program/TagConfig/TagConfig/AlarmParam.resx

0
SCADA/TagConfig/TagConfig/Condition.cs → SCADA/Program/TagConfig/TagConfig/Condition.cs

74
SCADA/Program/TagConfig/TagConfig/DataHelper.cs

@ -0,0 +1,74 @@
using System.Data;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
namespace TagConfig
{
public static class DataConvert //:MarshalByRefObject
{
public static DataTable ConvertTextToTable(string str)
{
if (string.IsNullOrEmpty(str)) return null;
DataTable mydt = new DataTable("");
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(str)))
{
using (var mysr = new StreamReader(stream))
{
string strline = mysr.ReadLine();
string[] aryline = strline.Split('\t');
for (int i = 0; i < aryline.Length; i++)
{
aryline[i] = aryline[i].Replace("\"", "");
mydt.Columns.Add(new DataColumn(aryline[i] + i));
}
int intColCount = aryline.Length;
while ((strline = mysr.ReadLine()) != null)
{
aryline = strline.Split('\t');
DataRow mydr = mydt.NewRow();
for (int i = 0; i < intColCount; i++)
{
mydr[i] = aryline[i].Replace("\"", "");
}
mydt.Rows.Add(mydr);
}
return mydt;
}
}
}
public static DataTable ConvertCSVToTable(string str)
{
DataTable mydt = new DataTable("");
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(str)))
{
using (var mysr = new StreamReader(stream))
{
string strline = mysr.ReadLine();
Regex reg = new Regex(@",(?=(?:[^\""]*\""[^\""]*\"")*(?![^\""]*\""))");
string[] aryline = reg.Split(strline);
for (int i = 0; i < aryline.Length; i++)
{
aryline[i] = aryline[i].Replace("\"", "");
mydt.Columns.Add(new DataColumn(aryline[i]));
}
int intColCount = aryline.Length;
while ((strline = mysr.ReadLine()) != null)
{
aryline = reg.Split(strline);
DataRow mydr = mydt.NewRow();
for (int i = 0; i < intColCount; i++)
{
mydr[i] = aryline[i].Replace("\"", "");
}
mydt.Rows.Add(mydr);
}
return mydt;
}
}
}
}
}

0
SCADA/TagConfig/TagConfig/DriverSet.Designer.cs → SCADA/Program/TagConfig/TagConfig/DriverSet.Designer.cs

3
SCADA/TagConfig/TagConfig/DriverSet.cs → SCADA/Program/TagConfig/TagConfig/DriverSet.cs

@ -1,6 +1,7 @@
using System;
using System.Windows.Forms;
using System.Collections.Generic;
using DatabaseLib;
namespace TagConfig
{
@ -13,7 +14,7 @@ namespace TagConfig
_device = device;
InitializeComponent();
List<DataTypeSource1> typeList = new List<DataTypeSource1>();
using (var reader = DataHelper.ExecuteReader("SELECT DRIVERID,ISNULL(Description,CLASSNAME) FROM RegisterModule"))
using (var reader = DataHelper.Instance.ExecuteReader("SELECT DRIVERID,ISNULL(Description,CLASSNAME) FROM RegisterModule"))
{
while (reader.Read())
{

0
SCADA/TagConfig/TagConfig/DriverSet.resx → SCADA/Program/TagConfig/TagConfig/DriverSet.resx

0
SCADA/TagConfig/TagConfig/ExMethos.cs → SCADA/Program/TagConfig/TagConfig/ExMethos.cs

0
SCADA/TagConfig/TagConfig/Form1.Designer.cs → SCADA/Program/TagConfig/TagConfig/Form1.Designer.cs

193
SCADA/TagConfig/TagConfig/Form1.cs → SCADA/Program/TagConfig/TagConfig/Form1.cs

@ -1,15 +1,13 @@
using System;
using DatabaseLib;
using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml;
using Microsoft.Office.Interop.Excel;
using Excel = Microsoft.Office.Interop.Excel;
using System.Text;
namespace TagConfig
{
@ -17,7 +15,6 @@ namespace TagConfig
public partial class Form1 : Form
{
const string FILENAME = "meta.xml";
const string CONFIGFILE = @"C:\DataConfig\host.cfg";
bool start = false;
string file = null;
@ -70,122 +67,17 @@ namespace TagConfig
private void Form1_Load(object sender, EventArgs e)
{
majorTop = treeView1.Nodes.Add("", "服务器", 0, 0);
LoadConfig();
LoadFromDatabase();
treeView1.ExpandAll();
}
private void LoadConfig()
{
try
{
using (StreamReader objReader = new StreamReader(CONFIGFILE))
{
objReader.ReadLine();
string sLine = objReader.ReadLine();
if (!string.IsNullOrEmpty(sLine))
{
DataHelper.m_ConnStr = sLine;
return;
}
}
}
catch (Exception e)
{
Program.AddErrorLog(e);
}
using (XmlReader reader = XmlTextReader.Create(FILENAME))
{
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Attribute:
break;
case XmlNodeType.Element:
//if (reader.IsEmptyElement) continue;
switch (reader.Name)
{
case "ConnectionString":
string server = null;
string ins = null;
if (reader.MoveToAttribute("server"))
{
server = reader.Value;
}
if (reader.MoveToAttribute("ins"))
{
ins = reader.Value;
}
if (reader.MoveToAttribute("database"))
{
builder.InitialCatalog = reader.Value;
}
if (reader.MoveToAttribute("user"))
{
builder.UserID = reader.Value;
}
if (reader.MoveToAttribute("password"))
{
builder.Password = reader.Value;
}
builder.DataSource = ins == null ? server : string.Format(@"{0}\{1}", server, ins);
break;
case "Script":
if (reader.MoveToAttribute("file"))
{
file = reader.Value;
}
break;
}
break;
}
}
}
//builder.InitialCatalog = "MYCOS";
DataHelper.m_ConnStr = builder.ConnectionString;
}
public void ExecuteScript()//应支持从Server类导出到XML;
//应支持从TreeView控件导出到XML;应支持直接从XML文件生成Server;支持从XML生成TreeView;从配置文件读入用户名和密码
{
string[] args = new string[5];
args[0] = "-U " + builder.UserID; //用户名
args[1] = "-P " + builder.Password; //用户密码
args[2] = "-S " + builder.DataSource; //服务器
args[3] = "-d " + "master"; //数据库
args[4] = "-i " + AppDomain.CurrentDomain.BaseDirectory + file; //sql脚本路径
try
{
Process pr = new Process();
pr.StartInfo.FileName = "osql.exe ";
//pr.StartInfo.Arguments = "-U sa -P sa -d master -s 127.0.0.1 -i " + file;
pr.StartInfo.Arguments = string.Join("", args);
pr.StartInfo.UseShellExecute = false;
pr.StartInfo.RedirectStandardOutput = true; //重定向输出
pr.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;//隐藏输出窗口
pr.Start();
var sr = pr.StandardOutput;
Console.WriteLine(sr.ReadToEnd());
pr.WaitForExit();
pr.Close();
}
catch (Exception err)
{
Program.AddErrorLog(err);
}
}
private void LoadFromDatabase()
{
list.Clear();
//subConds.Clear();
majorTop.Nodes.Clear();
string sql = "SELECT DriverID,DriverType,DriverName,Server,TimeOut,Spare1,Spare2 FROM META_DRIVER;";
using (var reader = DataHelper.ExecuteReader(sql))
using (var reader = DataHelper.Instance.ExecuteReader(sql))
{
while (reader.Read())
{
@ -198,7 +90,7 @@ namespace TagConfig
foreach (TreeNode node in majorTop.Nodes)
{
sql = string.Format("SELECT GroupID,DriverID,GroupName,UpdateRate,DeadBand,IsActive FROM META_GROUP WHERE DriverID={0};", node.Name);
using (var reader = DataHelper.ExecuteReader(sql))
using (var reader = DataHelper.Instance.ExecuteReader(sql))
{
while (reader.Read())
{
@ -212,7 +104,7 @@ namespace TagConfig
+ "(SELECT COUNT(1) FROM Meta_Condition WHERE Source=t.TagName) HasAlarm," +
"(SELECT COUNT(1) FROM Meta_Scale WHERE ScaleID=t.TagID) HasScale,"
+ "Archive,DefaultValue,Description,Maximum,Minimum,Cycle FROM Meta_Tag t WHERE DataType<12";
using (var reader = DataHelper.ExecuteReader(sql))
using (var reader = DataHelper.Instance.ExecuteReader(sql))
{
while (reader.Read())
{
@ -223,7 +115,7 @@ namespace TagConfig
}
}
sql = "SELECT TypeID,Source,AlarmType,EventType,ConditionType,Para,IsEnabled,Deadband,Delay,Comment FROM Meta_Condition";
using (var reader = DataHelper.ExecuteReader(sql))
using (var reader = DataHelper.Instance.ExecuteReader(sql))
{
while (reader.Read())
{
@ -233,7 +125,7 @@ namespace TagConfig
}
}
sql = "SELECT IsEnable,Severity,ConditionID,SubAlarmType,Threshold,Message FROM Meta_SubCondition";
using (var reader = DataHelper.ExecuteReader(sql))
using (var reader = DataHelper.Instance.ExecuteReader(sql))
{
while (reader.Read())
{
@ -243,7 +135,7 @@ namespace TagConfig
}
}
sql = "SELECT ScaleID,ScaleType,EUHI,EULO,RAWHI,RAWLO FROM Meta_Scale";
using (var reader = DataHelper.ExecuteReader(sql))
using (var reader = DataHelper.Instance.ExecuteReader(sql))
{
while (reader.Read())
{
@ -281,7 +173,7 @@ namespace TagConfig
condition.SubConditions.Add(sub);
}
}
var obj = DataHelper.ExecuteScalar("SELECT MAX(TypeID) FROM Meta_Condition");
var obj = DataHelper.Instance.ExecuteScalar("SELECT MAX(TypeID) FROM Meta_Condition");
if (obj != DBNull.Value) Program.MAXCONDITIONID = (int)obj;
start = true;
}
@ -290,63 +182,28 @@ namespace TagConfig
{
dataGridView1.CurrentCell = null;
bindingSource1.EndEdit();
//subConds.Clear();
//foreach (var cond in conditions)
//{
// foreach (var sub in cond.SubConditions)
// {
// //sub.ConditionId = cond.TypeId;
// subConds.Add(sub);
// }
//}
TagDataReader reader = new TagDataReader(list);
ConditionReader condReader = new ConditionReader(conditions);
SubConditionReader subReader = new SubConditionReader(subConds);
ScaleReader scalereader = new ScaleReader(scaleList);
SqlConnection m_Conn = new SqlConnection(DataHelper.m_ConnStr);
SqlTransaction sqlT = null;
try
string sql = "DELETE FROM Meta_Driver;DELETE FROM Meta_Group;";
foreach (Driver device in devices)
{
if (m_Conn.State == ConnectionState.Closed)
m_Conn.Open();
sqlT = m_Conn.BeginTransaction();
string sql = "DELETE FROM Meta_Tag;DELETE FROM Meta_Driver;DELETE FROM Meta_Group;DELETE FROM Meta_Condition;DELETE FROM Meta_SubCondition;DELETE FROM Meta_Scale;";
foreach (Driver device in devices)
{
sql = string.Concat(sql, string.Format("INSERT INTO Meta_Driver(DriverID,DriverName,DriverType,Server,TimeOut,Spare1,Spare2)"
+ " VALUES({0},'{1}',{2},'{3}',{4},'{5}','{6}');",
device.ID, device.Name, device.DeviceDriver, device.ServerName, device.TimeOut, device.Spare1, device.Spare2));
}
foreach (Group grp in groups)
{
sql = string.Concat(sql, string.Format("INSERT INTO Meta_Group(GroupID,GroupName,DriverID,UpdateRate,DeadBand,IsActive) VALUES({0},'{1}',{2},{3},{4},'{5}');",
grp.ID, grp.Name, grp.DriverID, grp.UpdateRate, grp.DeadBand, grp.Active));
}
SqlCommand cmd = new SqlCommand(sql, m_Conn);
cmd.Transaction = sqlT;
cmd.ExecuteNonQuery();
SqlBulkCopy bulk = new SqlBulkCopy(m_Conn, SqlBulkCopyOptions.KeepIdentity, sqlT);
bulk.DestinationTableName = "Meta_Tag";
bulk.WriteToServer(reader);
bulk.DestinationTableName = "Meta_Condition";
bulk.WriteToServer(condReader);
bulk.DestinationTableName = "Meta_SubCondition";
bulk.WriteToServer(subReader);
bulk.DestinationTableName = "Meta_Scale";
bulk.WriteToServer(scalereader);
//cmd.CommandText = "";
sqlT.Commit();
m_Conn.Close();
//var obj = DataHelper.ExecuteScalar("SELECT MAX(TypeID) FROM Meta_Condition");
//if (obj != DBNull.Value) Program.MAXCONDITIONID = (int)obj;
sql = string.Concat(sql, string.Format("INSERT INTO Meta_Driver(DriverID,DriverName,DriverType,Server,TimeOut,Spare1,Spare2)"
+ " VALUES({0},'{1}',{2},'{3}',{4},'{5}','{6}');",
device.ID, device.Name, device.DeviceDriver, device.ServerName, device.TimeOut, device.Spare1, device.Spare2));
}
catch (Exception e)
foreach (Group grp in groups)
{
if (sqlT != null)
sqlT.Rollback();
m_Conn.Close();
Program.AddErrorLog(e);
sql = string.Concat(sql, string.Format("INSERT INTO Meta_Group(GroupID,GroupName,DriverID,UpdateRate,DeadBand,IsActive) VALUES({0},'{1}',{2},{3},{4},'{5}');",
grp.ID, grp.Name, grp.DriverID, grp.UpdateRate, grp.DeadBand, grp.Active));
}
DataHelper.Instance.ExecuteNonQuery(sql);
DataHelper.Instance.BulkCopy(reader, "Meta_Tag", "DELETE FROM Meta_Tag", SqlBulkCopyOptions.KeepIdentity);
DataHelper.Instance.BulkCopy(condReader, "Meta_Condition", "DELETE FROM Meta_Condition", SqlBulkCopyOptions.KeepIdentity);
DataHelper.Instance.BulkCopy(subReader, "Meta_SubCondition", "DELETE FROM Meta_SubCondition", SqlBulkCopyOptions.KeepIdentity);
DataHelper.Instance.BulkCopy(scalereader, "Meta_Scale", "DELETE FROM Meta_Scale", SqlBulkCopyOptions.KeepIdentity);
}
private void LoadFromXml(string file)
@ -1396,7 +1253,7 @@ namespace TagConfig
if (autolist == null)
{
var templist = new List<string> { "@Time", "@Date", "@DateTime", "@User", "@AppName", "@LocName", "@Region", "@Path" };
using (var reader = DataHelper.ExecuteReader("SELECT ISNULL(TagName,'') FROM Meta_Tag ORDER BY TagName"))
using (var reader = DataHelper.Instance.ExecuteReader("SELECT ISNULL(TagName,'') FROM Meta_Tag ORDER BY TagName"))
{
while (reader.Read())
{

0
SCADA/TagConfig/TagConfig/Form1.resx → SCADA/Program/TagConfig/TagConfig/Form1.resx

0
SCADA/TagConfig/TagConfig/GroupParam.Designer.cs → SCADA/Program/TagConfig/TagConfig/GroupParam.Designer.cs

0
SCADA/TagConfig/TagConfig/GroupParam.cs → SCADA/Program/TagConfig/TagConfig/GroupParam.cs

0
SCADA/TagConfig/TagConfig/GroupParam.resx → SCADA/Program/TagConfig/TagConfig/GroupParam.resx

0
SCADA/TagConfig/TagConfig/Program.cs → SCADA/Program/TagConfig/TagConfig/Program.cs

0
SCADA/TagConfig/TagConfig/Properties/AssemblyInfo.cs → SCADA/Program/TagConfig/TagConfig/Properties/AssemblyInfo.cs

0
SCADA/TagConfig/TagConfig/Properties/Resources.Designer.cs → SCADA/Program/TagConfig/TagConfig/Properties/Resources.Designer.cs

0
SCADA/TagConfig/TagConfig/Properties/Resources.resx → SCADA/Program/TagConfig/TagConfig/Properties/Resources.resx

0
SCADA/TagConfig/TagConfig/Properties/Settings.Designer.cs → SCADA/Program/TagConfig/TagConfig/Properties/Settings.Designer.cs

0
SCADA/TagConfig/TagConfig/Properties/Settings.settings → SCADA/Program/TagConfig/TagConfig/Properties/Settings.settings

0
SCADA/TagConfig/TagConfig/RegisterSet.Designer.cs → SCADA/Program/TagConfig/TagConfig/RegisterSet.Designer.cs

5
SCADA/TagConfig/TagConfig/RegisterSet.cs → SCADA/Program/TagConfig/TagConfig/RegisterSet.cs

@ -1,4 +1,5 @@
using System;
using DatabaseLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
@ -98,7 +99,7 @@ namespace TagConfig
.Append("','").Append(reg.Description).Append("');");
}
}
if (DataHelper.ExecuteNonQuery(sb.ToString()) >= 0)
if (DataHelper.Instance.ExecuteNonQuery(sb.ToString()) >= 0)
MessageBox.Show("注册成功!");
}
}

0
SCADA/TagConfig/TagConfig/RegisterSet.resx → SCADA/Program/TagConfig/TagConfig/RegisterSet.resx

0
SCADA/TagConfig/TagConfig/Resources/Attribute.gif → SCADA/Program/TagConfig/TagConfig/Resources/Attribute.gif

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

0
SCADA/TagConfig/TagConfig/Resources/Clear.gif → SCADA/Program/TagConfig/TagConfig/Resources/Clear.gif

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

0
SCADA/TagConfig/TagConfig/Resources/Collect.gif → SCADA/Program/TagConfig/TagConfig/Resources/Collect.gif

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 116 B

0
SCADA/TagConfig/TagConfig/Resources/Copy.gif → SCADA/Program/TagConfig/TagConfig/Resources/Copy.gif

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 104 B

0
SCADA/TagConfig/TagConfig/Resources/Database.ico → SCADA/Program/TagConfig/TagConfig/Resources/Database.ico

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

0
SCADA/TagConfig/TagConfig/Resources/Delete.gif → SCADA/Program/TagConfig/TagConfig/Resources/Delete.gif

Before

Width:  |  Height:  |  Size: 85 B

After

Width:  |  Height:  |  Size: 85 B

0
SCADA/TagConfig/TagConfig/Resources/Excel.gif → SCADA/Program/TagConfig/TagConfig/Resources/Excel.gif

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

0
SCADA/TagConfig/TagConfig/Resources/Exit.gif → SCADA/Program/TagConfig/TagConfig/Resources/Exit.gif

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

0
SCADA/TagConfig/TagConfig/Resources/Find.gif → SCADA/Program/TagConfig/TagConfig/Resources/Find.gif

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 107 B

0
SCADA/TagConfig/TagConfig/Resources/Help.gif → SCADA/Program/TagConfig/TagConfig/Resources/Help.gif

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 110 B

0
SCADA/TagConfig/TagConfig/Resources/Link.ico → SCADA/Program/TagConfig/TagConfig/Resources/Link.ico

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

0
SCADA/TagConfig/TagConfig/Resources/PPrint.gif → SCADA/Program/TagConfig/TagConfig/Resources/PPrint.gif

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 120 B

0
SCADA/TagConfig/TagConfig/Resources/PSave.gif → SCADA/Program/TagConfig/TagConfig/Resources/PSave.gif

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 116 B

0
SCADA/TagConfig/TagConfig/Resources/Page-Setup.ico → SCADA/Program/TagConfig/TagConfig/Resources/Page-Setup.ico

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

0
SCADA/TagConfig/TagConfig/Resources/Timer.gif → SCADA/Program/TagConfig/TagConfig/Resources/Timer.gif

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 626 B

0
SCADA/TagConfig/TagConfig/Resources/Tip.ico → SCADA/Program/TagConfig/TagConfig/Resources/Tip.ico

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

0
SCADA/TagConfig/TagConfig/Resources/Tool.gif → SCADA/Program/TagConfig/TagConfig/Resources/Tool.gif

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 117 B

0
SCADA/TagConfig/TagConfig/ScaleParam.Designer.cs → SCADA/Program/TagConfig/TagConfig/ScaleParam.Designer.cs

0
SCADA/TagConfig/TagConfig/ScaleParam.cs → SCADA/Program/TagConfig/TagConfig/ScaleParam.cs

0
SCADA/TagConfig/TagConfig/ScaleParam.resx → SCADA/Program/TagConfig/TagConfig/ScaleParam.resx

6
SCADA/TagConfig/TagConfig/TagConfig.csproj → SCADA/Program/TagConfig/TagConfig/TagConfig.csproj

@ -200,6 +200,12 @@
<None Include="Resources\Page-Setup1.ico" />
<Content Include="Wizard.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DataHelper\DataHelper.csproj">
<Project>{755c5459-bca4-4729-a93c-0c73a41bdf3c}</Project>
<Name>DataHelper</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

0
SCADA/TagConfig/TagConfig/TagData.cs → SCADA/Program/TagConfig/TagConfig/TagData.cs

0
SCADA/TagConfig/TagConfig/TagParam.Designer.cs → SCADA/Program/TagConfig/TagConfig/TagParam.Designer.cs

0
SCADA/TagConfig/TagConfig/TagParam.cs → SCADA/Program/TagConfig/TagConfig/TagParam.cs

0
SCADA/TagConfig/TagConfig/TagParam.resx → SCADA/Program/TagConfig/TagConfig/TagParam.resx

0
SCADA/TagConfig/TagConfig/Wizard.ico → SCADA/Program/TagConfig/TagConfig/Wizard.ico

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

0
SCADA/TagConfig/TagConfig/app.config → SCADA/Program/TagConfig/TagConfig/app.config

82
SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/CHANGES

@ -0,0 +1,82 @@
6.9.10
- Added user contribution in bug MySql.Web.Security.CreateUserInUserTable does not work (MySQL Bug #83656, Oracle Bug # 25046364).
- Fixed incorrect encoding in connection passwords (MySQL Bug #80611, Oracle Bug #23257011).
6.9.9
- Fix for Nested transactions are not supported in Entity Framework (MySQL Bug #71502, Oracle Bug #22366266).
- Fix for EF5 and EF6 wrong SQL statement to set primary key (MySQL Bug 76292, Oracle Bug #20711384)
- Fixed problem where mysql.proc tables would not be used for metadata even though access was available (MySQL Bug #74116, Oracle Bug #20960373)
- Added support for TLSv1.1 and TLSv1.2
- Fixed Fix for "Aborted connection" (MySQL Bug #80997, Oracle Bug # 23346197).
6.9.8
- Added support for Chinese character set gb18030. (Oracle bug # 21098546).
- Added support for Json type. (WL # 8132).
- Added changes for metadata information in generated columns with 5.7 (WL #411)
6.9.7
- Changed default SSL mode to Preferred in connection string. Now the server connections will be using SSL if server allows it by default but it's possible to override this configuration.
- Changed handshake process to use bytes instead of encoded strings.
- Fix for Fabric connections (Oracle Bug #20983968).
- Fix for Fabric plugin: fabric server selection is broken when master is faulty (Oracle Bug #21203824).
6.9.6
- Fix for Incorrect query result with Entity Framework 6 (MySql bug #74918, Oracle bug #20129927).
- Fix for GetTimeZoneOffset to use date and time to calculate timediff (MySQL Bug #74905, Oracle Bug #20065691).
- Fix for MySqlSimpleMembershipProvider keeps database connections open on some operations (MySQL Bug #74662, Oracle Bug #20109419)
- Fix for Any Call to RoleExists() returns true whether or not the role exists (MySql bug #75397, Oracle bug #20325391).
- Fix for all dateTimes set as UTC Kind (MySQL Bug #74134, Oracle Bug #20200662).
- Fix for Invalid SQL query when eager loading two nested collections (MySQL Bug #70941, Oracle bug #18049862).
- Fix for chinese characters used in the connection string when connecting to MySql Server (MySQL Bug #70041, Oracle Bug #18141356).
6.9.5
- Disabled installation on-demand in Installer (Oracle Bug #19670596).
- Fix for Generated SQL requests column that doesn't exist in LINQ to Entities (MySql bug #72004, Oracle bug #19681348).
- Fix for MySQL Connector/NET generates incorrect SQL for LINQ 'StartsWith' queries (MySql bug #72058, Oracle bug #19680236).
- Fix for Exception when using IEnumerable.Contains(model.property) in Where predicate (MySql bug #73643, Oracle bug #19690370).
- Fix for Generated Sql does not contain ORDER BY statement whose is requested by LINQ (MySql bug #73549, Oracle bug #19698010).
- Fix for Web providers registration in machine.config (removed v20 suffix) (MySQL Bug #74080, Oracle Bug #19715398)
- Fix for Error of "Every derived table must have an alias" in LINQ to Entities when using EF6 + DbFirst + View + Take
(MySql Bug #72148, Oracle bug #19356006).
- Fix for 'the method or operation is not implemented' when using linq with orderby (MySQL Bug #70722, Oracle Bug #19681723).
- Fix for Exception "The given key was not present in the dictionary" when using utf16le charset in a query. (MySql #72737, Oracle Bug #19355906)
- Fix for Memory leak in a loop opening a connection to the database and executing a command (MySql Bug #73122, Oracle Bug #19467233).
- Fix for Multiple issues caused by trailing and leading white space character in params using MySql Membership Provider (MySql Bug #73411, Oracle Bug #19453313)
- Fix for bad assumption leads to modify query adding CALL statement to the beginning of the sql query even when CommandType.Text is specified (MySql Bug #72736, Oracle Bug #19325120).
6.9.4
- Added a new plugin for MySql Fabric 1.5 support
6.9.3
- Fix for Web Parts Personalization provider
- Fix for changing the PK between two int columns (MySql Bug #71418, Oracle bug #18923294).
- Fix for Error when Calling MySqlConnection.GetSchema("PROCEDURES WITH PARAMETERS", ...) (Oracle bug #19285959).
- Fix for EF provider reports ManifestProviderToken = 5.6 for server 5.7 (Oracle bug #19453814).
- Fix for Fluent API DbModelBuilder.HasColumnType is ignored in EF6 (Oracle bug #19456229).
- Fix for Setting a PK GUID identity in Code First in EF6 no longer works in Server 5.7 (Oracle bug #19456452).
- Non PKs declared as Identity GUID have no GUID autogenerated (Oracle bug #19456415).
6.9.2
- Add async/await compatible methods
- Fix for Unable to read geometry column when it has been set with a SRID value. (MySql Bug #71869, Oracle Bug #19137999)
- Fix for Exception adding a new column to an existing model as identity and PK fails when applying the migration (MySql Bug #71418, Oracle bug #18923294).
- Added SiteMap and Personalization configuration web providers to MySql.Web Nuget Package.
6.9.1
- Fix for Exception of "duplicate entry" in MySqlSessionProvider (MySql Bug #70409, Oracle bug #18657550).
6.9.0
- Added implementation of MySQLPersonalizationProvider.
- Added SiteMap Web provider.
- Added Simple Membership Web Provider.
- Fix for open sockets connections left when connection open fails, the error happens when the client try to get a connection when the max number of connections is reached in the server. (MySql #72025, Oracle Bug #18665388).

BIN
SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/MySql.Data.6.9.10.nupkg

Binary file not shown.

15
SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/Readme.txt

@ -0,0 +1,15 @@
Connector/Net 6.9 Release Notes
------------------------------------
Welcome to the release notes for Connector/Net 6.9
What's new in 6.9
--------------------
- Simple Membership Web Provider
- Site Map Web Provider
- Personalization Web Provider
- MySql Fabric support
Be sure and check the documentation for more information on these new features.

9
SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/content/app.config.transform

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
</configuration>

9
SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/content/web.config.transform

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
</configuration>

BIN
SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/lib/net40/MySql.Data.dll

Binary file not shown.

BIN
SCADA/Program/TagConfig/packages/MySql.Data.6.9.10/lib/net45/MySql.Data.dll

Binary file not shown.

BIN
SCADA/TagConfig/DataService.dll

Binary file not shown.

BIN
SCADA/TagConfig/TagConfig.exe

Binary file not shown.

32
SCADA/TagConfig/TagConfig.sln

@ -1,32 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagConfig", "TagConfig\TagConfig.csproj", "{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Any CPU.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|Mixed Platforms.Build.0 = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x86.ActiveCfg = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Debug|x86.Build.0 = Debug|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Any CPU.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Mixed Platforms.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|Mixed Platforms.Build.0 = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x86.ActiveCfg = Release|x86
{18F86945-9CB9-4149-A09C-85B8C5C7C4ED}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

739
SCADA/TagConfig/TagConfig/DataHelper.cs

@ -1,739 +0,0 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
namespace TagConfig
{
public static class DataHelper //:MarshalByRefObject
{
public static string m_ConnStr = null;
public static void CallException(string message)
{
Program.AddErrorLog(new Exception(message));
}
public static DataTable ConvertTextToTable(string str)
{
if (string.IsNullOrEmpty(str)) return null;
DataTable mydt = new DataTable("");
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(str)))
{
using (var mysr = new StreamReader(stream))
{
string strline = mysr.ReadLine();
string[] aryline = strline.Split('\t');
for (int i = 0; i < aryline.Length; i++)
{
aryline[i] = aryline[i].Replace("\"", "");
mydt.Columns.Add(new DataColumn(aryline[i] + i));
}
int intColCount = aryline.Length;
while ((strline = mysr.ReadLine()) != null)
{
aryline = strline.Split('\t');
DataRow mydr = mydt.NewRow();
for (int i = 0; i < intColCount; i++)
{
mydr[i] = aryline[i].Replace("\"", "");
}
mydt.Rows.Add(mydr);
}
return mydt;
}
}
}
public static DataTable ConvertCSVToTable(string str)
{
DataTable mydt = new DataTable("");
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(str)))
{
using (var mysr = new StreamReader(stream))
{
string strline = mysr.ReadLine();
Regex reg = new Regex(@",(?=(?:[^\""]*\""[^\""]*\"")*(?![^\""]*\""))");
string[] aryline = reg.Split(strline);
for (int i = 0; i < aryline.Length; i++)
{
aryline[i] = aryline[i].Replace("\"", "");
mydt.Columns.Add(new DataColumn(aryline[i]));
}
int intColCount = aryline.Length;
while ((strline = mysr.ReadLine()) != null)
{
aryline = reg.Split(strline);
DataRow mydr = mydt.NewRow();
for (int i = 0; i < intColCount; i++)
{
mydr[i] = aryline[i].Replace("\"", "");
}
mydt.Rows.Add(mydr);
}
return mydt;
}
}
}
public static bool ConnectionTest()
{
//创建连接对象
SqlConnection m_Conn = new SqlConnection(m_ConnStr);
//mySqlConnection.ConnectionTimeout = 1;//设置连接超时的时间
try
{
//Open DataBase
//打开数据库
m_Conn.Open();
if (m_Conn.State == ConnectionState.Open)
{
m_Conn.Close();
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 //执行查询语句,返回一个记录集
/// <summary>
/// 返回记录集
/// </summary>
/// <param name="SQL">用于返回记录集的SQL语句</param>
/// <returns>记录集</returns>
public static DataSet ExecuteDataset(string SQL)
{
DataSet ds = new DataSet();
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);
}
catch (Exception e)
{
CallException(e.Message);
}
return ds;
}
/// <summary>
/// 返回记录集
/// </summary>
/// <param name="SQL">用于返回记录集的SQL语句</param>
/// <param name="TableName">映射表名</param>
/// <returns>记录集</returns>
public static DataSet ExecuteDataset(string SQL, string TableName)
{
DataSet ds = new DataSet();
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(e.Message);
}
return ds;
}
/// <summary>
/// 返回包含多个表的记录集
/// </summary>
/// <param name="SQLs">用于返回记录集的SQL语句</param>
/// <param name="TableNames">映射表名</param>
/// <returns>记录集</returns>
public static DataSet ExecuteDataset(string[] SQLs, string[] TableNames)
{
DataSet ds = new DataSet();
try
{
SqlConnection m_Conn;
m_Conn = new SqlConnection(m_ConnStr);
for (int i = 0; i < SQLs.Length; i++)
{
SqlDataAdapter da = new SqlDataAdapter();
SqlCommand cmd = new SqlCommand(SQLs[i], m_Conn);
da.SelectCommand = cmd;
da.Fill(ds, TableNames[i]);
}
}
catch (Exception e)
{
CallException(e.Message);
}
return ds;
}
#endregion ExecuteDataset
/// <summary>
/// 返回表
/// </summary>
/// <param name="SQL">用于返回记录集的SQL语句</param>
/// <returns>记录集</returns>
public static DataTable ExecuteDataTable(string SQL)
{
DataTable dt = new DataTable();
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(dt);
}
catch (Exception e)
{
CallException(e.Message);
}
return dt;
}
#region ExecuteNonQuery //执行非查询语句
/// <summary>
/// 执行一条INSERT、UPDATE、DELETE语句
/// </summary>
/// <param name="SQL">T-SQL语句</param>
/// <returns>返回影响的行数</returns>
public static int ExecuteNonQuery(string SQL)
{
int res = -1;
SqlConnection m_Conn;
m_Conn = new SqlConnection(m_ConnStr);
SqlTransaction sqlT = null;
try
{
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();
m_Conn.Close();
}
catch (Exception e)
{
if (sqlT != null)
sqlT.Rollback();
m_Conn.Close();
CallException(e.Message);
return -1;
}
return res;
}
/// <summary>
/// 执行一组INSERT、UPDATE、DELETE语句
/// </summary>
/// <param name="SQLs">T-SQL语句</param>
/// <returns>返回影响的行数</returns>
public static int ExecuteNonQuery(string[] SQLs)
{
int res = -1;
SqlConnection m_Conn;
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();
m_Conn.Close();
}
catch (Exception e)
{
if (sqlT != null)
sqlT.Rollback();
m_Conn.Close();
CallException(e.Message);
res = -1;
}
return res;
}
/// <summary>
/// 执行一组INSERT、UPDATE、DELETE语句
/// </summary>
/// <param name="SQLs">T-SQL语句</param>
/// <param name="Pars">执行参数</param>
/// <returns>返回影响的行数</returns>
public static int ExecuteNonQuery(string[] SQLs, object[][] Pars)
{
int res = -1;
SqlConnection m_Conn;
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];
cmd.Parameters.Clear();
for (int j = 0; j < Pars[i].Length; j++)
{
cmd.Parameters.AddWithValue("@p" + j.ToString(), Pars[i][j]);
}
res = cmd.ExecuteNonQuery();
}
sqlT.Commit();
m_Conn.Close();
}
catch (Exception e)
{
if (sqlT != null)
sqlT.Rollback();
m_Conn.Close();
CallException(e.Message);
res = -1;
}
return res;
}
#endregion ExecuteNonQuery
#region FillDataSet //填充一个记录集
/// <summary>
/// 用指定的SQL语句来填充一个记录集
/// </summary>
/// <param name="ds">记录集</param>
/// <param name="SQL">SELECT语句</param>
/// <param name="TableName">映射表名</param>
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(e.Message);
}
}
#endregion FillDataSet
#region
// <summary>
/// 返回一个SqlDataReader
/// </summary>
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)
{
command.Parameters.AddRange(ParaName);
}
try
{
if (connection.State == ConnectionState.Closed)
connection.Open();
return command.ExecuteReader(CommandBehavior.CloseConnection);
}
catch (Exception e)
{
CallException(e.Message);
return null;
}
}
#endregion
#region ExecuteScalar //执行查询,并返回查询所返回的结果集中第一行的第一列
/// <summary>
/// 执行查询,并返回查询所返回的结果集中第一行的第一列
/// </summary>
/// <param name="sSQL">SQL语句</param>
/// <returns></returns>
public static object ExecuteScalar(string sSQL)
{
object res = null;
SqlTransaction sqlT = null;
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;
res = cmd.ExecuteScalar();
sqlT.Commit();
m_Conn.Close();
}
catch (Exception e)
{
if (sqlT != null)
sqlT.Rollback();
m_Conn.Close();
CallException(e.Message);
res = null;
}
return res;
}
#endregion ExecuteScalar
#region ExecuteStoredProcedure //执行一个存储过程
/// <summary>
/// 执行一个带参数的存储过程
/// </summary>
/// <param name="ProName">存储过程名</param>
/// <param name="ParaName">参数名称</param>
/// <param name="ParaDir">参数方向,Input参数是输入参数 InputOutput参数既能输入,也能输出 Output参数是输出参数 ReturnValue参数存储过程返回值。</param>
/// <param name="Para">参数对象数组</param>
/// <returns>成功返回true,失败返回false</returns>
public static int ExecuteStoredProcedure(string ProName, params SqlParameter[] ParaName)
{
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)
{
m_Conn.Open();
}
cmd.ExecuteNonQuery();
m_Conn.Close();
return (int)param.Value;
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return -1;
}
}
/// <summary>
/// 执行一个没有参数和返回值的存储过程(默认参数类型)
/// </summary>
/// <param name="ProName">存储过程名</param>
/// <param name="Para">参数对象数组</param>
/// <returns>成功返回true,失败返回false</returns>
public static bool ExecuteStoredProcedure(string ProName)
{
SqlConnection m_Conn;
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();
m_Conn.Close();
return true;
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return false;
}
}
/// <summary>
/// 执行一个带参数的存储过程,并返回数据集
/// </summary>
/// <param name="ProName">存储过程名</param>
/// <param name="ParaName">参数名称</param>
/// <param name="Para">参数对象数组</param>
/// <param name="ds">执行过程中返回的数据集</param>
/// <returns>成功返回true,失败返回false</returns>
public static DataSet ExecuteDataSetProcedure(string ProName, ref int returnValue, params SqlParameter[] ParaName)
{
SqlConnection m_Conn = new SqlConnection(m_ConnStr); ;
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);
m_Conn.Close();
returnValue = (int)param.Value;
return ds;
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return null;
}
}
public static DataSet ExecuteDataSetProcedure(string ProName, params SqlParameter[] ParaName)
{
SqlConnection m_Conn = new SqlConnection(m_ConnStr); ;
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);
m_Conn.Close();
return ds;
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return null;
}
}
/// <summary>
/// 执行一个带参数的存储过程,并返回数据集
/// </summary>
/// <param name="ProName">存储过程名</param>
/// <param name="ParaName">参数名称</param>
/// <param name="Para">参数对象数组</param>
/// <param name="ds">执行过程中返回的数据集</param>
/// <returns>成功返回true,失败返回false</returns>
///
public static DataTable ExecuteDataTableProcedure(string ProName, params SqlParameter[] ParaName)
{
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);
m_Conn.Close();
return ds;
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return null;
}
}
public static DataTable ExecuteDataTableProcedure(string ProName, ref int returnValue, SqlParameter[] ParaName)
{
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);
}
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);
m_Conn.Close();
returnValue = (int)param.Value;
return ds;
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return null;
}
}
/// <summary>
/// 执行一个带参数的存储过程,同时输出一行
/// </summary>
/// <param name="ProName">存储过程名</param>
/// <param name="ParaName">参数名称</param>
/// <param name="Para">参数对象数组</param>
/// <returns>返回整数</returns>
public static DataRow ExecuteDataRowProcedure(string ProName, params SqlParameter[] ParaName)
{
SqlConnection m_Conn = new SqlConnection(m_ConnStr);
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);
m_Conn.Close();
if (table.Rows.Count > 0)
return table.Rows[0];
else
return table.NewRow();
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return null;
}
}
/// <summary>
/// 执行一个带参数的存储过程,同时输出一行
/// </summary>
/// <param name="ProName">存储过程名</param>
/// <param name="ParaName">参数名称</param>
/// <param name="Para">参数对象数组</param>
/// <returns>返回整数</returns>
public static DataRowView ExecuteDataRowViewProcedure(string ProName, params SqlParameter[] ParaName)
{
SqlConnection m_Conn = new SqlConnection(m_ConnStr);
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);
m_Conn.Close();
if (table.Rows.Count > 0)
return table.DefaultView[0];
else
return table.DefaultView.AddNew();
}
catch (Exception e)
{
m_Conn.Close();
CallException(e.Message);
return null;
}
}
#endregion ExecuteStoredProcedure
}
}

BIN
SCADA/TagConfig/TagConfig/bin/Debug/DataService.dll

Binary file not shown.

6
SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.exe.config

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

BIN
SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.vshost.exe

Binary file not shown.

6
SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.vshost.exe.config

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

11
SCADA/TagConfig/TagConfig/bin/Debug/TagConfig.vshost.exe.manifest

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

BIN
SCADA/TagConfig/TagConfig/bin/Release/DataService.dll

Binary file not shown.

6
SCADA/TagConfig/TagConfig/bin/Release/TagConfig.exe.config

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

BIN
SCADA/TagConfig/TagConfig/bin/Release/TagConfig.vshost.exe

Binary file not shown.

6
SCADA/TagConfig/TagConfig/bin/Release/TagConfig.vshost.exe.config

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>

11
SCADA/TagConfig/TagConfig/bin/Release/TagConfig.vshost.exe.manifest

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

1
SCADA/TagConfig/TagConfig/obj/x86/Debug/TagConfig.csproj.FileListAbsolute.txt

@ -1 +0,0 @@
C:\Users\Yinan\Documents\Github\SharpSCADA\SCADA\TagConfig\TagConfig\bin\Debug\TagConfig.exe.config
Loading…
Cancel
Save