chore: 初始化合力驱动桥MES采集程序
This commit is contained in:
25
MisDataPlcTagID/MisDataPlcTagID.sln
Normal file
25
MisDataPlcTagID/MisDataPlcTagID.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.32929.386
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MisDataPlcTagID", "MisDataPlcTagID\MisDataPlcTagID.csproj", "{0F887AB8-1BC5-4EF0-9240-E7AFD91A9911}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0F887AB8-1BC5-4EF0-9240-E7AFD91A9911}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0F887AB8-1BC5-4EF0-9240-E7AFD91A9911}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0F887AB8-1BC5-4EF0-9240-E7AFD91A9911}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0F887AB8-1BC5-4EF0-9240-E7AFD91A9911}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B0928489-1030-4953-9B89-CE088204B0F0}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
148
MisDataPlcTagID/MisDataPlcTagID/20-12MisDataPlcTagID.csproj
Normal file
148
MisDataPlcTagID/MisDataPlcTagID/20-12MisDataPlcTagID.csproj
Normal file
@@ -0,0 +1,148 @@
|
||||
<?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>{0F887AB8-1BC5-4EF0-9240-E7AFD91A9911}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MisDataPlcTagID</RootNamespace>
|
||||
<AssemblyName>MisDataPlcTagID</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</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>
|
||||
</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>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MQTTnet">
|
||||
<HintPath>..\..\..\Common\dll\MQTTnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MQTTnet.Extensions.ManagedClient">
|
||||
<HintPath>..\..\..\Common\dll\MQTTnet.Extensions.ManagedClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="ListViewNF .cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ManualSimulateSignal.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ManualSimulateSignalSim.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MisDataWebFun.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MisDataWebFun.Designer.cs">
|
||||
<DependentUpon>MisDataWebFun.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MisDataWebFunSim.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MisDataWebFunSim.Designer.cs">
|
||||
<DependentUpon>MisDataWebFunSim.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ReadThisStationProductInfo.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ReadThisStationProductInfoSim.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WriteQualityValueForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WriteQualityValueForm.Designer.cs">
|
||||
<DependentUpon>WriteQualityValueForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WriteQualityValueFormSim.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WriteQualityValueFormSim.Designer.cs">
|
||||
<DependentUpon>WriteQualityValueFormSim.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="MisDataWebFun.resx">
|
||||
<DependentUpon>MisDataWebFun.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MisDataWebFunSim.resx">
|
||||
<DependentUpon>MisDataWebFunSim.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="WriteQualityValueForm.resx">
|
||||
<DependentUpon>WriteQualityValueForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="WriteQualityValueFormSim.resx">
|
||||
<DependentUpon>WriteQualityValueFormSim.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\00-1Json8.3\Json8.3\00-0Json8.3.1.csproj">
|
||||
<Project>{1a10fdb2-1a6a-44a8-ab4d-33387563247e}</Project>
|
||||
<Name>00-0Json8.3.1</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\00MesWorkMqtt\MesWorkMqtt\00MesWorkMqtt.csproj">
|
||||
<Project>{f55da1a0-a982-4479-8c47-0d9a5aaf3e18}</Project>
|
||||
<Name>00MesWorkMqtt</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\01DoWhatPlc\01_01DoWhatPlc.csproj">
|
||||
<Project>{0d1af432-439a-4920-8692-43ae139f5530}</Project>
|
||||
<Name>01_01DoWhatPlc</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\02WebApiCall\02_02WebApiCallPLC.csproj">
|
||||
<Project>{3e6d1dd5-01c9-435f-9941-61f906ce35bb}</Project>
|
||||
<Name>02_02WebApiCallPLC</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\07WebBusinessFacade\BusinessFacade\07BusinessFacade.csproj">
|
||||
<Project>{f0a0c525-03fd-428a-9b17-7f54aa0e4475}</Project>
|
||||
<Name>07BusinessFacade</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\08WebFun_base\WebFun_base\08-WebFun_base.csproj">
|
||||
<Project>{d98be764-adeb-488d-9714-61e308aa8201}</Project>
|
||||
<Name>08-WebFun_base</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\09MesDataFunction\MesDataFunction\09-MesDataFunction.csproj">
|
||||
<Project>{90e76fb4-646d-45e2-95db-0b8ab4e465d6}</Project>
|
||||
<Name>09-MesDataFunction</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Foundation\20-04Foundation.csproj">
|
||||
<Project>{7a8cc5ec-9795-4fcd-a85f-bb01da377225}</Project>
|
||||
<Name>20-04Foundation</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ModelBasic\20-06BasicOperation.csproj">
|
||||
<Project>{b258f56f-59e9-4c6f-bcc0-04a151d51251}</Project>
|
||||
<Name>20-06BasicOperation</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
12
MisDataPlcTagID/MisDataPlcTagID/Class1.cs
Normal file
12
MisDataPlcTagID/MisDataPlcTagID/Class1.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MisDataPlcTagID
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
28
MisDataPlcTagID/MisDataPlcTagID/ListViewNF .cs
Normal file
28
MisDataPlcTagID/MisDataPlcTagID/ListViewNF .cs
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
namespace ListViewDouble
|
||||
{
|
||||
class ListViewNF : System.Windows.Forms.ListView
|
||||
{
|
||||
public ListViewNF()
|
||||
{
|
||||
// 开启双缓冲
|
||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
|
||||
// Enable the OnNotifyMessage event so we get a chance to filter out
|
||||
// Windows messages before they get to the form's WndProc
|
||||
this.SetStyle(ControlStyles.EnableNotifyMessage, true);
|
||||
}
|
||||
protected override void OnNotifyMessage(Message m)
|
||||
{
|
||||
//Filter out the WM_ERASEBKGND message
|
||||
if (m.Msg != 0x14)
|
||||
{
|
||||
base.OnNotifyMessage(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
522
MisDataPlcTagID/MisDataPlcTagID/ManualSimulateSignal.cs
Normal file
522
MisDataPlcTagID/MisDataPlcTagID/ManualSimulateSignal.cs
Normal file
@@ -0,0 +1,522 @@
|
||||
//using BasicData;
|
||||
|
||||
using DoWhatPlc;
|
||||
using MesServerWork;
|
||||
using MisDataFunction;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
//using SystemFramework;
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
public partial class MisData:Form
|
||||
{
|
||||
public void InitFormBtnColor()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Cbx_StatusDisplay.Checked) return;
|
||||
string OpName = WorkStationNum_Now;
|
||||
foreach (Control GroupBox in this.groupBox_SignialSimulator.Controls)
|
||||
{
|
||||
foreach (Control Btn in GroupBox.Controls)
|
||||
{
|
||||
if (Btn.Name.Length < 8) continue;
|
||||
if (Btn.Name.Substring(0, 8) == "Btn_PLC_" || Btn.Name.Substring(0, 8) == "Btn_MES_")
|
||||
{
|
||||
ControlData Ctrl1 = new ControlData(Btn, OpName);
|
||||
Thread t=new Thread(new ParameterizedThreadStart(InitFormBtn_Thread));
|
||||
t.Start(Ctrl1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static object test;
|
||||
static void InitFormBtn_Thread(Object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
ControlData Btn = (ControlData)obj;
|
||||
|
||||
test = DtWebApi.ReadWritePLC.ReadPLC(Btn.TagType.ToString(), Btn.opName);
|
||||
|
||||
bool Result = Convert.ToBoolean(test);
|
||||
if (Btn.btn.InvokeRequired)
|
||||
{
|
||||
Action<System.Drawing.Color> actionDelegate = (x) => { Btn.btn.BackColor = x; };
|
||||
if (Result)
|
||||
{
|
||||
Btn.btn.BeginInvoke(actionDelegate, System.Drawing.Color.Green);
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.btn.BeginInvoke(actionDelegate, System.Drawing.Color.SlateGray);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Result)
|
||||
{
|
||||
Btn.btn.BackColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.btn.BackColor = System.Drawing.Color.SlateGray;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
ControlData Btn = (ControlData)obj;
|
||||
//ApplicationLog.WriteLog(err, err.Message+"采集数据值:"+ ";按钮名称:"+test+ Btn.btn .Name +"工位号"+ WorkStationNum_Now);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 通过点击界面按钮写入Bool信号
|
||||
/// </summary>
|
||||
/// <param name="tagType"></param>
|
||||
/// <param name="opName"></param>
|
||||
private void WriteBoolSignalByFormBtn(Object Sender)
|
||||
{
|
||||
try
|
||||
{
|
||||
string BtnName = ((System.Windows.Forms.Control)Sender).Name;
|
||||
string[] Array_BtnNameSplit = BtnName.Split('_');
|
||||
int tagType = Convert.ToInt32(Array_BtnNameSplit[2]);
|
||||
string OpName = WorkStationNum_Now;
|
||||
|
||||
QualityDataQueryStruct QualityQueryStruct = new QualityDataQueryStruct(OpName, tagType);
|
||||
Thread t = new Thread(new ParameterizedThreadStart(WriteBoolSignal_Thread));
|
||||
t.Start(QualityQueryStruct);
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void WriteBoolSignal_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QDQ = (QualityDataQueryStruct)obj;
|
||||
if (IsDemoMesServer==1)
|
||||
{
|
||||
string tagValueStr = "";
|
||||
MIS_BASE.Read_TagTypeID(QDQ.tagType, QDQ.OpName, out tagValueStr);
|
||||
|
||||
if (tagValueStr=="1")
|
||||
{
|
||||
tagValueStr = "True";
|
||||
}
|
||||
else if (tagValueStr == "0")
|
||||
{
|
||||
tagValueStr = "False";
|
||||
}
|
||||
|
||||
bool ReadResult = Convert.ToBoolean(tagValueStr);
|
||||
if (ReadResult)
|
||||
{
|
||||
MIS_BASE.Write_TagTypeID(QDQ.tagType, QDQ.OpName, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
MIS_BASE.Write_TagTypeID(QDQ.tagType, QDQ.OpName, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool ReadResult = Convert.ToBoolean(DtWebApi.ReadWritePLC.ReadPLC(QDQ.tagType.ToString(), QDQ.OpName));
|
||||
if (ReadResult)
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(QDQ.tagType.ToString(), QDQ.OpName, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(QDQ.tagType.ToString(), QDQ.OpName, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 写入机型
|
||||
/// </summary>
|
||||
/// <param name="Sender"></param>
|
||||
private void WriteNormalDataBygroupBox_SignialSimulatorWriteBtn(object Sender)
|
||||
{
|
||||
try
|
||||
{
|
||||
string BtnName = ((System.Windows.Forms.Control)Sender).Name;
|
||||
string OpName = WorkStationNum_Now;
|
||||
if (BtnName == "Btn_Write_PLC")
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_PLC.Controls)
|
||||
{
|
||||
if (Tbx.Name.Length < 12) continue;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_PLC_") continue;
|
||||
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
|
||||
HashtableList htList = DtWebApi.OpcDemo.GetHashtableList();
|
||||
int tagDataType = Convert.ToInt32(htList.hashtable_TagTypeDataType[TagType.ToString()]);
|
||||
|
||||
string tagValue = Tbx.Text.Trim();
|
||||
short tagValue_int;
|
||||
string tagValue_str;
|
||||
byte tagValue_byte;
|
||||
bool tagValue_bool;
|
||||
|
||||
switch (tagDataType)
|
||||
{
|
||||
case 2:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
if (tagValue == "") return;
|
||||
tagValue_int = Convert.ToInt16(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_int);
|
||||
break;
|
||||
case 8:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
case 17:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
if (Convert.ToInt32(tagValue) > 255)
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入数据不在范围内");
|
||||
return;
|
||||
}
|
||||
if (tagValue == "") return;
|
||||
tagValue_byte = Convert.ToByte(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_byte);
|
||||
break;
|
||||
case 11:
|
||||
tagValue_bool = Convert.ToBoolean(Convert.ToInt32(tagValue));
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_bool);
|
||||
break;
|
||||
default:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (BtnName == "Btn_Write_MES")
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_MES.Controls)
|
||||
{
|
||||
if (Tbx.Name.Length < 12) continue;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_MES_") continue;
|
||||
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
HashtableList htList = DtWebApi.OpcDemo.GetHashtableList();
|
||||
int tagDataType = Convert.ToInt32(htList.hashtable_TagTypeDataType[TagType.ToString()]);
|
||||
//int tagDataType = Convert.ToInt32(MesDataFunction.OpcOperation.hashtable_TagTypeDataType[TagType.ToString()]);
|
||||
|
||||
string tagValue = Tbx.Text.Trim();
|
||||
short tagValue_int;
|
||||
string tagValue_str;
|
||||
byte tagValue_byte;
|
||||
bool tagValue_bool;
|
||||
|
||||
switch (tagDataType)
|
||||
{
|
||||
case 2:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
tagValue_int = Convert.ToInt16(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_int);
|
||||
break;
|
||||
case 8:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
case 17:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
if (Convert.ToInt32(tagValue) > 255)
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入数据不在范围内");
|
||||
return;
|
||||
}
|
||||
tagValue_byte = Convert.ToByte(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_byte);
|
||||
break;
|
||||
case 11:
|
||||
tagValue_bool = Convert.ToBoolean(Convert.ToInt32(tagValue));
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_bool);
|
||||
break;
|
||||
default:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WriteAnyData_Thread(int tagType, string opName, object tagValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QualityStruct = new QualityDataQueryStruct(opName, tagType, tagValue);
|
||||
|
||||
Thread t = new Thread(new ParameterizedThreadStart(WriteNormalDataBygroupBox_SignialSimulatorWriteBtn_Thread));
|
||||
t.Start(QualityStruct);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteNormalDataBygroupBox_SignialSimulatorWriteBtn_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QualityStruct = (QualityDataQueryStruct)obj;
|
||||
|
||||
MIS_BASE.WritePLC(QualityStruct.tagType, QualityStruct. OpName, QualityStruct.tagValue);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据工位号查询质量数据,返回质量数据列表
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
QualityDataType[] ReadPLC_ValueListForQualityDataTypeArray(string opName)
|
||||
{
|
||||
try
|
||||
{
|
||||
int i1 = 0;
|
||||
Hashtable valueList;
|
||||
valueList = Function.ReadPLC_Sync_DataList_MesRead(opName);
|
||||
if (valueList != null)
|
||||
{
|
||||
QualityDataType[] QualityValue = new QualityDataType[valueList.Count];
|
||||
foreach (DictionaryEntry de in valueList)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityValue[i1] = (QualityDataType)de.Value;
|
||||
i1++;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
//ThisWorkStationData = QualityValue;
|
||||
return QualityValue;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//public QualityDataType[] ThisWorkStationData
|
||||
//{ get; set; }
|
||||
|
||||
//object QueryThisWorkStationDataByTagTypeFromThisWorkStationDataProperty(int TagType)
|
||||
//{
|
||||
//try
|
||||
//{
|
||||
// foreach (QualityDataType Data in ThisWorkStationData)
|
||||
// {
|
||||
// if (Data.tagValueType == TagType)
|
||||
// {
|
||||
// return Data.tagValue;
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// return null;
|
||||
//}
|
||||
//catch (Exception err)
|
||||
//{
|
||||
// ApplicationLog.WriteLog(err, err.Message);
|
||||
// return null;
|
||||
//}
|
||||
|
||||
//}
|
||||
|
||||
void RefreshBtnColor(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
ControlChangeByTagType ControlValue = (ControlChangeByTagType)obj;
|
||||
|
||||
if (!Cbx_StatusDisplay.Checked) return;
|
||||
string OpName = WorkStationNum_Now;
|
||||
|
||||
foreach (Control GroupBox in this.groupBox_SignialSimulator.Controls)
|
||||
{
|
||||
foreach (Control Btn in GroupBox.Controls)
|
||||
{
|
||||
if (Btn.Name.Length < 8) continue;
|
||||
if (Btn.Name.Substring(0, 8) == "Btn_PLC_" || Btn.Name.Substring(0, 8) == "Btn_MES_")
|
||||
{
|
||||
string BtnName = Btn.Name;
|
||||
string[] BtnName_SplitArray = BtnName.Split('_');
|
||||
if (Btn.InvokeRequired)
|
||||
{
|
||||
Action<System.Drawing.Color> ActionDelegate = (x) => { Btn.BackColor = x; };
|
||||
if (Convert.ToInt32(BtnName_SplitArray[2]) == ControlValue.TagType)
|
||||
{
|
||||
if (ControlValue.Value == "1")
|
||||
{
|
||||
Btn.BeginInvoke(ActionDelegate, System.Drawing.Color.Green);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.BeginInvoke(ActionDelegate, System.Drawing.Color.LightGray);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Convert.ToInt32(BtnName_SplitArray[2]) == ControlValue.TagType)
|
||||
{
|
||||
if (ControlValue.Value == "1")
|
||||
{
|
||||
Btn.BackColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Btn.BackColor = System.Drawing.Color.LightGray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void RefreshBtnColor_Thread(int TagType, string Value)
|
||||
{
|
||||
ControlChangeByTagType ControlValue = new ControlChangeByTagType(TagType, Value);
|
||||
Thread t = new Thread(new ParameterizedThreadStart(RefreshBtnColor));
|
||||
t.Start(ControlValue);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按钮颜色还原
|
||||
/// </summary>
|
||||
void RefreshBtnColorWriteNull()
|
||||
{
|
||||
try
|
||||
{
|
||||
string OpName = WorkStationNum_Now;
|
||||
|
||||
foreach (Control GroupBox in this.groupBox_SignialSimulator.Controls)
|
||||
{
|
||||
foreach (Control Btn in GroupBox.Controls)
|
||||
{
|
||||
if (Btn.Name.Length < 8) continue;
|
||||
if (Btn.Name.Substring(0, 8) == "Btn_PLC_" || Btn.Name.Substring(0, 8) == "Btn_MES_")
|
||||
{
|
||||
if (Btn.InvokeRequired)
|
||||
{
|
||||
Action<System.Drawing.Color> ActionDelegate = (x) => { Btn.BackColor = x; };
|
||||
Btn.BeginInvoke(ActionDelegate, System.Drawing.Color.LightGray);
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.BackColor = System.Drawing.Color.LightGray;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
522
MisDataPlcTagID/MisDataPlcTagID/ManualSimulateSignalSim.cs
Normal file
522
MisDataPlcTagID/MisDataPlcTagID/ManualSimulateSignalSim.cs
Normal file
@@ -0,0 +1,522 @@
|
||||
//using BasicData;
|
||||
|
||||
using DoWhatPlc;
|
||||
using MesServerWork;
|
||||
using MisDataFunction;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
//using SystemFramework;
|
||||
|
||||
namespace MisDataSaveDateSim
|
||||
{
|
||||
public partial class MisData:Form
|
||||
{
|
||||
public void InitFormBtnColor()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Cbx_StatusDisplay.Checked) return;
|
||||
string OpName = WorkStationNum_Now;
|
||||
foreach (Control GroupBox in this.groupBox_SignialSimulatorOld.Controls)
|
||||
{
|
||||
foreach (Control Btn in GroupBox.Controls)
|
||||
{
|
||||
if (Btn.Name.Length < 8) continue;
|
||||
if (Btn.Name.Substring(0, 8) == "Btn_PLC_" || Btn.Name.Substring(0, 8) == "Btn_MES_")
|
||||
{
|
||||
ControlData Ctrl1 = new ControlData(Btn, OpName);
|
||||
Thread t=new Thread(new ParameterizedThreadStart(InitFormBtn_Thread));
|
||||
t.Start(Ctrl1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static object test;
|
||||
static void InitFormBtn_Thread(Object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
ControlData Btn = (ControlData)obj;
|
||||
|
||||
test = DtWebApi.ReadWritePLC.ReadPLC(Btn.TagType.ToString(), Btn.opName);
|
||||
|
||||
bool Result = Convert.ToBoolean(test);
|
||||
if (Btn.btn.InvokeRequired)
|
||||
{
|
||||
Action<System.Drawing.Color> actionDelegate = (x) => { Btn.btn.BackColor = x; };
|
||||
if (Result)
|
||||
{
|
||||
Btn.btn.BeginInvoke(actionDelegate, System.Drawing.Color.Green);
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.btn.BeginInvoke(actionDelegate, System.Drawing.Color.SlateGray);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Result)
|
||||
{
|
||||
Btn.btn.BackColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.btn.BackColor = System.Drawing.Color.SlateGray;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
ControlData Btn = (ControlData)obj;
|
||||
//ApplicationLog.WriteLog(err, err.Message+"采集数据值:"+ ";按钮名称:"+test+ Btn.btn .Name +"工位号"+ WorkStationNum_Now);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 通过点击界面按钮写入Bool信号
|
||||
/// </summary>
|
||||
/// <param name="tagType"></param>
|
||||
/// <param name="opName"></param>
|
||||
private void WriteBoolSignalByFormBtn(Object Sender)
|
||||
{
|
||||
try
|
||||
{
|
||||
string BtnName = ((System.Windows.Forms.Control)Sender).Name;
|
||||
string[] Array_BtnNameSplit = BtnName.Split('_');
|
||||
int tagType = Convert.ToInt32(Array_BtnNameSplit[2]);
|
||||
string OpName = WorkStationNum_Now;
|
||||
|
||||
QualityDataQueryStruct QualityQueryStruct = new QualityDataQueryStruct(OpName, tagType);
|
||||
Thread t = new Thread(new ParameterizedThreadStart(WriteBoolSignal_Thread));
|
||||
t.Start(QualityQueryStruct);
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void WriteBoolSignal_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QDQ = (QualityDataQueryStruct)obj;
|
||||
if (IsDemoMesServer==1)
|
||||
{
|
||||
string tagValueStr = "";
|
||||
MIS_BASE.Read_TagTypeID(QDQ.tagType, QDQ.OpName, out tagValueStr);
|
||||
|
||||
if (tagValueStr=="1")
|
||||
{
|
||||
tagValueStr = "True";
|
||||
}
|
||||
else if (tagValueStr == "0")
|
||||
{
|
||||
tagValueStr = "False";
|
||||
}
|
||||
|
||||
bool ReadResult = Convert.ToBoolean(tagValueStr);
|
||||
if (ReadResult)
|
||||
{
|
||||
MIS_BASE.Write_TagTypeID(QDQ.tagType, QDQ.OpName, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
MIS_BASE.Write_TagTypeID(QDQ.tagType, QDQ.OpName, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool ReadResult = Convert.ToBoolean(DtWebApi.ReadWritePLC.ReadPLC(QDQ.tagType.ToString(), QDQ.OpName));
|
||||
if (ReadResult)
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(QDQ.tagType.ToString(), QDQ.OpName, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(QDQ.tagType.ToString(), QDQ.OpName, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 写入机型
|
||||
/// </summary>
|
||||
/// <param name="Sender"></param>
|
||||
private void WriteNormalDataBygroupBox_SignialSimulatorWriteBtn(object Sender)
|
||||
{
|
||||
try
|
||||
{
|
||||
string BtnName = ((System.Windows.Forms.Control)Sender).Name;
|
||||
string OpName = WorkStationNum_Now;
|
||||
if (BtnName == "Btn_Write_PLC")
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_PLC.Controls)
|
||||
{
|
||||
if (Tbx.Name.Length < 12) continue;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_PLC_") continue;
|
||||
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
|
||||
HashtableList htList = DtWebApi.OpcDemo.GetHashtableList();
|
||||
int tagDataType = Convert.ToInt32(htList.hashtable_TagTypeDataType[TagType.ToString()]);
|
||||
|
||||
string tagValue = Tbx.Text.Trim();
|
||||
short tagValue_int;
|
||||
string tagValue_str;
|
||||
byte tagValue_byte;
|
||||
bool tagValue_bool;
|
||||
|
||||
switch (tagDataType)
|
||||
{
|
||||
case 2:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
if (tagValue == "") return;
|
||||
tagValue_int = Convert.ToInt16(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_int);
|
||||
break;
|
||||
case 8:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
case 17:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
if (Convert.ToInt32(tagValue) > 255)
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入数据不在范围内");
|
||||
return;
|
||||
}
|
||||
if (tagValue == "") return;
|
||||
tagValue_byte = Convert.ToByte(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_byte);
|
||||
break;
|
||||
case 11:
|
||||
tagValue_bool = Convert.ToBoolean(Convert.ToInt32(tagValue));
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_bool);
|
||||
break;
|
||||
default:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (BtnName == "Btn_Write_MES")
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_MES.Controls)
|
||||
{
|
||||
if (Tbx.Name.Length < 12) continue;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_MES_") continue;
|
||||
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
HashtableList htList = DtWebApi.OpcDemo.GetHashtableList();
|
||||
int tagDataType = Convert.ToInt32(htList.hashtable_TagTypeDataType[TagType.ToString()]);
|
||||
//int tagDataType = Convert.ToInt32(MesDataFunction.OpcOperation.hashtable_TagTypeDataType[TagType.ToString()]);
|
||||
|
||||
string tagValue = Tbx.Text.Trim();
|
||||
short tagValue_int;
|
||||
string tagValue_str;
|
||||
byte tagValue_byte;
|
||||
bool tagValue_bool;
|
||||
|
||||
switch (tagDataType)
|
||||
{
|
||||
case 2:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
tagValue_int = Convert.ToInt16(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_int);
|
||||
break;
|
||||
case 8:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
case 17:
|
||||
if (!Regex.IsMatch(tagValue, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入不是整数!");
|
||||
return;
|
||||
}
|
||||
if (Convert.ToInt32(tagValue) > 255)
|
||||
{
|
||||
MessageBox.Show("文本框\"" + Tbx.Name + "\"输入数据不在范围内");
|
||||
return;
|
||||
}
|
||||
tagValue_byte = Convert.ToByte(tagValue);
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_byte);
|
||||
break;
|
||||
case 11:
|
||||
tagValue_bool = Convert.ToBoolean(Convert.ToInt32(tagValue));
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_bool);
|
||||
break;
|
||||
default:
|
||||
tagValue_str = tagValue.ToString();
|
||||
WriteAnyData_Thread(TagType, OpName, tagValue_str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WriteAnyData_Thread(int tagType, string opName, object tagValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QualityStruct = new QualityDataQueryStruct(opName, tagType, tagValue);
|
||||
|
||||
Thread t = new Thread(new ParameterizedThreadStart(WriteNormalDataBygroupBox_SignialSimulatorWriteBtn_Thread));
|
||||
t.Start(QualityStruct);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteNormalDataBygroupBox_SignialSimulatorWriteBtn_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QualityStruct = (QualityDataQueryStruct)obj;
|
||||
|
||||
MIS_BASE.WritePLC(QualityStruct.tagType, QualityStruct. OpName, QualityStruct.tagValue);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据工位号查询质量数据,返回质量数据列表
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
QualityDataType[] ReadPLC_ValueListForQualityDataTypeArray(string opName)
|
||||
{
|
||||
try
|
||||
{
|
||||
int i1 = 0;
|
||||
Hashtable valueList;
|
||||
valueList = Function.ReadPLC_Sync_DataList_MesRead(opName);
|
||||
if (valueList != null)
|
||||
{
|
||||
QualityDataType[] QualityValue = new QualityDataType[valueList.Count];
|
||||
foreach (DictionaryEntry de in valueList)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityValue[i1] = (QualityDataType)de.Value;
|
||||
i1++;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
//ThisWorkStationData = QualityValue;
|
||||
return QualityValue;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//public QualityDataType[] ThisWorkStationData
|
||||
//{ get; set; }
|
||||
|
||||
//object QueryThisWorkStationDataByTagTypeFromThisWorkStationDataProperty(int TagType)
|
||||
//{
|
||||
//try
|
||||
//{
|
||||
// foreach (QualityDataType Data in ThisWorkStationData)
|
||||
// {
|
||||
// if (Data.tagValueType == TagType)
|
||||
// {
|
||||
// return Data.tagValue;
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// return null;
|
||||
//}
|
||||
//catch (Exception err)
|
||||
//{
|
||||
// ApplicationLog.WriteLog(err, err.Message);
|
||||
// return null;
|
||||
//}
|
||||
|
||||
//}
|
||||
|
||||
void RefreshBtnColor(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
ControlChangeByTagType ControlValue = (ControlChangeByTagType)obj;
|
||||
|
||||
if (!Cbx_StatusDisplay.Checked) return;
|
||||
string OpName = WorkStationNum_Now;
|
||||
|
||||
foreach (Control GroupBox in this.groupBox_SignialSimulatorOld.Controls)
|
||||
{
|
||||
foreach (Control Btn in GroupBox.Controls)
|
||||
{
|
||||
if (Btn.Name.Length < 8) continue;
|
||||
if (Btn.Name.Substring(0, 8) == "Btn_PLC_" || Btn.Name.Substring(0, 8) == "Btn_MES_")
|
||||
{
|
||||
string BtnName = Btn.Name;
|
||||
string[] BtnName_SplitArray = BtnName.Split('_');
|
||||
if (Btn.InvokeRequired)
|
||||
{
|
||||
Action<System.Drawing.Color> ActionDelegate = (x) => { Btn.BackColor = x; };
|
||||
if (Convert.ToInt32(BtnName_SplitArray[2]) == ControlValue.TagType)
|
||||
{
|
||||
if (ControlValue.Value == "1")
|
||||
{
|
||||
Btn.BeginInvoke(ActionDelegate, System.Drawing.Color.Green);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.BeginInvoke(ActionDelegate, System.Drawing.Color.LightGray);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Convert.ToInt32(BtnName_SplitArray[2]) == ControlValue.TagType)
|
||||
{
|
||||
if (ControlValue.Value == "1")
|
||||
{
|
||||
Btn.BackColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Btn.BackColor = System.Drawing.Color.LightGray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void RefreshBtnColor_Thread(int TagType, string Value)
|
||||
{
|
||||
ControlChangeByTagType ControlValue = new ControlChangeByTagType(TagType, Value);
|
||||
Thread t = new Thread(new ParameterizedThreadStart(RefreshBtnColor));
|
||||
t.Start(ControlValue);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按钮颜色还原
|
||||
/// </summary>
|
||||
void RefreshBtnColorWriteNull()
|
||||
{
|
||||
try
|
||||
{
|
||||
string OpName = WorkStationNum_Now;
|
||||
|
||||
foreach (Control GroupBox in this.groupBox_SignialSimulatorOld.Controls)
|
||||
{
|
||||
foreach (Control Btn in GroupBox.Controls)
|
||||
{
|
||||
if (Btn.Name.Length < 8) continue;
|
||||
if (Btn.Name.Substring(0, 8) == "Btn_PLC_" || Btn.Name.Substring(0, 8) == "Btn_MES_")
|
||||
{
|
||||
if (Btn.InvokeRequired)
|
||||
{
|
||||
Action<System.Drawing.Color> ActionDelegate = (x) => { Btn.BackColor = x; };
|
||||
Btn.BeginInvoke(ActionDelegate, System.Drawing.Color.LightGray);
|
||||
}
|
||||
else
|
||||
{
|
||||
Btn.BackColor = System.Drawing.Color.LightGray;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
1923
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFun.Designer.cs
generated
Normal file
1923
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFun.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
1043
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFun.cs
Normal file
1043
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFun.cs
Normal file
File diff suppressed because it is too large
Load Diff
212
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFun.resx
Normal file
212
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFun.resx
Normal file
@@ -0,0 +1,212 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="contextMenuStrip_MIS.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>423, 5</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip_Main.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>608, 4</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>749, 3</value>
|
||||
</metadata>
|
||||
<metadata name="timer_ReadTagValues.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>870, 3</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>37</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQIyAKEgMgChczIA
|
||||
occyAKHqMgChmTIAoTwyAKEJMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQQyAKEvMgChdzIA
|
||||
odYyAKH7MgCh/zIAof8yAKH/MgCh6jIAoacyAKFJMgChEjIAoQAyAKEAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChADIAoQoyAKE+MgChkTIA
|
||||
oeoyAKH+MgCh+TIAoe0yAKH+MgCh/zIAofwyAKH3MgCh/jIAofgyAKHBMgChZDIAoR4yAKEBMgChAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChATIAoRUyAKFcMgChujIA
|
||||
ofEyAKH/MgCh9DIAobcyAKFPMgChfjIAof8yAKH/MgCh5TIAoVUyAKGLMgCh4jIAofwyAKH9MgCh2TIA
|
||||
oYcyAKEoMgChBTIAoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChAjIAoSYyAKF2MgCh0DIA
|
||||
ofcyAKH+MgCh8zIAof8yAKGjMgChDTIAoQAyAKFpMgCh/zIAof8yAKHhMgChHjIAoQIyAKEiMgChbjIA
|
||||
ocoyAKH3MgCh/jIAoeUyAKGfMgChQTIAoQsyAKEAAAAAAAAAAAAAAAAAMgChCDIAoUEyAKGXMgCh4jIA
|
||||
of4yAKH/MgChzzIAoW0yAKFoMgCh+zIAoZcyAKEAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChADIA
|
||||
oQAyAKEBMgChETIAoVAyAKGiMgCh8DIAof8yAKH0MgChuTIAoW0yAKEVMgChADIAoQAyAKG2MgCh7TIA
|
||||
of8yAKHvMgCh7jIAofgyAKFLMgChADIAoTcyAKH1MgChlzIAoQAyAKEAMgChaTIAof8yAKH/MgCh4TIA
|
||||
oR4yAKEAAAAAAAAAAAAAAAAAMgChADIAoQcyAKE4MgChijIAod8yAKH9MgCh+zIAoc4yAKFdMgChADIA
|
||||
of8yAKHlMgChlDIAoToyAKGgMgCh7jIAoSwyAKEAMgChFzIAodgyAKGZMgChADIAoQAyAKFpMgCh/zIA
|
||||
of8yAKHxMgChfDIAoSkyAKEBMgChAAAAAAAAAAAAAAAAADIAoQAyAKECMgChITIAoW8yAKG/MgCh/zIA
|
||||
oZYyAKEAMgCh/zIAoZoyAKEBMgChADIAoZkyAKHSMgChEjIAoQAyAKEGMgChujIAoZoyAKEAMgChADIA
|
||||
oWkyAKH/MgCh/zIAof0yAKH+MgCh4TIAoZIyAKFEMgChDjIAoQAyAKEAAAAAAAAAAAAAAAAAMgChADIA
|
||||
oUIyAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChmjIAobMyAKEEMgChADIAoQAyAKGcMgChmzIA
|
||||
oQAyAKEAMgChaTIAof8yAKH/MgCh4zIAoZYyAKHRMgCh+zIAofQyAKHDMgChZDIAoSIyAKEBMgChAAAA
|
||||
AAAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIAoQAyAKGaMgChiDIAoQAAAAAAMgChADIA
|
||||
oYgyAKGaMgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChIDIAoRIyAKFeMgChqzIAoe0yAKH+MgCh3jIA
|
||||
oYYyAKEqMgChADIAoQAyAKE/MgCh+zIAoZcyAKEAMgCh/zIAoZcyAKEAMgChADIAoZgyAKFtMgChAAAA
|
||||
AAAyAKEAMgChXDIAoZQyAKEAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChADIAoQAyAKEGMgChMDIA
|
||||
oX8yAKHTMgCh+jIAoWkyAKEAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChlTIA
|
||||
oWMyAKEAAAAAADIAoQAyAKE2MgChhTIAoQAyAKEAMgChaTIAof8yAKH/MgCh4TIAoR4yAKEAAAAAAAAA
|
||||
AAAyAKEAMgChATIAoRUyAKFYMgChQDIAoQAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIA
|
||||
oQAyAKGLMgChQTIAoQAyAKEFMgChADIAoSMyAKF4MgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChHjIA
|
||||
oQAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQAyAKEBMgChADIAoQAyAKE/MgCh+zIAoZcyAKEAMgCh/zIA
|
||||
oZcyAKEAMgChADIAoXcyAKEkMgChBzIAoUIyAKEBMgChFjIAoWUyAKEBMgChADIAoWkyAKH/MgCh/zIA
|
||||
oeEyAKEeMgChADIAoQAyAKE5MgChSTIAoQ8yAKEBMgChAAAAAAAAAAAAMgChADIAoT8yAKH7MgChlzIA
|
||||
oQAyAKH/MgChlzIAoQAyAKECMgChWzIAoQ8yAKEVMgChhTIAoQoyAKEHMgChMzIAoQEyAKEAMgChaTIA
|
||||
of8yAKH/MgCh4TIAoR4yAKEAMgChADIAoWkyAKH1MgChyzIAoX8yAKE4MgChBTIAoQAyAKEAMgChPzIA
|
||||
ofsyAKGXMgChADIAof8yAKGXMgChADIAoQMyAKFZMgChCzIAoS4yAKHDMgChGjIAoQAAAAAAAAAAADIA
|
||||
oQAyAKFpMgCh/zIAof8yAKHhMgChHjIAoQAyAKEAMgChLDIAoaEyAKHkMgCh/DIAoe8yAKGrMgChUzIA
|
||||
oREyAKFBMgCh+zIAoZcyAKEAMgCh/zIAoZcyAKEAMgChBzIAoVAyAKEEMgChQTIAodoyAKEjMgChAAAA
|
||||
AAAAAAAAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChAAAAAAAyAKEAMgChBjIAoSAyAKFyMgChwjIA
|
||||
ofMyAKH4MgCh0zIAobMyAKH9MgChljIAoQAyAKH/MgChlzIAoQAyAKEBMgChBDIAoQAyAKFKMgCh7jIA
|
||||
oT0yAKEAAAAAADIAoQAyAKEAMgChbDIAof8yAKH/MgCh4TIAoR8yAKEAAAAAAAAAAAAAAAAAMgChADIA
|
||||
oQEyAKELMgChRzIAoZYyAKHeMgCh/TIAof8yAKGWMgChADIAof8yAKGXMgChAAAAAAAAAAAAMgChADIA
|
||||
oW0yAKH/MgChZDIAoQAyAKEEMgChHDIAoWAyAKHPMgCh/zIAof8yAKH3MgChkTIAoS8yAKELMgChADIA
|
||||
oQAAAAAAAAAAAAAAAAAyAKEAMgChATIAoSAyAKF2MgCh/zIAoZYyAKEAMgCh/zIAoZcyAKEAAAAAADIA
|
||||
oQAyAKEAMgChljIAof8yAKGeMgChOTIAoZEyAKHcMgCh+TIAof8yAKH/MgCh/zIAof8yAKH+MgCh6jIA
|
||||
obgyAKFXMgChITIAoQEyAKEAAAAAAAAAAAAAAAAAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIA
|
||||
oQAAAAAAMgChADIAoQwyAKG9MgCh/zIAofMyAKHyMgCh/jIAof8yAKH/MgCh/zIAofoyAKH3MgCh/jIA
|
||||
of8yAKH/MgCh/zIAofsyAKHbMgChmzIAoUwyAKENMgChATIAoQAyAKEAMgChPzIAofsyAKGXMgChADIA
|
||||
of8yAKGXMgChATIAoRkyAKFbMgChsTIAofAyAKH/MgCh/zIAof8yAKH/MgCh/DIAoeYyAKGxMgChVTIA
|
||||
oUIyAKGFMgCh1TIAofUyAKH/MgCh/zIAof8yAKH/MgCh9DIAocUyAKGDMgChMDIAoQYyAKE/MgCh+zIA
|
||||
oZcyAKEAMgCh/zIAocEyAKGOMgCh2TIAofcyAKH/MgCh/zIAof8yAKH/MgCh7jIAobMyAKFwMgChJjIA
|
||||
oQoyAKEAMgChADIAoQEyAKEXMgChTTIAoZsyAKHYMgCh/TIAof8yAKH/MgCh/zIAof4yAKHqMgChszIA
|
||||
oZgyAKH+MgChljIAoQAyAKH/MgCh/zIAof8yAKH/MgCh/zIAof8yAKH0MgChyTIAoYEyAKE/MgChBzIA
|
||||
oQAAAAAAMgChADIAoSIyAKF2MgChQjIAoRIyAKEAMgChATIAoR4yAKFjMgChrjIAoecyAKH9MgCh/zIA
|
||||
of8yAKH/MgCh/zIAof8yAKGWMgChADIAof8yAKH/MgCh/zIAofkyAKHWMgChmjIAoUIyAKERMgChATIA
|
||||
oQAyAKEGMgChFTIAoQMyAKEAMgChKDIAoZUyAKHHMgChxjIAoXcyAKE3MgChBzIAoQAyAKEGMgChKTIA
|
||||
oXYyAKHDMgCh7jIAof4yAKH/MgCh/zIAoZYyAKEAMgChrjIAoeYyAKH+MgCh0zIAoVcyAKELMgChADIA
|
||||
oQAyAKEAMgChADIAoVUyAKHAMgChkjIAoVYyAKEUMgChATIAoRYyAKFhMgChqzIAodUyAKGmMgChZTIA
|
||||
oR8yAKEDMgChBDIAoS0yAKGiMgCh9DIAofUyAKHGMgChWTIAoQAyAKEGMgChKjIAoWsyAKHBMgCh3DIA
|
||||
ocEyAKFwMgChJTIAoQYyAKEAMgChDDIAoTgyAKF/MgChyjIAocMyAKGUMgChMzIAoQsyAKEEMgChJjIA
|
||||
oWUyAKG/MgCh0TIAoaYyAKGoMgCh1TIAodYyAKGNMgChQTIAoRAyAKEAMgChAAAAAAAyAKEAMgChADIA
|
||||
oQ8yAKE8MgChkDIAoc8yAKHfMgChpDIAoVIyAKEcMgChADIAoQEyAKETMgChRzIAoZ8yAKHGMgChvzIA
|
||||
oWQyAKEtMgChMzIAoY8yAKHvMgCh5zIAoa8yAKFcMgChHDIAoQMyAKEAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAADIAoQAyAKECMgChFTIAoVcyAKGaMgCh3DIAodEyAKGaMgChSDIAoQsyAKEAMgChATIA
|
||||
oSUyAKGGMgCh6TIAofEyAKHhMgChtzIAoXAyAKErMgChBTIAoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQIyAKElMgChXTIAobgyAKHbMgChxTIA
|
||||
oYUyAKFbMgChqzIAodEyAKHLMgChhDIAoTsyAKELMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChCzIA
|
||||
oTcyAKGTMgCh0zIAofAyAKG2MgChWjIAoRcyAKEBMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA/+Af//+AB//8AAD/8AAAP8AIAA8AGDABARg+AQEYD4ERGAPxMZgAcTOY
|
||||
ADEzmDAxM5g8MTKIPzEgCDDxIAgwMSB4MAEgeDgBJHg+ATxAD8E8AAHxOAAAMQAAAAEAAwABABwgAQBE
|
||||
BAEBwAABAEAAA+AAAA/4AAB//wAD///gD/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
1776
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFunSim.Designer.cs
generated
Normal file
1776
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFunSim.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
1022
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFunSim.cs
Normal file
1022
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFunSim.cs
Normal file
File diff suppressed because it is too large
Load Diff
209
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFunSim.resx
Normal file
209
MisDataPlcTagID/MisDataPlcTagID/MisDataWebFunSim.resx
Normal file
@@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="contextMenuStrip_MIS.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>423, 5</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>749, 3</value>
|
||||
</metadata>
|
||||
<metadata name="timer_ReadTagValues.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>870, 3</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>45</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQIyAKEgMgChczIA
|
||||
occyAKHqMgChmTIAoTwyAKEJMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQQyAKEvMgChdzIA
|
||||
odYyAKH7MgCh/zIAof8yAKH/MgCh6jIAoacyAKFJMgChEjIAoQAyAKEAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChADIAoQoyAKE+MgChkTIA
|
||||
oeoyAKH+MgCh+TIAoe0yAKH+MgCh/zIAofwyAKH3MgCh/jIAofgyAKHBMgChZDIAoR4yAKEBMgChAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChATIAoRUyAKFcMgChujIA
|
||||
ofEyAKH/MgCh9DIAobcyAKFPMgChfjIAof8yAKH/MgCh5TIAoVUyAKGLMgCh4jIAofwyAKH9MgCh2TIA
|
||||
oYcyAKEoMgChBTIAoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChAjIAoSYyAKF2MgCh0DIA
|
||||
ofcyAKH+MgCh8zIAof8yAKGjMgChDTIAoQAyAKFpMgCh/zIAof8yAKHhMgChHjIAoQIyAKEiMgChbjIA
|
||||
ocoyAKH3MgCh/jIAoeUyAKGfMgChQTIAoQsyAKEAAAAAAAAAAAAAAAAAMgChCDIAoUEyAKGXMgCh4jIA
|
||||
of4yAKH/MgChzzIAoW0yAKFoMgCh+zIAoZcyAKEAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChADIA
|
||||
oQAyAKEBMgChETIAoVAyAKGiMgCh8DIAof8yAKH0MgChuTIAoW0yAKEVMgChADIAoQAyAKG2MgCh7TIA
|
||||
of8yAKHvMgCh7jIAofgyAKFLMgChADIAoTcyAKH1MgChlzIAoQAyAKEAMgChaTIAof8yAKH/MgCh4TIA
|
||||
oR4yAKEAAAAAAAAAAAAAAAAAMgChADIAoQcyAKE4MgChijIAod8yAKH9MgCh+zIAoc4yAKFdMgChADIA
|
||||
of8yAKHlMgChlDIAoToyAKGgMgCh7jIAoSwyAKEAMgChFzIAodgyAKGZMgChADIAoQAyAKFpMgCh/zIA
|
||||
of8yAKHxMgChfDIAoSkyAKEBMgChAAAAAAAAAAAAAAAAADIAoQAyAKECMgChITIAoW8yAKG/MgCh/zIA
|
||||
oZYyAKEAMgCh/zIAoZoyAKEBMgChADIAoZkyAKHSMgChEjIAoQAyAKEGMgChujIAoZoyAKEAMgChADIA
|
||||
oWkyAKH/MgCh/zIAof0yAKH+MgCh4TIAoZIyAKFEMgChDjIAoQAyAKEAAAAAAAAAAAAAAAAAMgChADIA
|
||||
oUIyAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChmjIAobMyAKEEMgChADIAoQAyAKGcMgChmzIA
|
||||
oQAyAKEAMgChaTIAof8yAKH/MgCh4zIAoZYyAKHRMgCh+zIAofQyAKHDMgChZDIAoSIyAKEBMgChAAAA
|
||||
AAAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIAoQAyAKGaMgChiDIAoQAAAAAAMgChADIA
|
||||
oYgyAKGaMgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChIDIAoRIyAKFeMgChqzIAoe0yAKH+MgCh3jIA
|
||||
oYYyAKEqMgChADIAoQAyAKE/MgCh+zIAoZcyAKEAMgCh/zIAoZcyAKEAMgChADIAoZgyAKFtMgChAAAA
|
||||
AAAyAKEAMgChXDIAoZQyAKEAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChADIAoQAyAKEGMgChMDIA
|
||||
oX8yAKHTMgCh+jIAoWkyAKEAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChlTIA
|
||||
oWMyAKEAAAAAADIAoQAyAKE2MgChhTIAoQAyAKEAMgChaTIAof8yAKH/MgCh4TIAoR4yAKEAAAAAAAAA
|
||||
AAAyAKEAMgChATIAoRUyAKFYMgChQDIAoQAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIA
|
||||
oQAyAKGLMgChQTIAoQAyAKEFMgChADIAoSMyAKF4MgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChHjIA
|
||||
oQAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQAyAKEBMgChADIAoQAyAKE/MgCh+zIAoZcyAKEAMgCh/zIA
|
||||
oZcyAKEAMgChADIAoXcyAKEkMgChBzIAoUIyAKEBMgChFjIAoWUyAKEBMgChADIAoWkyAKH/MgCh/zIA
|
||||
oeEyAKEeMgChADIAoQAyAKE5MgChSTIAoQ8yAKEBMgChAAAAAAAAAAAAMgChADIAoT8yAKH7MgChlzIA
|
||||
oQAyAKH/MgChlzIAoQAyAKECMgChWzIAoQ8yAKEVMgChhTIAoQoyAKEHMgChMzIAoQEyAKEAMgChaTIA
|
||||
of8yAKH/MgCh4TIAoR4yAKEAMgChADIAoWkyAKH1MgChyzIAoX8yAKE4MgChBTIAoQAyAKEAMgChPzIA
|
||||
ofsyAKGXMgChADIAof8yAKGXMgChADIAoQMyAKFZMgChCzIAoS4yAKHDMgChGjIAoQAAAAAAAAAAADIA
|
||||
oQAyAKFpMgCh/zIAof8yAKHhMgChHjIAoQAyAKEAMgChLDIAoaEyAKHkMgCh/DIAoe8yAKGrMgChUzIA
|
||||
oREyAKFBMgCh+zIAoZcyAKEAMgCh/zIAoZcyAKEAMgChBzIAoVAyAKEEMgChQTIAodoyAKEjMgChAAAA
|
||||
AAAAAAAAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChAAAAAAAyAKEAMgChBjIAoSAyAKFyMgChwjIA
|
||||
ofMyAKH4MgCh0zIAobMyAKH9MgChljIAoQAyAKH/MgChlzIAoQAyAKEBMgChBDIAoQAyAKFKMgCh7jIA
|
||||
oT0yAKEAAAAAADIAoQAyAKEAMgChbDIAof8yAKH/MgCh4TIAoR8yAKEAAAAAAAAAAAAAAAAAMgChADIA
|
||||
oQEyAKELMgChRzIAoZYyAKHeMgCh/TIAof8yAKGWMgChADIAof8yAKGXMgChAAAAAAAAAAAAMgChADIA
|
||||
oW0yAKH/MgChZDIAoQAyAKEEMgChHDIAoWAyAKHPMgCh/zIAof8yAKH3MgChkTIAoS8yAKELMgChADIA
|
||||
oQAAAAAAAAAAAAAAAAAyAKEAMgChATIAoSAyAKF2MgCh/zIAoZYyAKEAMgCh/zIAoZcyAKEAAAAAADIA
|
||||
oQAyAKEAMgChljIAof8yAKGeMgChOTIAoZEyAKHcMgCh+TIAof8yAKH/MgCh/zIAof8yAKH+MgCh6jIA
|
||||
obgyAKFXMgChITIAoQEyAKEAAAAAAAAAAAAAAAAAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIA
|
||||
oQAAAAAAMgChADIAoQwyAKG9MgCh/zIAofMyAKHyMgCh/jIAof8yAKH/MgCh/zIAofoyAKH3MgCh/jIA
|
||||
of8yAKH/MgCh/zIAofsyAKHbMgChmzIAoUwyAKENMgChATIAoQAyAKEAMgChPzIAofsyAKGXMgChADIA
|
||||
of8yAKGXMgChATIAoRkyAKFbMgChsTIAofAyAKH/MgCh/zIAof8yAKH/MgCh/DIAoeYyAKGxMgChVTIA
|
||||
oUIyAKGFMgCh1TIAofUyAKH/MgCh/zIAof8yAKH/MgCh9DIAocUyAKGDMgChMDIAoQYyAKE/MgCh+zIA
|
||||
oZcyAKEAMgCh/zIAocEyAKGOMgCh2TIAofcyAKH/MgCh/zIAof8yAKH/MgCh7jIAobMyAKFwMgChJjIA
|
||||
oQoyAKEAMgChADIAoQEyAKEXMgChTTIAoZsyAKHYMgCh/TIAof8yAKH/MgCh/zIAof4yAKHqMgChszIA
|
||||
oZgyAKH+MgChljIAoQAyAKH/MgCh/zIAof8yAKH/MgCh/zIAof8yAKH0MgChyTIAoYEyAKE/MgChBzIA
|
||||
oQAAAAAAMgChADIAoSIyAKF2MgChQjIAoRIyAKEAMgChATIAoR4yAKFjMgChrjIAoecyAKH9MgCh/zIA
|
||||
of8yAKH/MgCh/zIAof8yAKGWMgChADIAof8yAKH/MgCh/zIAofkyAKHWMgChmjIAoUIyAKERMgChATIA
|
||||
oQAyAKEGMgChFTIAoQMyAKEAMgChKDIAoZUyAKHHMgChxjIAoXcyAKE3MgChBzIAoQAyAKEGMgChKTIA
|
||||
oXYyAKHDMgCh7jIAof4yAKH/MgCh/zIAoZYyAKEAMgChrjIAoeYyAKH+MgCh0zIAoVcyAKELMgChADIA
|
||||
oQAyAKEAMgChADIAoVUyAKHAMgChkjIAoVYyAKEUMgChATIAoRYyAKFhMgChqzIAodUyAKGmMgChZTIA
|
||||
oR8yAKEDMgChBDIAoS0yAKGiMgCh9DIAofUyAKHGMgChWTIAoQAyAKEGMgChKjIAoWsyAKHBMgCh3DIA
|
||||
ocEyAKFwMgChJTIAoQYyAKEAMgChDDIAoTgyAKF/MgChyjIAocMyAKGUMgChMzIAoQsyAKEEMgChJjIA
|
||||
oWUyAKG/MgCh0TIAoaYyAKGoMgCh1TIAodYyAKGNMgChQTIAoRAyAKEAMgChAAAAAAAyAKEAMgChADIA
|
||||
oQ8yAKE8MgChkDIAoc8yAKHfMgChpDIAoVIyAKEcMgChADIAoQEyAKETMgChRzIAoZ8yAKHGMgChvzIA
|
||||
oWQyAKEtMgChMzIAoY8yAKHvMgCh5zIAoa8yAKFcMgChHDIAoQMyAKEAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAADIAoQAyAKECMgChFTIAoVcyAKGaMgCh3DIAodEyAKGaMgChSDIAoQsyAKEAMgChATIA
|
||||
oSUyAKGGMgCh6TIAofEyAKHhMgChtzIAoXAyAKErMgChBTIAoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQIyAKElMgChXTIAobgyAKHbMgChxTIA
|
||||
oYUyAKFbMgChqzIAodEyAKHLMgChhDIAoTsyAKELMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChCzIA
|
||||
oTcyAKGTMgCh0zIAofAyAKG2MgChWjIAoRcyAKEBMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA/+Af//+AB//8AAD/8AAAP8AIAA8AGDABARg+AQEYD4ERGAPxMZgAcTOY
|
||||
ADEzmDAxM5g8MTKIPzEgCDDxIAgwMSB4MAEgeDgBJHg+ATxAD8E8AAHxOAAAMQAAAAEAAwABABwgAQBE
|
||||
BAEBwAABAEAAA+AAAA/4AAB//wAD///gD/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
36
MisDataPlcTagID/MisDataPlcTagID/Properties/AssemblyInfo.cs
Normal file
36
MisDataPlcTagID/MisDataPlcTagID/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("MisDataPlcTagID")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("MisDataPlcTagID")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("0f887ab8-1bc5-4ef0-9240-e7afd91a9911")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
107
MisDataPlcTagID/MisDataPlcTagID/ReadThisStationProductInfo.cs
Normal file
107
MisDataPlcTagID/MisDataPlcTagID/ReadThisStationProductInfo.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
//using SystemFramework;
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
public partial class MisData
|
||||
{
|
||||
|
||||
void ReadPLC_ProductInfo()
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_PLC.Controls)
|
||||
{
|
||||
|
||||
Thread t = new Thread(new ParameterizedThreadStart(ReadPLC_ProductInfo_Thread));
|
||||
t.Start(Tbx);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ReadPLC_ProductInfo_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Control Tbx = (Control)obj;
|
||||
if (Tbx.Name.Length < 12) return;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_PLC_") return;
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
if (Tbx.InvokeRequired )
|
||||
{
|
||||
Action<string> actionDelegate = (x) => { Tbx.Text = x; };
|
||||
Tbx.BeginInvoke(actionDelegate, DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Tbx.Text = DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ReadMES_ProductInfo()
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_MES.Controls)
|
||||
{
|
||||
Thread t = new Thread(new ParameterizedThreadStart(ReadMES_ProductInfo_Thread));
|
||||
t.Start(Tbx);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
void ReadMES_ProductInfo_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Control Tbx = (Control)obj;
|
||||
|
||||
if (Tbx.Name.Length < 12) return;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_MES_") return;
|
||||
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
if (Tbx .InvokeRequired )
|
||||
{
|
||||
Action<string> ActionDelegate = (x) => { Tbx.Text = x; };
|
||||
Tbx.BeginInvoke(ActionDelegate, DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Tbx.Text = DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
107
MisDataPlcTagID/MisDataPlcTagID/ReadThisStationProductInfoSim.cs
Normal file
107
MisDataPlcTagID/MisDataPlcTagID/ReadThisStationProductInfoSim.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
//using SystemFramework;
|
||||
|
||||
namespace MisDataSaveDateSim
|
||||
{
|
||||
public partial class MisData
|
||||
{
|
||||
|
||||
void ReadPLC_ProductInfo()
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_PLC.Controls)
|
||||
{
|
||||
|
||||
Thread t = new Thread(new ParameterizedThreadStart(ReadPLC_ProductInfo_Thread));
|
||||
t.Start(Tbx);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ReadPLC_ProductInfo_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Control Tbx = (Control)obj;
|
||||
if (Tbx.Name.Length < 12) return;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_PLC_") return;
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
if (Tbx.InvokeRequired )
|
||||
{
|
||||
Action<string> actionDelegate = (x) => { Tbx.Text = x; };
|
||||
Tbx.BeginInvoke(actionDelegate, DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Tbx.Text = DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ReadMES_ProductInfo()
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (Control Tbx in this.groupBox_MES.Controls)
|
||||
{
|
||||
Thread t = new Thread(new ParameterizedThreadStart(ReadMES_ProductInfo_Thread));
|
||||
t.Start(Tbx);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
void ReadMES_ProductInfo_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Control Tbx = (Control)obj;
|
||||
|
||||
if (Tbx.Name.Length < 12) return;
|
||||
if (Tbx.Name.Substring(0, 8) != "Tbx_MES_") return;
|
||||
|
||||
string[] TbxName_Split = Tbx.Name.Split('_');
|
||||
int TagType = Convert.ToInt32(TbxName_Split[2]);
|
||||
if (Tbx .InvokeRequired )
|
||||
{
|
||||
Action<string> ActionDelegate = (x) => { Tbx.Text = x; };
|
||||
Tbx.BeginInvoke(ActionDelegate, DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Tbx.Text = DtWebApi.ReadWritePLC.ReadPLC(TagType.ToString(), WorkStationNum_Now).ToString();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
115
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueForm.Designer.cs
generated
Normal file
115
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueForm.Designer.cs
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
partial class WriteQualityValueForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label_Message = new System.Windows.Forms.Label();
|
||||
this.textBox_InputValue = new System.Windows.Forms.TextBox();
|
||||
this.button_OK = new System.Windows.Forms.Button();
|
||||
this.button_Cancle = new System.Windows.Forms.Button();
|
||||
this.comboBox_InputValue = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_Message
|
||||
//
|
||||
this.label_Message.AutoSize = true;
|
||||
this.label_Message.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label_Message.Location = new System.Drawing.Point(15, 10);
|
||||
this.label_Message.Name = "label_Message";
|
||||
this.label_Message.Size = new System.Drawing.Size(41, 12);
|
||||
this.label_Message.TabIndex = 0;
|
||||
this.label_Message.Text = "label1";
|
||||
//
|
||||
// textBox_InputValue
|
||||
//
|
||||
this.textBox_InputValue.Location = new System.Drawing.Point(10, 50);
|
||||
this.textBox_InputValue.Name = "textBox_InputValue";
|
||||
this.textBox_InputValue.Size = new System.Drawing.Size(475, 21);
|
||||
this.textBox_InputValue.TabIndex = 1;
|
||||
//
|
||||
// button_OK
|
||||
//
|
||||
this.button_OK.Location = new System.Drawing.Point(268, 81);
|
||||
this.button_OK.Name = "button_OK";
|
||||
this.button_OK.Size = new System.Drawing.Size(95, 25);
|
||||
this.button_OK.TabIndex = 2;
|
||||
this.button_OK.Text = "OK";
|
||||
this.button_OK.UseVisualStyleBackColor = true;
|
||||
this.button_OK.Click += new System.EventHandler(this.button_OK_Click);
|
||||
//
|
||||
// button_Cancle
|
||||
//
|
||||
this.button_Cancle.Location = new System.Drawing.Point(369, 81);
|
||||
this.button_Cancle.Name = "button_Cancle";
|
||||
this.button_Cancle.Size = new System.Drawing.Size(95, 25);
|
||||
this.button_Cancle.TabIndex = 2;
|
||||
this.button_Cancle.Text = "Cancel";
|
||||
this.button_Cancle.UseVisualStyleBackColor = true;
|
||||
this.button_Cancle.Click += new System.EventHandler(this.button_Cancle_Click);
|
||||
//
|
||||
// comboBox_InputValue
|
||||
//
|
||||
this.comboBox_InputValue.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox_InputValue.FormattingEnabled = true;
|
||||
this.comboBox_InputValue.Items.AddRange(new object[] {
|
||||
"false",
|
||||
"true"});
|
||||
this.comboBox_InputValue.Location = new System.Drawing.Point(10, 50);
|
||||
this.comboBox_InputValue.Name = "comboBox_InputValue";
|
||||
this.comboBox_InputValue.Size = new System.Drawing.Size(475, 20);
|
||||
this.comboBox_InputValue.TabIndex = 3;
|
||||
//
|
||||
// WriteQualityValueForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(494, 111);
|
||||
this.Controls.Add(this.comboBox_InputValue);
|
||||
this.Controls.Add(this.button_Cancle);
|
||||
this.Controls.Add(this.button_OK);
|
||||
this.Controls.Add(this.textBox_InputValue);
|
||||
this.Controls.Add(this.label_Message);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "WriteQualityValueForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Write value";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_Message;
|
||||
private System.Windows.Forms.TextBox textBox_InputValue;
|
||||
private System.Windows.Forms.Button button_OK;
|
||||
private System.Windows.Forms.Button button_Cancle;
|
||||
private System.Windows.Forms.ComboBox comboBox_InputValue;
|
||||
}
|
||||
}
|
||||
267
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueForm.cs
Normal file
267
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueForm.cs
Normal file
@@ -0,0 +1,267 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
//using BasicData;
|
||||
using System.Text.RegularExpressions;
|
||||
//using SystemFramework;
|
||||
using System.Threading;
|
||||
using DoWhatPlc;
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
public partial class WriteQualityValueForm : Form
|
||||
{
|
||||
QualityDataType SelectListData;
|
||||
Form MainForm;
|
||||
public WriteQualityValueForm(QualityDataType SelectData,Form Mainform)
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeComponent();
|
||||
SelectListData = new QualityDataType();
|
||||
SelectListData = SelectData;
|
||||
SetForm(SelectData.tagTypeID, SelectData.tagValue);
|
||||
MainForm = Mainform;
|
||||
this.Parent = Mainform;
|
||||
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void button_OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!TagTypeID_Confirm(SelectListData.tagTypeID)) return;
|
||||
|
||||
this.Hide () ;
|
||||
|
||||
QualityDataQueryStruct QualityStruct = new QualityDataQueryStruct(SelectListData.tagID , SelectListData.tagTypeID , comboBox_InputValue.SelectedIndex.ToString(), textBox_InputValue.Text,this);
|
||||
Thread t = new Thread(new ParameterizedThreadStart(WriteQualityDataByTagID_Thread));
|
||||
t.Start(QualityStruct);
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WriteQualityDataByTagID_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QualityStruct = (QualityDataQueryStruct)obj;
|
||||
Form ThisForm = (Form)QualityStruct.tempForm;
|
||||
|
||||
|
||||
if (QualityStruct.tagTypeID == 11)
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(QualityStruct.tagID, QualityStruct.tagValue.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(SelectListData.tagID, QualityStruct.tagValue2.ToString());
|
||||
}
|
||||
MainForm.BeginInvoke (MisData.MainFormRefresh, null, null);
|
||||
Action ActionDelete = () => { this.Close();this.Dispose(); };
|
||||
if(this.InvokeRequired )
|
||||
{
|
||||
ThisForm.BeginInvoke(ActionDelete);
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionDelete();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void button_Cancle_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SetForm( int TagTypeID,object TagValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (TagTypeID)
|
||||
{
|
||||
case 11://BOOL
|
||||
comboBox_InputValue.Enabled = true;
|
||||
comboBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Enabled = false;
|
||||
textBox_InputValue.Visible = false;
|
||||
label_Message.Text = "Data type: Boolean";
|
||||
if (Convert.ToBoolean(TagValue))
|
||||
{
|
||||
comboBox_InputValue.SelectedIndex = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
comboBox_InputValue.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2://INT.
|
||||
label_Message.Text = "Data type: Int16 Range from -32768 to 32767";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 17://BYTE
|
||||
label_Message.Text = "Data type: Byte Range from 0 to 255";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 8://STRING
|
||||
label_Message.Text = "Data type: String";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 18://Word
|
||||
label_Message.Text = "Data type: UInt16 Range from 0 to 65535";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 4://real
|
||||
label_Message.Text = "Data type: Single Range from -3.402823E+38 to 3.402823E+38";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
default://Unknow
|
||||
label_Message.Text = "Data type: Unknow";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool TagTypeID_Confirm( int TagTypeID)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (TagTypeID)
|
||||
{
|
||||
|
||||
|
||||
case 2://INT
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是整数!");
|
||||
return false;
|
||||
}
|
||||
if (textBox_InputValue.Text.Length > 9)
|
||||
{
|
||||
MessageBox.Show("输入数据不在范围内");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 17://BYTE
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是整数!");
|
||||
return false;
|
||||
}
|
||||
if (Convert.ToInt32(textBox_InputValue.Text.Trim()) > 255)
|
||||
{
|
||||
MessageBox.Show("输入数据不在范围内");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 8://STRING
|
||||
|
||||
break;
|
||||
case 18://Word
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是整数!");
|
||||
return false;
|
||||
}
|
||||
if (textBox_InputValue.Text.Trim().Length > 4)
|
||||
{
|
||||
MessageBox.Show("输入数据不在范围内");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 4://real
|
||||
//TextBox存在非数字字符 报错
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^-?\d+\.?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是实数!");
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
120
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueForm.resx
Normal file
120
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueForm.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
115
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueFormSim.Designer.cs
generated
Normal file
115
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueFormSim.Designer.cs
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
namespace MisDataSaveDateSim
|
||||
{
|
||||
partial class WriteQualityValueForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label_Message = new System.Windows.Forms.Label();
|
||||
this.textBox_InputValue = new System.Windows.Forms.TextBox();
|
||||
this.button_OK = new System.Windows.Forms.Button();
|
||||
this.button_Cancle = new System.Windows.Forms.Button();
|
||||
this.comboBox_InputValue = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_Message
|
||||
//
|
||||
this.label_Message.AutoSize = true;
|
||||
this.label_Message.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label_Message.Location = new System.Drawing.Point(15, 10);
|
||||
this.label_Message.Name = "label_Message";
|
||||
this.label_Message.Size = new System.Drawing.Size(41, 12);
|
||||
this.label_Message.TabIndex = 0;
|
||||
this.label_Message.Text = "label1";
|
||||
//
|
||||
// textBox_InputValue
|
||||
//
|
||||
this.textBox_InputValue.Location = new System.Drawing.Point(10, 50);
|
||||
this.textBox_InputValue.Name = "textBox_InputValue";
|
||||
this.textBox_InputValue.Size = new System.Drawing.Size(475, 21);
|
||||
this.textBox_InputValue.TabIndex = 1;
|
||||
//
|
||||
// button_OK
|
||||
//
|
||||
this.button_OK.Location = new System.Drawing.Point(268, 81);
|
||||
this.button_OK.Name = "button_OK";
|
||||
this.button_OK.Size = new System.Drawing.Size(95, 25);
|
||||
this.button_OK.TabIndex = 2;
|
||||
this.button_OK.Text = "OK";
|
||||
this.button_OK.UseVisualStyleBackColor = true;
|
||||
this.button_OK.Click += new System.EventHandler(this.button_OK_Click);
|
||||
//
|
||||
// button_Cancle
|
||||
//
|
||||
this.button_Cancle.Location = new System.Drawing.Point(369, 81);
|
||||
this.button_Cancle.Name = "button_Cancle";
|
||||
this.button_Cancle.Size = new System.Drawing.Size(95, 25);
|
||||
this.button_Cancle.TabIndex = 2;
|
||||
this.button_Cancle.Text = "Cancel";
|
||||
this.button_Cancle.UseVisualStyleBackColor = true;
|
||||
this.button_Cancle.Click += new System.EventHandler(this.button_Cancle_Click);
|
||||
//
|
||||
// comboBox_InputValue
|
||||
//
|
||||
this.comboBox_InputValue.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox_InputValue.FormattingEnabled = true;
|
||||
this.comboBox_InputValue.Items.AddRange(new object[] {
|
||||
"false",
|
||||
"true"});
|
||||
this.comboBox_InputValue.Location = new System.Drawing.Point(10, 50);
|
||||
this.comboBox_InputValue.Name = "comboBox_InputValue";
|
||||
this.comboBox_InputValue.Size = new System.Drawing.Size(475, 20);
|
||||
this.comboBox_InputValue.TabIndex = 3;
|
||||
//
|
||||
// WriteQualityValueForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(494, 111);
|
||||
this.Controls.Add(this.comboBox_InputValue);
|
||||
this.Controls.Add(this.button_Cancle);
|
||||
this.Controls.Add(this.button_OK);
|
||||
this.Controls.Add(this.textBox_InputValue);
|
||||
this.Controls.Add(this.label_Message);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "WriteQualityValueForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Write value";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_Message;
|
||||
private System.Windows.Forms.TextBox textBox_InputValue;
|
||||
private System.Windows.Forms.Button button_OK;
|
||||
private System.Windows.Forms.Button button_Cancle;
|
||||
private System.Windows.Forms.ComboBox comboBox_InputValue;
|
||||
}
|
||||
}
|
||||
267
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueFormSim.cs
Normal file
267
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueFormSim.cs
Normal file
@@ -0,0 +1,267 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
//using BasicData;
|
||||
using System.Text.RegularExpressions;
|
||||
//using SystemFramework;
|
||||
using System.Threading;
|
||||
using DoWhatPlc;
|
||||
|
||||
namespace MisDataSaveDateSim
|
||||
{
|
||||
public partial class WriteQualityValueForm : Form
|
||||
{
|
||||
QualityDataType SelectListData;
|
||||
Form MainForm;
|
||||
public WriteQualityValueForm(QualityDataType SelectData,Form Mainform)
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeComponent();
|
||||
SelectListData = new QualityDataType();
|
||||
SelectListData = SelectData;
|
||||
SetForm(SelectData.tagTypeID, SelectData.tagValue);
|
||||
MainForm = Mainform;
|
||||
this.Parent = Mainform;
|
||||
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void button_OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!TagTypeID_Confirm(SelectListData.tagTypeID)) return;
|
||||
|
||||
this.Hide () ;
|
||||
|
||||
QualityDataQueryStruct QualityStruct = new QualityDataQueryStruct(SelectListData.tagID , SelectListData.tagTypeID , comboBox_InputValue.SelectedIndex.ToString(), textBox_InputValue.Text,this);
|
||||
Thread t = new Thread(new ParameterizedThreadStart(WriteQualityDataByTagID_Thread));
|
||||
t.Start(QualityStruct);
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WriteQualityDataByTagID_Thread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
QualityDataQueryStruct QualityStruct = (QualityDataQueryStruct)obj;
|
||||
Form ThisForm = (Form)QualityStruct.tempForm;
|
||||
|
||||
|
||||
if (QualityStruct.tagTypeID == 11)
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(QualityStruct.tagID, QualityStruct.tagValue.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
DtWebApi.ReadWritePLC.WritePLC(SelectListData.tagID, QualityStruct.tagValue2.ToString());
|
||||
}
|
||||
MainForm.BeginInvoke (MisData.MainFormRefresh, null, null);
|
||||
Action ActionDelete = () => { this.Close();this.Dispose(); };
|
||||
if(this.InvokeRequired )
|
||||
{
|
||||
ThisForm.BeginInvoke(ActionDelete);
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionDelete();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void button_Cancle_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SetForm( int TagTypeID,object TagValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (TagTypeID)
|
||||
{
|
||||
case 11://BOOL
|
||||
comboBox_InputValue.Enabled = true;
|
||||
comboBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Enabled = false;
|
||||
textBox_InputValue.Visible = false;
|
||||
label_Message.Text = "Data type: Boolean";
|
||||
if (Convert.ToBoolean(TagValue))
|
||||
{
|
||||
comboBox_InputValue.SelectedIndex = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
comboBox_InputValue.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2://INT.
|
||||
label_Message.Text = "Data type: Int16 Range from -32768 to 32767";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 17://BYTE
|
||||
label_Message.Text = "Data type: Byte Range from 0 to 255";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 8://STRING
|
||||
label_Message.Text = "Data type: String";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 18://Word
|
||||
label_Message.Text = "Data type: UInt16 Range from 0 to 65535";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
case 4://real
|
||||
label_Message.Text = "Data type: Single Range from -3.402823E+38 to 3.402823E+38";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
default://Unknow
|
||||
label_Message.Text = "Data type: Unknow";
|
||||
comboBox_InputValue.Enabled = false;
|
||||
comboBox_InputValue.Visible = false;
|
||||
textBox_InputValue.Enabled = true;
|
||||
textBox_InputValue.Visible = true;
|
||||
textBox_InputValue.Text = TagValue.ToString();
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool TagTypeID_Confirm( int TagTypeID)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (TagTypeID)
|
||||
{
|
||||
|
||||
|
||||
case 2://INT
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是整数!");
|
||||
return false;
|
||||
}
|
||||
if (textBox_InputValue.Text.Length > 9)
|
||||
{
|
||||
MessageBox.Show("输入数据不在范围内");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 17://BYTE
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是整数!");
|
||||
return false;
|
||||
}
|
||||
if (Convert.ToInt32(textBox_InputValue.Text.Trim()) > 255)
|
||||
{
|
||||
MessageBox.Show("输入数据不在范围内");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 8://STRING
|
||||
|
||||
break;
|
||||
case 18://Word
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^[-]?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是整数!");
|
||||
return false;
|
||||
}
|
||||
if (textBox_InputValue.Text.Trim().Length > 4)
|
||||
{
|
||||
MessageBox.Show("输入数据不在范围内");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 4://real
|
||||
//TextBox存在非数字字符 报错
|
||||
//TextBox存在非数字字符 报错
|
||||
if (!Regex.IsMatch(textBox_InputValue.Text, @"^-?\d+\.?\d*$"))
|
||||
{
|
||||
MessageBox.Show("输入不是实数!");
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//ApplicationLog.WriteLog(err, err.Message);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
120
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueFormSim.resx
Normal file
120
MisDataPlcTagID/MisDataPlcTagID/WriteQualityValueFormSim.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
36
MisDataPlcTagID/Properties/AssemblyInfo.cs
Normal file
36
MisDataPlcTagID/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("MisDataPlcTagID")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("MisDataPlcTagID")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("0f887ab8-1bc5-4ef0-9240-e7afd91a9911")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Reference in New Issue
Block a user