Commit 62e13569 LN

西安料仓增加zxing识别二维码

1 个父辈 09248790
此文件类型无法预览
...@@ -9,9 +9,24 @@ ...@@ -9,9 +9,24 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.ACSingleStore</RootNamespace> <RootNamespace>OnlineStore.ACSingleStore</RootNamespace>
<AssemblyName>ACSingleStore</AssemblyName> <AssemblyName>ACSingleStore</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -244,6 +259,13 @@ ...@@ -244,6 +259,13 @@
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
<?xml version="1.0"?> <?xml version="1.0"?>
<configuration> <configuration>
<configSections> <configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections> </configSections>
<appSettings> <appSettings>
<!--是否开机自动启动料仓--> <!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="1"/>
<add key="App_Title" value="AC_SA_料仓_1" /> <add key="App_Title" value="AC_SA_料仓_1"/>
<add key="scanner_start_command" value="S" /> <add key="scanner_start_command" value="S"/>
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)--> <!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<add key="StartBlowValue" value="4" /> <add key="StartBlowValue" value="4"/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)--> <!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="4" /> <add key="StopBlowValue" value="4"/>
<!--Server address--> <!--Server address-->
<!--<add key="http.server" value="http://localhost:80/"/>--> <!--<add key="http.server" value="http://localhost:80/"/>-->
<!--storeType--> <!--storeType-->
<add key="store_count" value="1" /> <add key="store_count" value="1"/>
<!--start one store config--> <!--start one store config-->
<add key="Store_Position_Config" value="\StoreConfig\AC\linePositions.csv" /> <add key="Store_Position_Config" value="\StoreConfig\AC\linePositions.csv"/>
<add key="Store_ConfigPath" value="\StoreConfig\AC\StoreConfig.csv" /> <add key="Store_ConfigPath" value="\StoreConfig\AC\StoreConfig.csv"/>
<add key="Store_Type" value="RC_AC_SA" /> <add key="Store_Type" value="RC_AC_SA"/>
<add key="Store_CID" value="rc29ac-1" /> <add key="Store_CID" value="rc29ac-1"/>
<!--end one store config--> <!--end one store config-->
<!--摄像机名称列表配置,用#分割--> <!--摄像机名称列表配置,用#分割-->
<add key="CameraName" value="GigE:MV-CE100-30GC (00C69898483)" /> <add key="CameraName" value="GigE:MV-CE100-30GC (00C69898483)"/>
<!--二维码类型列表配置,用#分割,一维码=Barcode--> <!--二维码类型列表配置,用#分割,一维码=Barcode-->
<add key="CodeType" value="QR Code#Data Matrix ECC 200#Micro QR Code" /> <add key="CodeType" value="QR Code#Data Matrix ECC 200#Micro QR Code"/>
<!--<add key="CodeType" value="Data Matrix ECC 200"/>--> <!--<add key="CodeType" value="Data Matrix ECC 200"/>-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样--> <!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="\CodeParam\" /> <add key="CodeParamPath" value="\CodeParam\"/>
<add key ="AI_ConvertPosition" value ="55"/> <add key="AI_ConvertPosition" value="55"/>
<add key ="InOutDefaultPosition" value ="8000"/> <add key="InOutDefaultPosition" value="8000"/>
<add key ="Config_Pwd" value ="123456"/> <add key="Config_Pwd" value="123456"/>
<!--出库等待料盘拿走的时间,秒--> <!--出库等待料盘拿走的时间,秒-->
<add key ="OutStoreWaitSeconds" value ="10"/> <add key="OutStoreWaitSeconds" value="10"/>
<!--压紧轴对应1mm的脉冲--> <!--压紧轴对应1mm的脉冲-->
<add key="ComAxisChangeValue" value="2400" /> <add key="ComAxisChangeValue" value="2400"/>
<!--温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪--> <!--温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪-->
<add key ="HumitureControllerType" value ="1"/> <add key="HumitureControllerType" value="1"/>
<!--流水线地址和端口配置--> <!--流水线地址和端口配置-->
<add key ="LineServerIp" value ="192.168.200.69"/> <add key="LineServerIp" value="192.168.200.69"/>
<add key ="LineServerPort" value ="1234"/> <add key="LineServerPort" value="1234"/>
<!--解码方式,0=halcon 解码,1=使用zxing解码-->
<add key="DeCodeType" value="1"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/ACStore-RC29-1.log" /> <file value="logs/ACStore-RC29-1.log"/>
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8"/>
<appendToFile value="true" /> <appendToFile value="true"/>
<rollingStyle value="Date" /> <rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd" /> <datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout> </layout>
</appender> </appender>
<root> <root>
<level value="Info" /> <level value="Info"/>
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender"/>
</root> </root>
</log4net> </log4net>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup> </startup>
<!-- 部署服务库项目时,必须将配置文件的内容添加到 <!-- 部署服务库项目时,必须将配置文件的内容添加到
主机的 app.config 文件中。System.Configuration 不支持库的配置文件。 --> 主机的 app.config 文件中。System.Configuration 不支持库的配置文件。 -->
...@@ -70,14 +72,14 @@ ...@@ -70,14 +72,14 @@
<service name="AcStoreWCF.CWSMDBox"> <service name="AcStoreWCF.CWSMDBox">
<endpoint address="" binding="basicHttpBinding" contract="AcStoreWCF.ICWSMDBox"> <endpoint address="" binding="basicHttpBinding" contract="AcStoreWCF.ICWSMDBox">
<identity> <identity>
<dns value="localhost" /> <dns value="localhost"/>
</identity> </identity>
</endpoint> </endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
<host> <host>
<baseAddresses> <baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/AcStoreWCF/CWSMDBox/" /> <add baseAddress="http://localhost:8733/Design_Time_Addresses/AcStoreWCF/CWSMDBox/"/>
</baseAddresses> </baseAddresses>
</host> </host>
</service> </service>
...@@ -87,13 +89,13 @@ ...@@ -87,13 +89,13 @@
<behavior> <behavior>
<!-- 为避免泄漏元数据信息, <!-- 为避免泄漏元数据信息,
请在部署前将以下值设置为 false --> 请在部署前将以下值设置为 false -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" /> <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<!-- 要接收故障异常详细信息以进行调试, <!-- 要接收故障异常详细信息以进行调试,
请将以下值设置为 true。在部署前设置为 false 请将以下值设置为 true。在部署前设置为 false
以避免泄漏异常信息 --> 以避免泄漏异常信息 -->
<serviceDebug includeExceptionDetailInFaults="False" /> <serviceDebug includeExceptionDetailInFaults="False"/>
</behavior> </behavior>
</serviceBehaviors> </serviceBehaviors>
</behaviors> </behaviors>
</system.serviceModel> </system.serviceModel>
</configuration>
\ No newline at end of file \ No newline at end of file
</configuration>
...@@ -206,6 +206,13 @@ ...@@ -206,6 +206,13 @@
this.btnOpenDoor = new System.Windows.Forms.Button(); this.btnOpenDoor = new System.Windows.Forms.Button();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupCode = new System.Windows.Forms.GroupBox();
this.txtCode = new System.Windows.Forms.TextBox();
this.label32 = new System.Windows.Forms.Label();
this.txtImage = new System.Windows.Forms.TextBox();
this.label31 = new System.Windows.Forms.Label();
this.btnCodeTest = new System.Windows.Forms.Button();
this.btnOpenFile = new System.Windows.Forms.Button();
this.groupBox7 = new System.Windows.Forms.GroupBox(); this.groupBox7 = new System.Windows.Forms.GroupBox();
this.groupHistory = new System.Windows.Forms.GroupBox(); this.groupHistory = new System.Windows.Forms.GroupBox();
this.txtHistoryTemp = new System.Windows.Forms.TextBox(); this.txtHistoryTemp = new System.Windows.Forms.TextBox();
...@@ -258,6 +265,7 @@ ...@@ -258,6 +265,7 @@
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.groupCode.SuspendLayout();
this.groupBox7.SuspendLayout(); this.groupBox7.SuspendLayout();
this.groupHistory.SuspendLayout(); this.groupHistory.SuspendLayout();
this.tabControl2.SuspendLayout(); this.tabControl2.SuspendLayout();
...@@ -818,7 +826,7 @@ ...@@ -818,7 +826,7 @@
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(7, 9); this.richTextBox1.Location = new System.Drawing.Point(7, 9);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(545, 481); this.richTextBox1.Size = new System.Drawing.Size(545, 427);
this.richTextBox1.TabIndex = 256; this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
// //
...@@ -1713,7 +1721,7 @@ ...@@ -1713,7 +1721,7 @@
// //
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearLog.Location = new System.Drawing.Point(313, 515); this.btnClearLog.Location = new System.Drawing.Point(313, 461);
this.btnClearLog.Name = "btnClearLog"; this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 38); this.btnClearLog.Size = new System.Drawing.Size(105, 38);
this.btnClearLog.TabIndex = 224; this.btnClearLog.TabIndex = 224;
...@@ -2062,7 +2070,7 @@ ...@@ -2062,7 +2070,7 @@
this.groupComAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupComAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupComAxis.Location = new System.Drawing.Point(7, 8); this.groupComAxis.Location = new System.Drawing.Point(7, 8);
this.groupComAxis.Name = "groupComAxis"; this.groupComAxis.Name = "groupComAxis";
this.groupComAxis.Size = new System.Drawing.Size(544, 285); this.groupComAxis.Size = new System.Drawing.Size(544, 274);
this.groupComAxis.TabIndex = 271; this.groupComAxis.TabIndex = 271;
this.groupComAxis.TabStop = false; this.groupComAxis.TabStop = false;
this.groupComAxis.Text = "压紧轴"; this.groupComAxis.Text = "压紧轴";
...@@ -2070,7 +2078,7 @@ ...@@ -2070,7 +2078,7 @@
// label20 // label20
// //
this.label20.AutoSize = true; this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(8, 167); this.label20.Location = new System.Drawing.Point(8, 164);
this.label20.Name = "label20"; this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(68, 17); this.label20.Size = new System.Drawing.Size(68, 17);
this.label20.TabIndex = 99; this.label20.TabIndex = 99;
...@@ -2078,7 +2086,7 @@ ...@@ -2078,7 +2086,7 @@
// //
// txtComAPosition // txtComAPosition
// //
this.txtComAPosition.Location = new System.Drawing.Point(79, 160); this.txtComAPosition.Location = new System.Drawing.Point(79, 157);
this.txtComAPosition.MaxLength = 15; this.txtComAPosition.MaxLength = 15;
this.txtComAPosition.Name = "txtComAPosition"; this.txtComAPosition.Name = "txtComAPosition";
this.txtComAPosition.Size = new System.Drawing.Size(103, 23); this.txtComAPosition.Size = new System.Drawing.Size(103, 23);
...@@ -2089,7 +2097,7 @@ ...@@ -2089,7 +2097,7 @@
// //
this.lblShuoKeMsg.AutoSize = true; this.lblShuoKeMsg.AutoSize = true;
this.lblShuoKeMsg.ForeColor = System.Drawing.Color.Green; this.lblShuoKeMsg.ForeColor = System.Drawing.Color.Green;
this.lblShuoKeMsg.Location = new System.Drawing.Point(76, 245); this.lblShuoKeMsg.Location = new System.Drawing.Point(76, 242);
this.lblShuoKeMsg.Name = "lblShuoKeMsg"; this.lblShuoKeMsg.Name = "lblShuoKeMsg";
this.lblShuoKeMsg.Size = new System.Drawing.Size(80, 17); this.lblShuoKeMsg.Size = new System.Drawing.Size(80, 17);
this.lblShuoKeMsg.TabIndex = 97; this.lblShuoKeMsg.TabIndex = 97;
...@@ -2097,7 +2105,7 @@ ...@@ -2097,7 +2105,7 @@
// //
// btnRelMove // btnRelMove
// //
this.btnRelMove.Location = new System.Drawing.Point(299, 71); this.btnRelMove.Location = new System.Drawing.Point(299, 68);
this.btnRelMove.Name = "btnRelMove"; this.btnRelMove.Name = "btnRelMove";
this.btnRelMove.Size = new System.Drawing.Size(105, 33); this.btnRelMove.Size = new System.Drawing.Size(105, 33);
this.btnRelMove.TabIndex = 96; this.btnRelMove.TabIndex = 96;
...@@ -2125,7 +2133,7 @@ ...@@ -2125,7 +2133,7 @@
// //
// btnGetPosition // btnGetPosition
// //
this.btnGetPosition.Location = new System.Drawing.Point(188, 155); this.btnGetPosition.Location = new System.Drawing.Point(188, 152);
this.btnGetPosition.Name = "btnGetPosition"; this.btnGetPosition.Name = "btnGetPosition";
this.btnGetPosition.Size = new System.Drawing.Size(105, 33); this.btnGetPosition.Size = new System.Drawing.Size(105, 33);
this.btnGetPosition.TabIndex = 93; this.btnGetPosition.TabIndex = 93;
...@@ -2140,7 +2148,7 @@ ...@@ -2140,7 +2148,7 @@
this.cmbHomeType.Items.AddRange(new object[] { this.cmbHomeType.Items.AddRange(new object[] {
"0=反方向", "0=反方向",
"1=正方向"}); "1=正方向"});
this.cmbHomeType.Location = new System.Drawing.Point(79, 202); this.cmbHomeType.Location = new System.Drawing.Point(79, 199);
this.cmbHomeType.Name = "cmbHomeType"; this.cmbHomeType.Name = "cmbHomeType";
this.cmbHomeType.Size = new System.Drawing.Size(103, 25); this.cmbHomeType.Size = new System.Drawing.Size(103, 25);
this.cmbHomeType.TabIndex = 92; this.cmbHomeType.TabIndex = 92;
...@@ -2148,7 +2156,7 @@ ...@@ -2148,7 +2156,7 @@
// label13 // label13
// //
this.label13.AutoSize = true; this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(8, 209); this.label13.Location = new System.Drawing.Point(8, 206);
this.label13.Name = "label13"; this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(68, 17); this.label13.Size = new System.Drawing.Size(68, 17);
this.label13.TabIndex = 91; this.label13.TabIndex = 91;
...@@ -2157,7 +2165,7 @@ ...@@ -2157,7 +2165,7 @@
// label17 // label17
// //
this.label17.AutoSize = true; this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(32, 124); this.label17.Location = new System.Drawing.Point(32, 121);
this.label17.Name = "label17"; this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(44, 17); this.label17.Size = new System.Drawing.Size(44, 17);
this.label17.TabIndex = 90; this.label17.TabIndex = 90;
...@@ -2165,7 +2173,7 @@ ...@@ -2165,7 +2173,7 @@
// //
// txtSpeed // txtSpeed
// //
this.txtSpeed.Location = new System.Drawing.Point(79, 118); this.txtSpeed.Location = new System.Drawing.Point(79, 115);
this.txtSpeed.MaxLength = 15; this.txtSpeed.MaxLength = 15;
this.txtSpeed.Name = "txtSpeed"; this.txtSpeed.Name = "txtSpeed";
this.txtSpeed.Size = new System.Drawing.Size(103, 23); this.txtSpeed.Size = new System.Drawing.Size(103, 23);
...@@ -2174,7 +2182,7 @@ ...@@ -2174,7 +2182,7 @@
// //
// btnVolMove // btnVolMove
// //
this.btnVolMove.Location = new System.Drawing.Point(188, 113); this.btnVolMove.Location = new System.Drawing.Point(188, 110);
this.btnVolMove.Name = "btnVolMove"; this.btnVolMove.Name = "btnVolMove";
this.btnVolMove.Size = new System.Drawing.Size(105, 33); this.btnVolMove.Size = new System.Drawing.Size(105, 33);
this.btnVolMove.TabIndex = 88; this.btnVolMove.TabIndex = 88;
...@@ -2204,7 +2212,7 @@ ...@@ -2204,7 +2212,7 @@
// //
// btnStatusSearch // btnStatusSearch
// //
this.btnStatusSearch.Location = new System.Drawing.Point(299, 197); this.btnStatusSearch.Location = new System.Drawing.Point(299, 194);
this.btnStatusSearch.Name = "btnStatusSearch"; this.btnStatusSearch.Name = "btnStatusSearch";
this.btnStatusSearch.Size = new System.Drawing.Size(105, 33); this.btnStatusSearch.Size = new System.Drawing.Size(105, 33);
this.btnStatusSearch.TabIndex = 85; this.btnStatusSearch.TabIndex = 85;
...@@ -2215,7 +2223,7 @@ ...@@ -2215,7 +2223,7 @@
// label19 // label19
// //
this.label19.AutoSize = true; this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(32, 79); this.label19.Location = new System.Drawing.Point(32, 76);
this.label19.Name = "label19"; this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(44, 17); this.label19.Size = new System.Drawing.Size(44, 17);
this.label19.TabIndex = 84; this.label19.TabIndex = 84;
...@@ -2223,7 +2231,7 @@ ...@@ -2223,7 +2231,7 @@
// //
// txtLinePosition // txtLinePosition
// //
this.txtLinePosition.Location = new System.Drawing.Point(79, 76); this.txtLinePosition.Location = new System.Drawing.Point(79, 73);
this.txtLinePosition.MaxLength = 15; this.txtLinePosition.MaxLength = 15;
this.txtLinePosition.Name = "txtLinePosition"; this.txtLinePosition.Name = "txtLinePosition";
this.txtLinePosition.Size = new System.Drawing.Size(103, 23); this.txtLinePosition.Size = new System.Drawing.Size(103, 23);
...@@ -2232,7 +2240,7 @@ ...@@ -2232,7 +2240,7 @@
// //
// btnHomeMove // btnHomeMove
// //
this.btnHomeMove.Location = new System.Drawing.Point(188, 197); this.btnHomeMove.Location = new System.Drawing.Point(188, 194);
this.btnHomeMove.Name = "btnHomeMove"; this.btnHomeMove.Name = "btnHomeMove";
this.btnHomeMove.Size = new System.Drawing.Size(105, 33); this.btnHomeMove.Size = new System.Drawing.Size(105, 33);
this.btnHomeMove.TabIndex = 12; this.btnHomeMove.TabIndex = 12;
...@@ -2242,7 +2250,7 @@ ...@@ -2242,7 +2250,7 @@
// //
// btnClearPosition // btnClearPosition
// //
this.btnClearPosition.Location = new System.Drawing.Point(299, 155); this.btnClearPosition.Location = new System.Drawing.Point(299, 152);
this.btnClearPosition.Name = "btnClearPosition"; this.btnClearPosition.Name = "btnClearPosition";
this.btnClearPosition.Size = new System.Drawing.Size(105, 33); this.btnClearPosition.Size = new System.Drawing.Size(105, 33);
this.btnClearPosition.TabIndex = 11; this.btnClearPosition.TabIndex = 11;
...@@ -2252,7 +2260,7 @@ ...@@ -2252,7 +2260,7 @@
// //
// btnStop // btnStop
// //
this.btnStop.Location = new System.Drawing.Point(298, 113); this.btnStop.Location = new System.Drawing.Point(298, 110);
this.btnStop.Name = "btnStop"; this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(105, 33); this.btnStop.Size = new System.Drawing.Size(105, 33);
this.btnStop.TabIndex = 10; this.btnStop.TabIndex = 10;
...@@ -2262,7 +2270,7 @@ ...@@ -2262,7 +2270,7 @@
// //
// btnLineAbsMove // btnLineAbsMove
// //
this.btnLineAbsMove.Location = new System.Drawing.Point(188, 71); this.btnLineAbsMove.Location = new System.Drawing.Point(188, 68);
this.btnLineAbsMove.Name = "btnLineAbsMove"; this.btnLineAbsMove.Name = "btnLineAbsMove";
this.btnLineAbsMove.Size = new System.Drawing.Size(105, 33); this.btnLineAbsMove.Size = new System.Drawing.Size(105, 33);
this.btnLineAbsMove.TabIndex = 9; this.btnLineAbsMove.TabIndex = 9;
...@@ -2299,7 +2307,7 @@ ...@@ -2299,7 +2307,7 @@
this.tabControl1.Location = new System.Drawing.Point(509, 89); this.tabControl1.Location = new System.Drawing.Point(509, 89);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(568, 703); this.tabControl1.Size = new System.Drawing.Size(568, 649);
this.tabControl1.TabIndex = 272; this.tabControl1.TabIndex = 272;
// //
// tabPage3 // tabPage3
...@@ -2312,7 +2320,7 @@ ...@@ -2312,7 +2320,7 @@
this.tabPage3.Controls.Add(this.richTextBox1); this.tabPage3.Controls.Add(this.richTextBox1);
this.tabPage3.Location = new System.Drawing.Point(4, 29); this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(560, 670); this.tabPage3.Size = new System.Drawing.Size(560, 616);
this.tabPage3.TabIndex = 2; this.tabPage3.TabIndex = 2;
this.tabPage3.Text = " 操作日志 "; this.tabPage3.Text = " 操作日志 ";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
...@@ -2321,7 +2329,7 @@ ...@@ -2321,7 +2329,7 @@
// //
this.btnCloseLed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnCloseLed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseLed.Location = new System.Drawing.Point(149, 568); this.btnCloseLed.Location = new System.Drawing.Point(149, 514);
this.btnCloseLed.Name = "btnCloseLed"; this.btnCloseLed.Name = "btnCloseLed";
this.btnCloseLed.Size = new System.Drawing.Size(105, 38); this.btnCloseLed.Size = new System.Drawing.Size(105, 38);
this.btnCloseLed.TabIndex = 260; this.btnCloseLed.TabIndex = 260;
...@@ -2333,7 +2341,7 @@ ...@@ -2333,7 +2341,7 @@
// //
this.btnOpenLed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnOpenLed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnOpenLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOpenLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenLed.Location = new System.Drawing.Point(32, 568); this.btnOpenLed.Location = new System.Drawing.Point(32, 514);
this.btnOpenLed.Name = "btnOpenLed"; this.btnOpenLed.Name = "btnOpenLed";
this.btnOpenLed.Size = new System.Drawing.Size(105, 38); this.btnOpenLed.Size = new System.Drawing.Size(105, 38);
this.btnOpenLed.TabIndex = 259; this.btnOpenLed.TabIndex = 259;
...@@ -2345,7 +2353,7 @@ ...@@ -2345,7 +2353,7 @@
// //
this.btnCloseDoor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnCloseDoor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCloseDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDoor.Location = new System.Drawing.Point(149, 515); this.btnCloseDoor.Location = new System.Drawing.Point(149, 461);
this.btnCloseDoor.Name = "btnCloseDoor"; this.btnCloseDoor.Name = "btnCloseDoor";
this.btnCloseDoor.Size = new System.Drawing.Size(105, 38); this.btnCloseDoor.Size = new System.Drawing.Size(105, 38);
this.btnCloseDoor.TabIndex = 258; this.btnCloseDoor.TabIndex = 258;
...@@ -2357,7 +2365,7 @@ ...@@ -2357,7 +2365,7 @@
// //
this.btnOpenDoor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnOpenDoor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDoor.Location = new System.Drawing.Point(32, 515); this.btnOpenDoor.Location = new System.Drawing.Point(32, 461);
this.btnOpenDoor.Name = "btnOpenDoor"; this.btnOpenDoor.Name = "btnOpenDoor";
this.btnOpenDoor.Size = new System.Drawing.Size(105, 38); this.btnOpenDoor.Size = new System.Drawing.Size(105, 38);
this.btnOpenDoor.TabIndex = 257; this.btnOpenDoor.TabIndex = 257;
...@@ -2372,23 +2380,102 @@ ...@@ -2372,23 +2380,102 @@
this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(560, 670); this.tabPage1.Size = new System.Drawing.Size(560, 616);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " 伺服调试 "; this.tabPage1.Text = " 伺服调试 ";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.groupCode);
this.tabPage2.Controls.Add(this.groupBox7); this.tabPage2.Controls.Add(this.groupBox7);
this.tabPage2.Controls.Add(this.groupComAxis); this.tabPage2.Controls.Add(this.groupComAxis);
this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(560, 670); this.tabPage2.Size = new System.Drawing.Size(560, 616);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 压紧轴/温湿度 "; this.tabPage2.Text = " 压紧轴/温湿度 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// groupCode
//
this.groupCode.Controls.Add(this.txtCode);
this.groupCode.Controls.Add(this.label32);
this.groupCode.Controls.Add(this.txtImage);
this.groupCode.Controls.Add(this.label31);
this.groupCode.Controls.Add(this.btnCodeTest);
this.groupCode.Controls.Add(this.btnOpenFile);
this.groupCode.Location = new System.Drawing.Point(7, 414);
this.groupCode.Name = "groupCode";
this.groupCode.Size = new System.Drawing.Size(544, 197);
this.groupCode.TabIndex = 273;
this.groupCode.TabStop = false;
this.groupCode.Text = "扫码测试";
//
// txtCode
//
this.txtCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCode.Location = new System.Drawing.Point(81, 67);
this.txtCode.MaxLength = 10;
this.txtCode.Multiline = true;
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(308, 121);
this.txtCode.TabIndex = 249;
//
// label32
//
this.label32.AutoSize = true;
this.label32.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label32.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label32.Location = new System.Drawing.Point(8, 71);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(80, 17);
this.label32.TabIndex = 248;
this.label32.Text = "二维码内容:";
this.label32.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtImage
//
this.txtImage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtImage.Location = new System.Drawing.Point(56, 28);
this.txtImage.MaxLength = 10;
this.txtImage.Name = "txtImage";
this.txtImage.Size = new System.Drawing.Size(476, 23);
this.txtImage.TabIndex = 247;
//
// label31
//
this.label31.AutoSize = true;
this.label31.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label31.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label31.Location = new System.Drawing.Point(6, 34);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(44, 17);
this.label31.TabIndex = 246;
this.label31.Text = "图片:";
this.label31.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnCodeTest
//
this.btnCodeTest.Location = new System.Drawing.Point(395, 110);
this.btnCodeTest.Name = "btnCodeTest";
this.btnCodeTest.Size = new System.Drawing.Size(137, 33);
this.btnCodeTest.TabIndex = 245;
this.btnCodeTest.Text = "扫码测试";
this.btnCodeTest.UseVisualStyleBackColor = true;
this.btnCodeTest.Click += new System.EventHandler(this.btnCodeTest_Click);
//
// btnOpenFile
//
this.btnOpenFile.Location = new System.Drawing.Point(395, 71);
this.btnOpenFile.Name = "btnOpenFile";
this.btnOpenFile.Size = new System.Drawing.Size(137, 33);
this.btnOpenFile.TabIndex = 244;
this.btnOpenFile.Text = "打开本地图片";
this.btnOpenFile.UseVisualStyleBackColor = true;
this.btnOpenFile.Click += new System.EventHandler(this.btnOpenFile_Click);
//
// groupBox7 // groupBox7
// //
this.groupBox7.Controls.Add(this.groupHistory); this.groupBox7.Controls.Add(this.groupHistory);
...@@ -2401,9 +2488,9 @@ ...@@ -2401,9 +2488,9 @@
this.groupBox7.Controls.Add(this.label27); this.groupBox7.Controls.Add(this.label27);
this.groupBox7.Controls.Add(this.btnTempClose); this.groupBox7.Controls.Add(this.btnTempClose);
this.groupBox7.Controls.Add(this.btnTempInit); this.groupBox7.Controls.Add(this.btnTempInit);
this.groupBox7.Location = new System.Drawing.Point(7, 299); this.groupBox7.Location = new System.Drawing.Point(7, 285);
this.groupBox7.Name = "groupBox7"; this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(544, 321); this.groupBox7.Size = new System.Drawing.Size(544, 126);
this.groupBox7.TabIndex = 272; this.groupBox7.TabIndex = 272;
this.groupBox7.TabStop = false; this.groupBox7.TabStop = false;
this.groupBox7.Text = "温控器调试"; this.groupBox7.Text = "温控器调试";
...@@ -2427,6 +2514,7 @@ ...@@ -2427,6 +2514,7 @@
this.groupHistory.TabIndex = 260; this.groupHistory.TabIndex = 260;
this.groupHistory.TabStop = false; this.groupHistory.TabStop = false;
this.groupHistory.Text = "历史记录"; this.groupHistory.Text = "历史记录";
this.groupHistory.Visible = false;
// //
// txtHistoryTemp // txtHistoryTemp
// //
...@@ -2550,7 +2638,7 @@ ...@@ -2550,7 +2638,7 @@
// //
// btnSelTemp // btnSelTemp
// //
this.btnSelTemp.Location = new System.Drawing.Point(212, 82); this.btnSelTemp.Location = new System.Drawing.Point(212, 74);
this.btnSelTemp.Name = "btnSelTemp"; this.btnSelTemp.Name = "btnSelTemp";
this.btnSelTemp.Size = new System.Drawing.Size(157, 33); this.btnSelTemp.Size = new System.Drawing.Size(157, 33);
this.btnSelTemp.TabIndex = 248; this.btnSelTemp.TabIndex = 248;
...@@ -2561,7 +2649,7 @@ ...@@ -2561,7 +2649,7 @@
// txtHum // txtHum
// //
this.txtHum.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHum.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtHum.Location = new System.Drawing.Point(95, 98); this.txtHum.Location = new System.Drawing.Point(95, 86);
this.txtHum.MaxLength = 10; this.txtHum.MaxLength = 10;
this.txtHum.Name = "txtHum"; this.txtHum.Name = "txtHum";
this.txtHum.Size = new System.Drawing.Size(87, 26); this.txtHum.Size = new System.Drawing.Size(87, 26);
...@@ -2573,7 +2661,7 @@ ...@@ -2573,7 +2661,7 @@
this.label29.AutoSize = true; this.label29.AutoSize = true;
this.label29.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label29.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label29.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label29.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label29.Location = new System.Drawing.Point(38, 101); this.label29.Location = new System.Drawing.Point(38, 89);
this.label29.Name = "label29"; this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(44, 17); this.label29.Size = new System.Drawing.Size(44, 17);
this.label29.TabIndex = 246; this.label29.TabIndex = 246;
...@@ -2583,7 +2671,7 @@ ...@@ -2583,7 +2671,7 @@
// txtTemp // txtTemp
// //
this.txtTemp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtTemp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtTemp.Location = new System.Drawing.Point(95, 63); this.txtTemp.Location = new System.Drawing.Point(95, 55);
this.txtTemp.MaxLength = 10; this.txtTemp.MaxLength = 10;
this.txtTemp.Name = "txtTemp"; this.txtTemp.Name = "txtTemp";
this.txtTemp.Size = new System.Drawing.Size(87, 26); this.txtTemp.Size = new System.Drawing.Size(87, 26);
...@@ -2595,7 +2683,7 @@ ...@@ -2595,7 +2683,7 @@
this.label28.AutoSize = true; this.label28.AutoSize = true;
this.label28.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label28.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label28.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label28.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label28.Location = new System.Drawing.Point(38, 67); this.label28.Location = new System.Drawing.Point(38, 59);
this.label28.Name = "label28"; this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(44, 17); this.label28.Size = new System.Drawing.Size(44, 17);
this.label28.TabIndex = 244; this.label28.TabIndex = 244;
...@@ -2605,7 +2693,7 @@ ...@@ -2605,7 +2693,7 @@
// txtTempPort // txtTempPort
// //
this.txtTempPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtTempPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtTempPort.Location = new System.Drawing.Point(95, 28); this.txtTempPort.Location = new System.Drawing.Point(95, 24);
this.txtTempPort.MaxLength = 10; this.txtTempPort.MaxLength = 10;
this.txtTempPort.Name = "txtTempPort"; this.txtTempPort.Name = "txtTempPort";
this.txtTempPort.Size = new System.Drawing.Size(87, 26); this.txtTempPort.Size = new System.Drawing.Size(87, 26);
...@@ -2617,7 +2705,7 @@ ...@@ -2617,7 +2705,7 @@
this.label27.AutoSize = true; this.label27.AutoSize = true;
this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label27.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.label27.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label27.Location = new System.Drawing.Point(26, 33); this.label27.Location = new System.Drawing.Point(26, 29);
this.label27.Name = "label27"; this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(56, 17); this.label27.Size = new System.Drawing.Size(56, 17);
this.label27.TabIndex = 242; this.label27.TabIndex = 242;
...@@ -2626,7 +2714,7 @@ ...@@ -2626,7 +2714,7 @@
// //
// btnTempClose // btnTempClose
// //
this.btnTempClose.Location = new System.Drawing.Point(322, 30); this.btnTempClose.Location = new System.Drawing.Point(322, 26);
this.btnTempClose.Name = "btnTempClose"; this.btnTempClose.Name = "btnTempClose";
this.btnTempClose.Size = new System.Drawing.Size(100, 33); this.btnTempClose.Size = new System.Drawing.Size(100, 33);
this.btnTempClose.TabIndex = 89; this.btnTempClose.TabIndex = 89;
...@@ -2636,7 +2724,7 @@ ...@@ -2636,7 +2724,7 @@
// //
// btnTempInit // btnTempInit
// //
this.btnTempInit.Location = new System.Drawing.Point(212, 30); this.btnTempInit.Location = new System.Drawing.Point(212, 26);
this.btnTempInit.Name = "btnTempInit"; this.btnTempInit.Name = "btnTempInit";
this.btnTempInit.Size = new System.Drawing.Size(100, 33); this.btnTempInit.Size = new System.Drawing.Size(100, 33);
this.btnTempInit.TabIndex = 88; this.btnTempInit.TabIndex = 88;
...@@ -2905,6 +2993,8 @@ ...@@ -2905,6 +2993,8 @@
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);
this.groupCode.ResumeLayout(false);
this.groupCode.PerformLayout();
this.groupBox7.ResumeLayout(false); this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout(); this.groupBox7.PerformLayout();
this.groupHistory.ResumeLayout(false); this.groupHistory.ResumeLayout(false);
...@@ -3144,6 +3234,13 @@ ...@@ -3144,6 +3234,13 @@
private System.Windows.Forms.Label label26; private System.Windows.Forms.Label label26;
private System.Windows.Forms.Button btnSelHistory; private System.Windows.Forms.Button btnSelHistory;
private System.Windows.Forms.GroupBox groupHistory; private System.Windows.Forms.GroupBox groupHistory;
private System.Windows.Forms.GroupBox groupCode;
private System.Windows.Forms.TextBox txtImage;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.Button btnCodeTest;
private System.Windows.Forms.Button btnOpenFile;
private System.Windows.Forms.TextBox txtCode;
private System.Windows.Forms.Label label32;
} }
} }
...@@ -88,7 +88,7 @@ namespace OnlineStore.ACSingleStore ...@@ -88,7 +88,7 @@ namespace OnlineStore.ACSingleStore
txtInOutP2.Text = ktkPosition.InOutAxis_DoorPosition_P2.ToString(); txtInOutP2.Text = ktkPosition.InOutAxis_DoorPosition_P2.ToString();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString(); //txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString();
} }
List<string> port = new List<string>(SerialPort.GetPortNames()); List<string> port = new List<string>(SerialPort.GetPortNames());
comboBoxPortName.DataSource = port; comboBoxPortName.DataSource = port;
if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0) if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0)
...@@ -132,7 +132,7 @@ namespace OnlineStore.ACSingleStore ...@@ -132,7 +132,7 @@ namespace OnlineStore.ACSingleStore
preOpen = isOpen; preOpen = isOpen;
btnOutStore.Enabled = isOpen; btnOutStore.Enabled = isOpen;
btnInStore.Enabled = isOpen; btnInStore.Enabled = isOpen;
启动ToolStripMenuItem.Enabled = !isOpen; 启动ToolStripMenuItem.Enabled = !isOpen;
停止ToolStripMenuItem.Enabled = isOpen; 停止ToolStripMenuItem.Enabled = isOpen;
复位ToolStripMenuItem.Enabled = isOpen; 复位ToolStripMenuItem.Enabled = isOpen;
...@@ -142,11 +142,11 @@ namespace OnlineStore.ACSingleStore ...@@ -142,11 +142,11 @@ namespace OnlineStore.ACSingleStore
} }
private bool LoadOk = false; private bool LoadOk = false;
private void FrmTest_Load(object sender, EventArgs e) private void FrmTest_Load(object sender, EventArgs e)
{ {
string version = GetVersion(); string version = GetVersion();
LogUtil.logBox = this.richTextBox1; LogUtil.logBox = this.richTextBox1;
initValue(); initValue();
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
...@@ -166,6 +166,14 @@ namespace OnlineStore.ACSingleStore ...@@ -166,6 +166,14 @@ namespace OnlineStore.ACSingleStore
{ {
groupHistory.Visible = false; groupHistory.Visible = false;
} }
if (CodeManager.DeCodeType.Equals(0))
{
groupCode.Visible = false;
}
else
{
groupCode.Visible = true;
}
} }
private DateTime preReadModblsTime = DateTime.Now; private DateTime preReadModblsTime = DateTime.Now;
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
...@@ -173,8 +181,8 @@ namespace OnlineStore.ACSingleStore ...@@ -173,8 +181,8 @@ namespace OnlineStore.ACSingleStore
if (!this.Visible) if (!this.Visible)
{ {
return; return;
} }
lblTemp.Text = store.currTempStr; lblTemp.Text = store.currTempStr;
//忙碌状态不读取状态 //忙碌状态不读取状态
if (!store.storeRunStatus.Equals(StoreRunStatus.Busy)) if (!store.storeRunStatus.Equals(StoreRunStatus.Busy))
{ {
...@@ -208,7 +216,7 @@ namespace OnlineStore.ACSingleStore ...@@ -208,7 +216,7 @@ namespace OnlineStore.ACSingleStore
} }
lblThisSta.Text = store.GetRunStr(); lblThisSta.Text = store.GetRunStr();
//复位按钮状态显示 //复位按钮状态显示
if (复位ToolStripMenuItem.Enabled == false) if (复位ToolStripMenuItem.Enabled == false)
{ {
...@@ -239,7 +247,7 @@ namespace OnlineStore.ACSingleStore ...@@ -239,7 +247,7 @@ namespace OnlineStore.ACSingleStore
lblWarnMsg.Text = store.WarnMsg; lblWarnMsg.Text = store.WarnMsg;
if (store.Config.IsHasDoorLimit.Equals(1)) if (store.Config.IsHasDoorLimit.Equals(1))
{ {
if (store.KNDIOValue(IO_Type.Door_LimitSingle).Equals(IO_VALUE.LOW)) if (store.KNDIOValue(IO_Type.Door_LimitSingle).Equals(IO_VALUE.LOW))
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 前门未关"; lblWarnMsg.Text = lblWarnMsg.Text + " 前门未关";
...@@ -288,7 +296,7 @@ namespace OnlineStore.ACSingleStore ...@@ -288,7 +296,7 @@ namespace OnlineStore.ACSingleStore
lblThisSta.Text = "等待启动"; lblThisSta.Text = "等待启动";
lblWarnMsg.Text = ""; lblWarnMsg.Text = "";
btnStartAuTo.Text = "开始自动出入库"; btnStartAuTo.Text = "开始自动出入库";
} }
} }
private void ReadPosistion() private void ReadPosistion()
...@@ -298,7 +306,7 @@ namespace OnlineStore.ACSingleStore ...@@ -298,7 +306,7 @@ namespace OnlineStore.ACSingleStore
//判断私服是否打开、 //判断私服是否打开、
if (ACServerManager.ServerOnStatus(portName, SlvAddr)) if (ACServerManager.ServerOnStatus(portName, SlvAddr))
{ {
lblServerOn.Text = "伺服ON"; lblServerOn.Text = "伺服ON";
} }
else else
{ {
...@@ -314,7 +322,7 @@ namespace OnlineStore.ACSingleStore ...@@ -314,7 +322,7 @@ namespace OnlineStore.ACSingleStore
int lCountPulse1 = ACServerManager.GetActualtPosition(store.Config.Middle_Axis.DeviceName, store.Config.Middle_Axis.GetAxisValue()); int lCountPulse1 = ACServerManager.GetActualtPosition(store.Config.Middle_Axis.DeviceName, store.Config.Middle_Axis.GetAxisValue());
lblCountPulse1.Text = string.Format("{0:d}", lCountPulse1); lblCountPulse1.Text = string.Format("{0:d}", lCountPulse1);
txtMiddleTarget.Text = store.Config.Middle_Axis.TargetPosition.ToString(); txtMiddleTarget.Text = store.Config.Middle_Axis.TargetPosition.ToString();
if ( store.Config.Middle_Axis.IsSameAxis(portName,SlvAddr)) if (store.Config.Middle_Axis.IsSameAxis(portName, SlvAddr))
{ {
lblOutPulse.Text = lblOutPulse1.Text; lblOutPulse.Text = lblOutPulse1.Text;
lblCountPulse.Text = lblCountPulse1.Text; lblCountPulse.Text = lblCountPulse1.Text;
...@@ -329,7 +337,7 @@ namespace OnlineStore.ACSingleStore ...@@ -329,7 +337,7 @@ namespace OnlineStore.ACSingleStore
int lCountPulse2 = ACServerManager.GetActualtPosition(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue()); int lCountPulse2 = ACServerManager.GetActualtPosition(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue());
lblCountPulse2.Text = string.Format("{0:d}", lCountPulse2); lblCountPulse2.Text = string.Format("{0:d}", lCountPulse2);
txtInoutTarget.Text = store.Config.InOut_Axis.TargetPosition.ToString(); txtInoutTarget.Text = store.Config.InOut_Axis.TargetPosition.ToString();
if ( store.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr)) if (store.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{ {
lblOutPulse.Text = lblOutPulse2.Text; lblOutPulse.Text = lblOutPulse2.Text;
lblCountPulse.Text = lblCountPulse2.Text; lblCountPulse.Text = lblCountPulse2.Text;
...@@ -343,7 +351,7 @@ namespace OnlineStore.ACSingleStore ...@@ -343,7 +351,7 @@ namespace OnlineStore.ACSingleStore
int lCountPulse3 = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue()); int lCountPulse3 = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
lblCountPulse3.Text = string.Format("{0:d}", lCountPulse3); lblCountPulse3.Text = string.Format("{0:d}", lCountPulse3);
txtUpdownTarget.Text = store.Config.UpDown_Axis.TargetPosition.ToString(); txtUpdownTarget.Text = store.Config.UpDown_Axis.TargetPosition.ToString();
if ( store.Config.InOut_Axis.IsSameAxis(portName, SlvAddr)) if (store.Config.InOut_Axis.IsSameAxis(portName, SlvAddr))
{ {
lblOutPulse.Text = lblOutPulse3.Text; lblOutPulse.Text = lblOutPulse3.Text;
lblCountPulse.Text = lblCountPulse3.Text; lblCountPulse.Text = lblCountPulse3.Text;
...@@ -507,20 +515,20 @@ namespace OnlineStore.ACSingleStore ...@@ -507,20 +515,20 @@ namespace OnlineStore.ACSingleStore
// MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")"); // MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// return; // return;
//} //}
if ( store.Config.InOut_Axis.IsSameAxis(portName, SlvAddr) && (store.InOutAxisCanMove().Equals(false))) if (store.Config.InOut_Axis.IsSameAxis(portName, SlvAddr) && (store.InOutAxisCanMove().Equals(false)))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
} }
else if ( store.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || store.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr)) else if (store.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || store.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{ {
if (!InOutIsIsP1()) if (!InOutIsIsP1())
{ {
return; return;
} }
} }
LogUtil.info("点击【绝对运动】,端口号【"+ portName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】"); LogUtil.info("点击【绝对运动】,端口号【" + portName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(portName, SlvAddr, position, speed ); ACServerManager.AbsMove(portName, SlvAddr, position, speed);
} }
private void btnAxisVMove_Click(object sender, EventArgs e) private void btnAxisVMove_Click(object sender, EventArgs e)
{ {
...@@ -541,7 +549,7 @@ namespace OnlineStore.ACSingleStore ...@@ -541,7 +549,7 @@ namespace OnlineStore.ACSingleStore
} }
} }
LogUtil.info("点击【匀速运动】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】"); LogUtil.info("点击【匀速运动】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.SpeedMove(portName, SlvAddr, speed); ACServerManager.SpeedMove(portName, SlvAddr, speed);
} }
private void btnAxisRMove_Click(object sender, EventArgs e) private void btnAxisRMove_Click(object sender, EventArgs e)
...@@ -575,7 +583,7 @@ namespace OnlineStore.ACSingleStore ...@@ -575,7 +583,7 @@ namespace OnlineStore.ACSingleStore
ACServerManager.RelMove(portName, SlvAddr, position, speed); ACServerManager.RelMove(portName, SlvAddr, position, speed);
} }
private void btnAxisStop_Click(object sender, EventArgs e) private void btnAxisStop_Click(object sender, EventArgs e)
{ {
...@@ -711,13 +719,13 @@ namespace OnlineStore.ACSingleStore ...@@ -711,13 +719,13 @@ namespace OnlineStore.ACSingleStore
/// </summary> /// </summary>
private bool InOutIsIsP1() private bool InOutIsIsP1()
{ {
int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InOutDefaultPosition); int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InOutDefaultPosition);
int currValue = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue()); int currValue = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
if (currValue <= InOutDefaultPosition) if (currValue <= InOutDefaultPosition)
{ {
return true; return true;
} }
MessageBox.Show("叉子不在待机位,请先将叉子退回待机位("+InOutDefaultPosition+")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); MessageBox.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return false; return false;
} }
private void btnCloseAxis_Click(object sender, EventArgs e) private void btnCloseAxis_Click(object sender, EventArgs e)
...@@ -729,13 +737,13 @@ namespace OnlineStore.ACSingleStore ...@@ -729,13 +737,13 @@ namespace OnlineStore.ACSingleStore
} }
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed) private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{ {
moveAxis.TargetPosition = targetPosition; moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
} }
private void btnUpDownP1_Click(object sender, EventArgs e) private void btnUpDownP1_Click(object sender, EventArgs e)
{ {
if (InOutIsIsP1()) if (InOutIsIsP1())
{ {
int value = FormUtil.GetIntValue(txtUpDownP1); int value = FormUtil.GetIntValue(txtUpDownP1);
AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_P1_Speed); AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_P1_Speed);
} }
...@@ -920,7 +928,7 @@ namespace OnlineStore.ACSingleStore ...@@ -920,7 +928,7 @@ namespace OnlineStore.ACSingleStore
//{ //{
// FormManager.ShowAxisConfig(store); // FormManager.ShowAxisConfig(store);
//} //}
private void 轴卡点动ToolStripMenuItem_Click(object sender, EventArgs e) private void 轴卡点动ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
...@@ -985,21 +993,21 @@ namespace OnlineStore.ACSingleStore ...@@ -985,21 +993,21 @@ namespace OnlineStore.ACSingleStore
private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e) private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e)
{ {
this.Enabled = false; this.Enabled = false;
store.RunAxis(false ); store.RunAxis(false);
this.Enabled = true; this.Enabled = true;
LogUtil.info("料仓运转ON完成"); LogUtil.info("料仓运转ON完成");
} }
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e) private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH); store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
string message = ""; string message = "";
List<string> codeList = CodeManager.CameraScan(); List<string> codeList = CodeManager.CameraScan();
foreach (string str in codeList) foreach (string str in codeList)
{ {
message = message + str + "##"; message = message + str + "##";
} }
LogUtil.info("扫码测试收到二维码 :" + message); LogUtil.info("扫码测试收到二维码 :" + message);
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW); store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
} }
...@@ -1072,7 +1080,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1072,7 +1080,7 @@ namespace OnlineStore.ACSingleStore
} }
/// <summary> /// <summary>
/// 判断AC伺服电机轴是否运动完成 /// 判断AC伺服电机轴是否运动完成
/// </summary> /// </summary>
protected bool ACAxisMoveIsEnd(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed, out string msg) protected bool ACAxisMoveIsEnd(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed, out string msg)
...@@ -1100,9 +1108,9 @@ namespace OnlineStore.ACSingleStore ...@@ -1100,9 +1108,9 @@ namespace OnlineStore.ACSingleStore
else if (errorCount <= moveAxis.CanErrorCountMin) else if (errorCount <= moveAxis.CanErrorCountMin)
{ {
LogUtil.info(LOGGER, " DeviceName=" + deviceName + ",AxisNo=" + axisNo + ",targetPosition=" + targetPosition + ",当前outCount=" + outCount + LogUtil.info(LOGGER, " DeviceName=" + deviceName + ",AxisNo=" + axisNo + ",targetPosition=" + targetPosition + ",当前outCount=" + outCount +
",误差值小于最小误差【" + moveAxis.CanErrorCountMin + "】,默认轴已经停止运动"); ",误差值小于最小误差【" + moveAxis.CanErrorCountMin + "】,默认轴已经停止运动");
return true; return true;
} }
return false; return false;
} }
public bool IsInProcess = false; public bool IsInProcess = false;
...@@ -1120,7 +1128,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1120,7 +1128,7 @@ namespace OnlineStore.ACSingleStore
foreach (WaitResultInfo wait in list) foreach (WaitResultInfo wait in list)
{ {
if (wait.WaitType == 1) if (wait.WaitType == 1)
{ {
string msg = ""; string msg = "";
bool isEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg); bool isEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
if (!msg.Equals("")) if (!msg.Equals(""))
...@@ -1134,7 +1142,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1134,7 +1142,7 @@ namespace OnlineStore.ACSingleStore
isOk = false; isOk = false;
break; break;
} }
} }
} }
if (list.Count > 0 && isOk.Equals(true)) if (list.Count > 0 && isOk.Equals(true))
{ {
...@@ -1146,8 +1154,8 @@ namespace OnlineStore.ACSingleStore ...@@ -1146,8 +1154,8 @@ namespace OnlineStore.ACSingleStore
IsInProcess = false; IsInProcess = false;
} }
public List<WaitResultInfo> waitResultList = new List<WaitResultInfo>(); public List<WaitResultInfo> waitResultList = new List<WaitResultInfo>();
private int GetSlaveAddr() private int GetSlaveAddr()
{ {
return FormUtil.GetShortValue(txtAxisValue); return FormUtil.GetShortValue(txtAxisValue);
...@@ -1193,9 +1201,9 @@ namespace OnlineStore.ACSingleStore ...@@ -1193,9 +1201,9 @@ namespace OnlineStore.ACSingleStore
private void button1_Click_1(object sender, EventArgs e) private void button1_Click_1(object sender, EventArgs e)
{ {
int value = ACServerManager.GetBusyStatus(GetPortName(), GetSlaveAddr()); int value = ACServerManager.GetBusyStatus(GetPortName(), GetSlaveAddr());
this.txtBusyStatus.Text = value.ToString(); this.txtBusyStatus.Text = value.ToString();
} }
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
int value = ACServerManager.GetHomeEndStatus(GetPortName(), GetSlaveAddr()); int value = ACServerManager.GetHomeEndStatus(GetPortName(), GetSlaveAddr());
...@@ -1240,16 +1248,16 @@ namespace OnlineStore.ACSingleStore ...@@ -1240,16 +1248,16 @@ namespace OnlineStore.ACSingleStore
{ {
LogUtil.info("切换界面显示时,没有正确输入密码"); LogUtil.info("切换界面显示时,没有正确输入密码");
return; return;
} }
this.Visible = true; this.Visible = true;
this.WindowState = FormWindowState.Maximized; this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false; this.notifyIcon1.Visible = false;
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
DebugStatus(false); DebugStatus(false);
} }
catch(Exception ex) catch (Exception ex)
{ {
LogUtil.error("显示界面出错:"+ex.ToString()); LogUtil.error("显示界面出错:" + ex.ToString());
} }
} }
private void ExitApp() private void ExitApp()
...@@ -1280,7 +1288,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1280,7 +1288,7 @@ namespace OnlineStore.ACSingleStore
} }
private void toolStripMenuItem1_Click(object sender, EventArgs e) private void toolStripMenuItem1_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo,MessageBoxIcon.Question); DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
ExitApp(); ExitApp();
...@@ -1303,21 +1311,25 @@ namespace OnlineStore.ACSingleStore ...@@ -1303,21 +1311,25 @@ namespace OnlineStore.ACSingleStore
private void 退出ToolStripMenuItem_Click(object sender, EventArgs e) private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo,MessageBoxIcon.Question); DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
ExitApp(); ExitApp();
} }
} }
private void 学习二维码ToolStripMenuItem_Click(object sender, EventArgs e) private void 学习二维码ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH); // if (CodeManager.DeCodeType.Equals(0))
CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode(); {
frm.ShowDialog(); store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW); CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode();
frm.ShowDialog();
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
}
} }
private void btnReadHomeSingle_Click(object sender, EventArgs e) private void btnReadHomeSingle_Click(object sender, EventArgs e)
...@@ -1389,7 +1401,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1389,7 +1401,7 @@ namespace OnlineStore.ACSingleStore
btnStatusSearch.Enabled = isOpen; btnStatusSearch.Enabled = isOpen;
// Bt_ClearCounter.Enabled = isOpen; // Bt_ClearCounter.Enabled = isOpen;
} }
private void btnTempInit_Click(object sender, EventArgs e) private void btnTempInit_Click(object sender, EventArgs e)
{ {
...@@ -1488,5 +1500,40 @@ namespace OnlineStore.ACSingleStore ...@@ -1488,5 +1500,40 @@ namespace OnlineStore.ACSingleStore
store.KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW); store.KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW);
store.KNDIOMove(IO_Type.Door_Down, IO_VALUE.HIGH); store.KNDIOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
} }
private void btnOpenFile_Click(object sender, EventArgs e)
{
System.Windows.Forms.OpenFileDialog openDialog = new System.Windows.Forms.OpenFileDialog();
openDialog.Title = "打开本地图片";
openDialog.Filter = "All Supported Images (*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png)|*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png|Bitmaps (*.bmp;*.dib;*.rle)|*.bmp;*.dib;*.rle|Graphics Interchange Format (*.gif)|*.gif|Joint Photographic Experts (*.jpg)|*.jpg|Portable Network Graphics (*.png)|*.png|All Files (*.*)|*.*";
openDialog.DefaultExt = "png";
//openDialog.DefaultExt = "png";
System.Windows.Forms.DialogResult result = openDialog.ShowDialog();
if (result == System.Windows.Forms.DialogResult.Cancel)
{
return;
}
string fileName = openDialog.FileName;
txtImage.Text = fileName;
}
private void btnCodeTest_Click(object sender, EventArgs e)
{
txtCode.Text = "";
string fileName = txtImage.Text.ToString();
if (File.Exists(fileName))
{
//读取图片内容
Bitmap checkImg = (Bitmap)Image.FromFile(fileName).Clone();
string result = ZXingCodeHelper.DecodeQRCode(checkImg);
txtCode.Text = result;
}
else
{
MessageBox.Show("请先打开正确的图片!");
}
}
} }
} }
...@@ -47,7 +47,7 @@ namespace OnlineStore.ACSingleStore.Properties { ...@@ -47,7 +47,7 @@ namespace OnlineStore.ACSingleStore.Properties {
} }
/// <summary> /// <summary>
/// 使用此强类型资源类,为所有资源查找 /// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。 /// 重写当前线程的 CurrentUICulture 属性。
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
......
...@@ -12,7 +12,7 @@ namespace OnlineStore.ACSingleStore.Properties { ...@@ -12,7 +12,7 @@ namespace OnlineStore.ACSingleStore.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
...@@ -76,11 +76,13 @@ ...@@ -76,11 +76,13 @@
FA开头的二维码,默认为7*32 FA开头的二维码,默认为7*32
20190606 20190606
进入IO界面需要一直读取测高值。 进入IO界面需要一直读取测高值。
压紧轴回原点增加自动重复运动功能。 压紧轴回原点增加自动重复运动功能。
20190730
RC29项目西安料仓扫码需要用zxing才能识别,增加配置
<!--解码方式,0=halcon 解码,1=使用zxing解码-->
<add key="DeCodeType" value="1"/>
......
...@@ -84,5 +84,10 @@ namespace OnlineStore.Common ...@@ -84,5 +84,10 @@ namespace OnlineStore.Common
/// 温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪 /// 温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪
/// </summary> /// </summary>
public static string HumitureControllerType = "HumitureControllerType"; public static string HumitureControllerType = "HumitureControllerType";
/// <summary>
/// 解码类型,0=halcon,1=zxing解码
/// </summary>
public static string DeCodeType = "DeCodeType";
} }
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.DeviceLibrary</RootNamespace> <RootNamespace>OnlineStore.DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName> <AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="CodeLibrary"> <Reference Include="CodeLibrary">
<HintPath>..\..\..\RC32-SZBOSCH-ACSingleStore\dll\CodeLibrary.dll</HintPath> <HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="halcondotnet"> <Reference Include="halcondotnet">
<HintPath>..\..\..\RC32-SZBOSCH-ACSingleStore\dll\halcondotnet.dll</HintPath> <HintPath>..\..\..\RC32-SZBOSCH-ACSingleStore\dll\halcondotnet.dll</HintPath>
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="zxing">
<HintPath>..\..\dll\zxing.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="acSingleStore\AC_SA_BoxBean.cs" /> <Compile Include="acSingleStore\AC_SA_BoxBean.cs" />
......
...@@ -1372,7 +1372,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1372,7 +1372,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "没有收到二维码信息,请重新放入料盘"); LogUtil.info(LOGGER, StoreName + "没有收到二维码信息,请重新放入料盘");
return; return;
} }
IsNotScanCode = false; IsNotScanCode = false;
if (storeRunStatus.Equals(StoreRunStatus.Wait)) if (storeRunStatus.Equals(StoreRunStatus.Wait))
{ {
...@@ -1528,6 +1528,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1528,6 +1528,10 @@ namespace OnlineStore.DeviceLibrary
message = ""; message = "";
} }
KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW); KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
if (CodeManager.DeCodeType.Equals(1))
{
message = "=1+0x0-" + GetSize() + "x" + height + "=" + CodeManager.GetBarcode(message);
}
onCodeReceived(message); onCodeReceived(message);
} }
......
...@@ -19,7 +19,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -19,7 +19,7 @@ namespace OnlineStore.DeviceLibrary
public static int CurrInOutType = 0; public static int CurrInOutType = 0;
public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static AC_SA_BoxBean Store = null; public static AC_SA_BoxBean Store = null;
public static AC_SA_Config Config = null; public static AC_SA_Config Config = null;
......
using CodeLibrary; 
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -8,11 +8,12 @@ using System.Linq; ...@@ -8,11 +8,12 @@ using System.Linq;
using System.Runtime.ExceptionServices; using System.Runtime.ExceptionServices;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using CodeLibrary;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class CodeManager public class CodeManager
{ {
public static int DeCodeType = ConfigAppSettings.GetIntValue(Setting_Init.DeCodeType);
public static List<string> cameraNameList = new List<string>(); public static List<string> cameraNameList = new List<string>();
public static List<string> codeTypeList = new List<string>(); public static List<string> codeTypeList = new List<string>();
...@@ -163,31 +164,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -163,31 +164,43 @@ namespace OnlineStore.DeviceLibrary
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成"); LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1); System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap); if (DeCodeType.Equals(0))
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
{ {
//判断是否是一维码 HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
if (codeType.ToLower().Equals("barcode")) LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
{ List<CodeInfo> cc = new List<CodeInfo>();
cc = HDCodeHelper.DecodeBarCode(ho_Image); foreach (string codeType in codeTypeList)
}
else
{ {
cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType); //判断是否是一维码
} if (codeType.ToLower().Equals("barcode"))
if (cc.Count > 0) {
{ cc = HDCodeHelper.DecodeBarCode(ho_Image);
string r = ""; }
foreach (CodeInfo c in cc) else
{ {
codeList.Add(c.CodeStr); cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType);
r = r + "##" + c.CodeStr; }
if (cc.Count > 0)
{
string r = "";
foreach (CodeInfo c in cc)
{
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
}
LogUtil.info(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
} }
LogUtil.info(" 【" + cameraName + "】【" + codeType + "】扫码完成:"+r);
} }
} }
else
{
string result = CodeLibrary.ZXingCodeHelper.DecodeQRCode(bitmap);
if (!String.IsNullOrEmpty(result))
{
return new List<string>() { result };
}
}
} }
} }
} }
...@@ -218,6 +231,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -218,6 +231,37 @@ namespace OnlineStore.DeviceLibrary
return ""; return "";
} }
} }
public static string GetBarcode(string codeStr)
{
if (!string.IsNullOrEmpty(codeStr))
{
string[] codeInfos = codeStr.Replace("\r", "").Split('\n');
string ri = "";
string qty = "";
string youxiao = "";
foreach (string codeInfo in codeInfos)
{
if (codeInfo.StartsWith("物料编码:"))
{
ri = codeInfo.Substring(5);
}
else if (codeInfo.StartsWith("入库数量:"))
{
qty = codeInfo.Substring(5);
}
else if (codeInfo.StartsWith("有效期限:"))
{
youxiao = codeInfo.Substring(5);
}
}
if (!string.IsNullOrEmpty(ri))
{
string pn = ri.Split(' ')[0];
return pn + ";" + qty + ";" + ri + ";" + youxiao;
}
}
return "";
}
} }
} }
...@@ -230,28 +230,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -230,28 +230,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
return newStr; return newStr;
} }
//private void ReadTest( )
//{
// Dictionary<string, string> dic = new Dictionary<string, string>();
// string path = Application.StartupPath + @"\Test.csv";
// dic.Add("AxisPosition", "中轴位置");
// dic.Add("ModbusHighPosition", "电钢高位");
// dic.Add("ModbusLowPosition", "电钢低位");
// Dictionary<string, KTKStorePostion> ddd = LoadCVSLibrary.CSVReaderHelper<KTKStorePostion>.ReadCVS(path, dic, typeof(KTKStorePostion));
// if (ddd != null)
// {
// MessageBox.Show("读取成功!");
// }
// else
// {
// MessageBox.Show("读取失败,请检查数据格式!");
// }
//}
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!