Commit ec29faf8 authored by 周磊's avatar 周磊

1.版本变更为1.8.3

2.辅助工具增加温度趋势功能
3.部分涉及ini读取写入,统一到sys_ini类处理(外部校准,免密登录等)
4.log增加debug,温控debug,反控三类
5.增加反控功能(反控触发,日志记录,弹窗提示等)
6.合并三个检测的绘图类ckvocupdata
7.优化联机以前是限定时长分配每个IP,搜索固定时长,各搜索一次,现在是限定时间内2S扫描一个IP,可重复扫描
parent cc9d2033
...@@ -269,3 +269,4 @@ VocsMonitor/ ...@@ -269,3 +269,4 @@ VocsMonitor/
/VocsSetup/临时测试文件/SysConfigSecondary.en.resx /VocsSetup/临时测试文件/SysConfigSecondary.en.resx
/VocsSetup/临时测试文件/SysConfigSecondary.resx /VocsSetup/临时测试文件/SysConfigSecondary.resx
/VocsSetup/临时测试文件/SysConfigsecondary.Designer.cs /VocsSetup/临时测试文件/SysConfigsecondary.Designer.cs
/VocsSetup/GC_Control/zs.rtf
...@@ -11,6 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VocsMonitor", "VocsMonitor\ ...@@ -11,6 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VocsMonitor", "VocsMonitor\
EndProject EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "VocAnalyzer", "VocAnalyzer\VocAnalyzer.vdproj", "{9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}" Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "VocAnalyzer", "VocAnalyzer\VocAnalyzer.vdproj", "{9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplerCounterControl", "SamplerCounterControl\SamplerCounterControl.csproj", "{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsControlLibrary_PopUp", "..\WindowsFormsControlLibrary_PopUp\WindowsFormsControlLibrary_PopUp.csproj", "{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -66,6 +70,30 @@ Global ...@@ -66,6 +70,30 @@ Global
{9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}.Release|Mixed Platforms.Build.0 = Release {9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}.Release|Mixed Platforms.Build.0 = Release
{9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}.Release|x86.ActiveCfg = Release {9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}.Release|x86.ActiveCfg = Release
{9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}.Release|x86.Build.0 = Release {9A8B92E2-7CFA-43AE-8EC6-561827F41EF4}.Release|x86.Build.0 = Release
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Debug|x86.ActiveCfg = Debug|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Debug|x86.Build.0 = Debug|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Release|Any CPU.Build.0 = Release|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Release|x86.ActiveCfg = Release|Any CPU
{AD1C51CD-86B5-416B-9708-0EA7C2414EDC}.Release|x86.Build.0 = Release|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Debug|x86.ActiveCfg = Debug|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Debug|x86.Build.0 = Debug|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Release|Any CPU.Build.0 = Release|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Release|x86.ActiveCfg = Release|Any CPU
{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -42,7 +42,7 @@ namespace GcDevicePc ...@@ -42,7 +42,7 @@ namespace GcDevicePc
this.fid1ver.Text = this.FID1version; this.fid1ver.Text = this.FID1version;
this.fid2ver.Text = this.FID2version; this.fid2ver.Text = this.FID2version;
this.tcdver.Text = this.TCD1version; this.tcdver.Text = this.TCD1version;
this.PCver.Text = this.Hmiversion + "/1.8.2"; this.PCver.Text = this.Hmiversion + "/1.8.3";
} }
} }
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections> </configSections>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup> </startup>
<runtime> <runtime>
<legacyUnhandledExceptionPolicy enabled="true" /> <legacyUnhandledExceptionPolicy enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" /> <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.104.0" newVersion="1.0.104.0" /> <bindingRedirect oldVersion="0.0.0.0-1.0.104.0" newVersion="1.0.104.0"/>
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<log4net> <log4net>
<logger name="Log"> <logger name="Log">
<level value="INFO" /> <level value="INFO"/>
<appender-ref ref="RollingLog" /> <appender-ref ref="RollingLog"/>
</logger> </logger>
<logger name="Err"> <logger name="Err">
<level value="ERROR" /> <level value="ERROR"/>
<appender-ref ref="RollingErr" /> <appender-ref ref="RollingErr"/>
</logger> </logger>
<logger name="HmiInfo"> <logger name="HmiInfo">
<level value="INFO" /> <level value="INFO"/>
<appender-ref ref="HmiRollingLog" /> <appender-ref ref="HmiRollingLog"/>
</logger>
<logger name="DebugInfo">
<level value="INFO"/>
<appender-ref ref="DebugRollingLog"/>
</logger>
<logger name="TempDebugInfo">
<level value="INFO"/>
<appender-ref ref="TempDebugRollingLog"/>
</logger>
<logger name="AntiControlLog">
<level value="INFO"/>
<appender-ref ref="AntiControlRollingLog"/>
</logger> </logger>
<appender name="RollingLog" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\InfoLog_" /> <file value="..\GC_User\Logs\InfoLog_"/>
<appendToFile value="true" /> <appendToFile value="true"/>
<rollingStyle value="Date" /> <rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'" /> <datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false" /> <staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Record Time:%d Thread ID:[%thread]- Info:%m%n" /> <conversionPattern value="Record Time:%d Thread ID:[%thread]- Info:%m%n"/>
</layout> </layout>
<filter type="log4net.Filter.LevelRangeFilter"> <filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" /> <param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO" /> <param name="LevelMax" value="INFO"/>
</filter> </filter>
</appender> </appender>
<appender name="HmiRollingLog" type="log4net.Appender.RollingFileAppender"> <appender name="HmiRollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\HmiLog_" /> <file value="..\GC_User\Logs\HmiLog_"/>
<appendToFile value="true" /> <appendToFile value="true"/>
<rollingStyle value="Date" /> <rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'" /> <datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false" /> <staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Record Time:%d Info:%m%n" /> <conversionPattern value="Record Time:%d Info:%m%n"/>
</layout> </layout>
<filter type="log4net.Filter.LevelRangeFilter"> <filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" /> <param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO" /> <param name="LevelMax" value="INFO"/>
</filter> </filter>
</appender> </appender>
<appender name="RollingErr" type="log4net.Appender.RollingFileAppender"> <appender name="RollingErr" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\ErrLog_" /> <file value="..\GC_User\Logs\ErrLog_"/>
<appendToFile value="true" /> <appendToFile value="true"/>
<rollingStyle value="Date" /> <rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'" /> <datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false" /> <staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Record Time:%d Thread ID:[%thread]- Error:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR"/>
<param name="LevelMax" value="ERROR"/>
</filter>
</appender>
<appender name="DebugRollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\Debug_"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Record Time:%d Thread ID:[%thread]- Error:%m%n" /> <conversionPattern value="Record Time:%d Thread ID:[%thread]- Info:%m%n"/>
</layout> </layout>
<filter type="log4net.Filter.LevelRangeFilter"> <filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" /> <param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="ERROR" /> <param name="LevelMax" value="INFO"/>
</filter> </filter>
</appender> </appender>
<appender name="TempDebugRollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\TempDebug_"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Record Time:%d Thread ID:[%thread]- Info:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO"/>
</filter>
</appender>
<appender name="AntiControlRollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_User\Logs\AntiControl_"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Record Time:%d Thread ID:[%thread]- Info:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO"/>
</filter>
</appender>
</log4net> </log4net>
</configuration> </configuration>
using Ini.Net; using GcDevicePc.Common;
using Ini.Net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -20,29 +21,18 @@ namespace GcDevicePc.CK_UI ...@@ -20,29 +21,18 @@ namespace GcDevicePc.CK_UI
public static bool IsPasswordFree;//勾选"当天启用免密码登录"是否有效 public static bool IsPasswordFree;//勾选"当天启用免密码登录"是否有效
public static bool IsUpdataPass = false;//是否更新密码时效 public static bool IsUpdataPass = false;//是否更新密码时效
private string dt;//密码 private string dt;//密码
private string file;//路径
private IniFile infile;//IniFile
private string strTemp = "0";//ini中勾选类型 private string strTemp = "0";//ini中勾选类型
private string strCurData;//当前日期 private string strCurData;//当前日期
private string strIniData;//ini中锚定日期 private string strIniData;//ini中锚定日期
CKVocAnalyzer.NumForm form; CKVocAnalyzer.NumForm form;//小键盘
public LandIn(string userstr, string pwd) public LandIn(string userstr, string pwd)
{ {
InitializeComponent(); InitializeComponent();
#if Use_English_Folder
this.file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\Startup\\sys.ini");
#else
file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\启动参数\\sys.ini");
#endif
this.infile = new IniFile(file);
strCurData = DateTime.Now.ToShortDateString().ToString(); strCurData = DateTime.Now.ToShortDateString().ToString();
strIniData = infile.ReadString("免登录", "锚点日期"); strIniData = Sys_ini.Get_Sys_NoLogin_AnchorDate();
strTemp = this.infile.ReadString("免登录", "勾选类型"); strTemp =Sys_ini.Get_Sys_NoLogin_CheckType();
if (strTemp == "") if (strTemp == "0")
{ {
//应对旧版本没有这些参数
this.infile.WriteString("免登录", "勾选类型", "0");
this.infile.WriteString("免登录", "锚定日期", "n/a");
this.PasswordFree.Checked = false; this.PasswordFree.Checked = false;
} }
else if (strTemp == "1" || strTemp == "2") else if (strTemp == "1" || strTemp == "2")
...@@ -54,11 +44,10 @@ namespace GcDevicePc.CK_UI ...@@ -54,11 +44,10 @@ namespace GcDevicePc.CK_UI
} }
else else
{ {
this.infile.WriteString("免登录", "勾选类型", "0"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_CheckType( "0");
this.PasswordFree.Checked = false; this.PasswordFree.Checked = false;
} }
} }
else else
{ {
...@@ -81,7 +70,7 @@ namespace GcDevicePc.CK_UI ...@@ -81,7 +70,7 @@ namespace GcDevicePc.CK_UI
} }
else else
{ {
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
} }
} }
...@@ -107,8 +96,8 @@ namespace GcDevicePc.CK_UI ...@@ -107,8 +96,8 @@ namespace GcDevicePc.CK_UI
} }
else else
{ {
infile.WriteString("免登录", "勾选类型", "0"); Sys_ini.Set_Sys_NoLogin_CheckType( "0");
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
MessageBox.Show("密码已失效"); MessageBox.Show("密码已失效");
} }
...@@ -138,8 +127,8 @@ namespace GcDevicePc.CK_UI ...@@ -138,8 +127,8 @@ namespace GcDevicePc.CK_UI
} }
else else
{ {
infile.WriteString("免登录", "勾选类型", "0"); Sys_ini.Set_Sys_NoLogin_CheckType( "0");
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
MessageBox.Show("密码已失效"); MessageBox.Show("密码已失效");
} }
} }
...@@ -150,11 +139,6 @@ namespace GcDevicePc.CK_UI ...@@ -150,11 +139,6 @@ namespace GcDevicePc.CK_UI
{ {
LoginDecision(); LoginDecision();
} }
if (form != null) if (form != null)
{ {
form.Close(); form.Close();
...@@ -174,20 +158,20 @@ namespace GcDevicePc.CK_UI ...@@ -174,20 +158,20 @@ namespace GcDevicePc.CK_UI
Island = true;//显示菜单其他选项 Island = true;//显示菜单其他选项
if (IsPasswordFree) if (IsPasswordFree)
{ {
infile.WriteString("免登录", "勾选类型", "1"); Sys_ini.Set_Sys_NoLogin_CheckType( "1");
infile.WriteString("免登录", "锚点日期", DateTime.Now.ToShortDateString().ToString()); Sys_ini.Set_Sys_NoLogin_AnchorDate(DateTime.Now.ToShortDateString().ToString());
}//更新免登录信息 }//更新免登录信息
else else
{ {
infile.WriteString("免登录", "勾选类型", "0"); Sys_ini.Set_Sys_NoLogin_CheckType( "0");
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
} }
} }
else else
{ {
infile.WriteString("免登录", "勾选类型", "0"); Sys_ini.Set_Sys_NoLogin_CheckType( "0");
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
Island = false; Island = false;
} }
} }
...@@ -200,19 +184,19 @@ namespace GcDevicePc.CK_UI ...@@ -200,19 +184,19 @@ namespace GcDevicePc.CK_UI
Issa = true;//显示超级选项 Issa = true;//显示超级选项
if (IsPasswordFree) if (IsPasswordFree)
{ {
infile.WriteString("免登录", "勾选类型", "2"); Sys_ini.Set_Sys_NoLogin_CheckType( "2");
infile.WriteString("免登录", "锚点日期", DateTime.Now.ToShortDateString().ToString()); Sys_ini.Set_Sys_NoLogin_AnchorDate( DateTime.Now.ToShortDateString().ToString());
}//写入免登录信息 }//写入免登录信息
else else
{ {
infile.WriteString("免登录", "勾选类型", "0"); Sys_ini.Set_Sys_NoLogin_CheckType( "0");
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
} }
} }
else else
{ {
infile.WriteString("免登录", "勾选类型", "0"); Sys_ini.Set_Sys_NoLogin_CheckType( "0");
this.infile.WriteString("免登录", "锚定日期", "n/a"); Sys_ini.Set_Sys_NoLogin_AnchorDate("n/a");
Issa = false; Issa = false;
} }
} }
......
This diff is collapsed.
...@@ -9,6 +9,9 @@ namespace GcDevicePc.Common ...@@ -9,6 +9,9 @@ namespace GcDevicePc.Common
private static readonly ILog logInfo = LogManager.GetLogger("Log"); private static readonly ILog logInfo = LogManager.GetLogger("Log");
private static readonly ILog hmiInfo = LogManager.GetLogger("HmiInfo"); private static readonly ILog hmiInfo = LogManager.GetLogger("HmiInfo");
private static readonly ILog logErr = LogManager.GetLogger("Err"); private static readonly ILog logErr = LogManager.GetLogger("Err");
private static readonly ILog debugInfo = LogManager.GetLogger("DebugInfo");
private static readonly ILog tempdebugInfo = LogManager.GetLogger("TempDebugInfo");
private static readonly ILog antiControlLog = LogManager.GetLogger("AntiControlLog");
/// <summary> /// <summary>
/// 记录正常的消息 /// 记录正常的消息
...@@ -20,6 +23,28 @@ namespace GcDevicePc.Common ...@@ -20,6 +23,28 @@ namespace GcDevicePc.Common
logInfo.Info(msg); logInfo.Info(msg);
} }
/// <summary>
/// 记录debug信息(也是依据是否勾选min记录)
/// </summary>
public static void DebugInfo(string msg)
{
if(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.info_log)
debugInfo.Info(msg);
}
/// <summary>
/// 记录温控debug信息(全局记录)
/// </summary>
public static void TempDebugInfo(string msg)
{
tempdebugInfo.Info(msg);
}
/// <summary>
/// 记录反控信息(全局记录)
/// </summary>
public static void AntiControlLog(string msg)
{
antiControlLog.Info(msg);
}
/// <summary> /// <summary>
/// 记录HMI的消息 /// 记录HMI的消息
/// </summary> /// </summary>
......
...@@ -182,11 +182,11 @@ namespace GcDevicePc.Common ...@@ -182,11 +182,11 @@ namespace GcDevicePc.Common
if (readnum <= listnum - 1) if (readnum <= listnum - 1)
{ {
f[0] = float.Parse(SharedSpace.Data.listValue[readnum].vale.ToString()); f[0] = float.Parse(SharedSpace.Data.listValue[readnum].vale.ToString());
if(readnum == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "THC")) if (readnum == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "THC"))
{ {
f[0] = vRead_AutoDisO2Input_Reault(f[0]); f[0] = vRead_AutoDisO2Input_Reault(f[0]);
} }
else if(readnum == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "NMHC")) else if (readnum == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "NMHC"))
{ {
float fTHCValue, fNMHCValue, fCH4Value; float fTHCValue, fNMHCValue, fCH4Value;
int sTHCIndex, sNMHCIndex, sCH4Index; int sTHCIndex, sNMHCIndex, sCH4Index;
...@@ -750,9 +750,9 @@ namespace GcDevicePc.Common ...@@ -750,9 +750,9 @@ namespace GcDevicePc.Common
float[] f = new float[2]; float[] f = new float[2];
long[] l = new long[1]; long[] l = new long[1];
if (address<40) if (address < 40)
{ {
if (address < 6 && listnum>0) if (address < 6 && listnum > 0)
{ {
int index = -1; int index = -1;
if (address == 0 || address == 1) if (address == 0 || address == 1)
...@@ -775,14 +775,14 @@ namespace GcDevicePc.Common ...@@ -775,14 +775,14 @@ namespace GcDevicePc.Common
int readnum = (address - baseaddress) / 2; int readnum = (address - baseaddress) / 2;
if (readnum <= listnum - 1) if (readnum <= listnum - 1)
{ {
if (index >-1) if (index > -1)
{ {
f[0] = float.Parse(SharedSpace.Data.listValue[index].vale.ToString()); f[0] = float.Parse(SharedSpace.Data.listValue[index].vale.ToString());
if(index == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "THC")) if (index == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "THC"))
{ {
f[0] = vRead_AutoDisO2Input_Reault(f[0]); f[0] = vRead_AutoDisO2Input_Reault(f[0]);
} }
else if(index == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "NMHC")) else if (index == SharedSpace.Data.listValue.FindIndex(lv => lv.name == "NMHC"))
{ {
float fTHCValue, fNMHCValue, fCH4Value; float fTHCValue, fNMHCValue, fCH4Value;
int sTHCIndex, sNMHCIndex, sCH4Index; int sTHCIndex, sNMHCIndex, sCH4Index;
...@@ -1380,59 +1380,23 @@ namespace GcDevicePc.Common ...@@ -1380,59 +1380,23 @@ namespace GcDevicePc.Common
double fAutoDisO2Intercept; double fAutoDisO2Intercept;
double fAutoDisO2Input; double fAutoDisO2Input;
double fAutoDisO2Product; double fAutoDisO2Product;
#if Use_English_Folder fAutoDisO2Slope = Convert.ToDouble(Sys_ini.Get_Sys_CpdCount_OxygenSlope());
string file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\Startup\\sys.ini"); fAutoDisO2Intercept =Convert.ToDouble( Sys_ini.Get_Sys_CpdCount_OxygenIntercept());
#else fAutoDisO2Input =Convert.ToDouble( Sys_ini.Get_Sys_OxyCpdCount_OxyValue());
string file = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.StartupPath), "GC_Config\\GC_Set\\启动参数\\sys.ini"); if (fAutoDisO2Input == 21)
#endif
if (File.Exists(file))
{ {
IniFile iniFile = new IniFile(file); fAutoDisO2Product = 1;
if(iniFile.KeyExists("CpdCount", "AutoEliminationOxygenSlope") == true)
{
fAutoDisO2Slope = iniFile.ReadDouble("CpdCount", "AutoEliminationOxygenSlope");
}
else
{
fAutoDisO2Slope = 0;
}
if (iniFile.KeyExists("CpdCount", "AutoEliminationOxygenIntercept"))
{
fAutoDisO2Intercept = iniFile.ReadDouble("CpdCount", "AutoEliminationOxygenIntercept");
}
else
{
fAutoDisO2Intercept = 1;
}
if(iniFile.KeyExists("O2CpdCount", "O2value") == true)
{
fAutoDisO2Input = iniFile.ReadDouble("O2CpdCount", "O2value");
} }
else else
{ {
fAutoDisO2Input = 0;
}
if(fAutoDisO2Input == 21)
{
return fTHCvalue;
}
if(iniFile.KeyExists("CpdCount", "Count3") == true)
{
if(iniFile.ReadBoolean("CpdCount", "Count3") == false)
{
return fTHCvalue;
}
}
fAutoDisO2Product = fAutoDisO2Input * fAutoDisO2Slope + fAutoDisO2Intercept; fAutoDisO2Product = fAutoDisO2Input * fAutoDisO2Slope + fAutoDisO2Intercept;
return (float)(fTHCvalue * fAutoDisO2Product);
} }
else if (!Sys_ini.Get_Sys_OxyCpdCount_Enable())
{ {
return fTHCvalue; //若未启用氧校准则为false,系数=1
fAutoDisO2Product = 1;
} }
return (float)(fTHCvalue * fAutoDisO2Product);
} }
} }
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ using GcDevicePc.ProThread; ...@@ -16,7 +16,7 @@ using GcDevicePc.ProThread;
namespace GcDevicePc.ConfigMethod namespace GcDevicePc.ConfigMethod
{ {
public partial class MethodMain : Form public partial class MethodMain : Form
{ {//打开方法
public delegate void SendUpdateCMD(bool flag); public delegate void SendUpdateCMD(bool flag);
public delegate void Up_MethodMain(); public delegate void Up_MethodMain();
......
...@@ -343,6 +343,7 @@ namespace GcDevicePc.Controls ...@@ -343,6 +343,7 @@ namespace GcDevicePc.Controls
private void btn_MouseLeave(object sender, EventArgs e) private void btn_MouseLeave(object sender, EventArgs e)
{ {
PictureBox ordbtn = sender as PictureBox; PictureBox ordbtn = sender as PictureBox;
//输出字符串格式不正确57:62:507:3:9
int tagnum = Convert.ToInt32(ordbtn.Tag); int tagnum = Convert.ToInt32(ordbtn.Tag);
ordbtn.Image = pmordimage.Images[tagnum]; ordbtn.Image = pmordimage.Images[tagnum];
} }
......
...@@ -59,6 +59,5 @@ ...@@ -59,6 +59,5 @@
#endregion #endregion
private ListViewNF datalist; private ListViewNF datalist;
} }
} }
\ No newline at end of file
...@@ -945,6 +945,8 @@ using GcDevicePc.ProThread; ...@@ -945,6 +945,8 @@ using GcDevicePc.ProThread;
using System.Globalization; using System.Globalization;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using GcDevicePc.Common;
using GcDevicePc.CK_UI;
namespace GcDevicePc namespace GcDevicePc
{ {
...@@ -967,8 +969,8 @@ namespace GcDevicePc ...@@ -967,8 +969,8 @@ namespace GcDevicePc
hmiopt = new HMIControl(globaldata.connection_ip, globaldata.datamodbusport); hmiopt = new HMIControl(globaldata.connection_ip, globaldata.datamodbusport);
datalist.Scroll += new EventHandler(datalist_Scroll); datalist.Scroll += new EventHandler(datalist_Scroll);
}
}
private void datalist_Scroll(object sender, EventArgs e) private void datalist_Scroll(object sender, EventArgs e)
{ {
lvindex = datalist.TopItem.Index; lvindex = datalist.TopItem.Index;
...@@ -1101,12 +1103,15 @@ namespace GcDevicePc ...@@ -1101,12 +1103,15 @@ namespace GcDevicePc
else else
{ {
tempshow.SubItems.Add("0.00 /" + (globaldata.m_dpbuffer.ShowList.showtime.alltime / 60.0f).ToString("0.0")); tempshow.SubItems.Add("0.00 /" + (globaldata.m_dpbuffer.ShowList.showtime.alltime / 60.0f).ToString("0.0"));
//修改为提交方法的总时间(原先是读取HMI总时间
//参考柱箱温度
// CProfileDevice.m_DevParam.col.fColTempSet.ToString("0"));;
} }
this.datalist.Items.Add(tempshow); this.datalist.Items.Add(tempshow);
//功率测试 //功率测试
DateTime dt = DateTime.Now; DateTime dt = DateTime.Now;
/*
string err11 = "前进样口:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bSPower); string err11 = "前进样口:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bSPower);
string err21 = "后进样口:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.fSPower); string err21 = "后进样口:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.fSPower);
string err31 = "柱箱:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.CbPower); string err31 = "柱箱:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.CbPower);
...@@ -1114,6 +1119,7 @@ namespace GcDevicePc ...@@ -1114,6 +1119,7 @@ namespace GcDevicePc
string err51 = "中检测:"+ Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.iDPower); string err51 = "中检测:"+ Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.iDPower);
string err61 = "后检测:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bDPower); string err61 = "后检测:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bDPower);
File.AppendAllText(@"./功率.txt", dt.ToLocalTime().ToString()+ err11 + err21 + err31 + err41 + err51 + err61 + " \r\n"); File.AppendAllText(@"./功率.txt", dt.ToLocalTime().ToString()+ err11 + err21 + err31 + err41 + err51 + err61 + " \r\n");
*/
//功率测试 //功率测试
#region #region
...@@ -1174,7 +1180,7 @@ namespace GcDevicePc ...@@ -1174,7 +1180,7 @@ namespace GcDevicePc
#endregion #endregion
//errinfo = null; //errinfo = null;
//ABCD异常
if (globaldata.m_hmibuffer.gcinfo.HmiAbnormal[0] != 0 || globaldata.m_hmibuffer.gcinfo.HmiAbnormal[1] != 0 || globaldata.m_hmibuffer.gcinfo.HmiAbnormal[2] != 0 || globaldata.m_hmibuffer.gcinfo.HmiAbnormal[3] != 0) if (globaldata.m_hmibuffer.gcinfo.HmiAbnormal[0] != 0 || globaldata.m_hmibuffer.gcinfo.HmiAbnormal[1] != 0 || globaldata.m_hmibuffer.gcinfo.HmiAbnormal[2] != 0 || globaldata.m_hmibuffer.gcinfo.HmiAbnormal[3] != 0)
{ {
tempshow = new ListViewItem(); tempshow = new ListViewItem();
...@@ -1269,14 +1275,16 @@ namespace GcDevicePc ...@@ -1269,14 +1275,16 @@ namespace GcDevicePc
} }
if (tempcs) if (tempcs)
{ {
string err ="第"+globaldata.m_hmibuffer.gcinfo.HmiAbnormal[cw]+ "路"+"\t"+"错误类型"+(cw+1);
string err = "第" + globaldata.m_hmibuffer.gcinfo.HmiAbnormal[cw] + "路" + "\t" + "错误类型" + (cw + 1);
string err1 = "前进样口:" + globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bSPower); string err1 = "前进样口:" + globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bSPower);
string err2 = "后进样口:" + globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.BPSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.fSPower); string err2 = "后进样口:" + globaldata.m_dpbuffer.ShowList.showtemp.BPActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.BPSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.fSPower);
string err3 = "柱箱:" + globaldata.m_dpbuffer.ShowList.showtemp.ColActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.ColSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.CbPower); string err3 = "柱箱:" + globaldata.m_dpbuffer.ShowList.showtemp.ColActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.ColSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.CbPower);
string err4 = "前检测:" + globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.fDetSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.fDPower); string err4 = "前检测:" + globaldata.m_dpbuffer.ShowList.showtemp.fDetActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.fDetSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.fDPower);
string err5 = "中检测:" + globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.iDetSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.iDPower); string err5 = "中检测:" + globaldata.m_dpbuffer.ShowList.showtemp.iDetActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.iDetSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.iDPower);
string err6 = "后检测:" + globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.bDetSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bDPower); string err6 = "后检测:" + globaldata.m_dpbuffer.ShowList.showtemp.bDetActualTemp.ToString("#0.00") + " / " + globaldata.m_dpbuffer.ShowList.showtemp.bDetSetTemp.ToString("0") + "功率:" + Getpower(globaldata.m_dpbuffer.ShowList.pwmInfo.bDPower);
File.AppendAllText(@"./温控报错.txt", dt.ToLocalTime().ToString()+ err + "\t" + err1 + err2 + err3 + err4 + err5 + err6 + " \r\n"); Log.TempDebugInfo(dt.ToLocalTime().ToString() + err + "\t" + err1 + err2 + err3 + err4 + err5 + err6 + " \r\n");
// File.AppendAllText(@"./温控报错.txt", dt.ToLocalTime().ToString()+ err + "\t" + err1 + err2 + err3 + err4 + err5 + err6 + " \r\n");
tempcs = false; tempcs = false;
}//每次出现报错时,打印当前六路温度和功率 }//每次出现报错时,打印当前六路温度和功率
...@@ -1310,8 +1318,8 @@ namespace GcDevicePc ...@@ -1310,8 +1318,8 @@ namespace GcDevicePc
{ {
tempshow = new ListViewItem(); tempshow = new ListViewItem();
tempshow.Text = bEnglishLanguage == false ? "前进样口" : "Front INJ"; tempshow.Text = bEnglishLanguage == false ? "前进样口" : "Front INJ";
tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp.ToString("0")); // tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + globaldata.m_dpbuffer.ShowList.showtemp.FPSetTemp.ToString("0"));
//tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + CProfileDevice.m_DevParam.port[0].fHeaterSetTemp.ToString("0")); tempshow.SubItems.Add(IsException(globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp) + " / " + CProfileDevice.m_DevParam.port[0].fHeaterSetTemp.ToString("0"));
if (globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp < globaldata.m_hwconfig.hwconfiginfo.u16InjPortFPTemp + 1) if (globaldata.m_dpbuffer.ShowList.showtemp.FPActualTemp < globaldata.m_hwconfig.hwconfiginfo.u16InjPortFPTemp + 1)
{ {
...@@ -2521,6 +2529,5 @@ namespace GcDevicePc ...@@ -2521,6 +2529,5 @@ namespace GcDevicePc
return (num / 10.0f).ToString(); return (num / 10.0f).ToString();
} }
} }
} }
...@@ -117,46 +117,47 @@ ...@@ -117,46 +117,47 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="&gt;&gt;datalist.Name" xml:space="preserve"> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<value>datalist</value> <data name="datalist.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data> </data>
<data name="&gt;&gt;$this.Type" xml:space="preserve"> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<value>WeifenLuo.WinFormsUI.Docking.DockContent, WeifenLuo.WinFormsUI.Docking, Version=2.9.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481</value> <data name="datalist.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data> </data>
<data name="&gt;&gt;datalist.Type" xml:space="preserve"> <data name="datalist.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>GcDevicePc.ListViewNF, GcDevicePc, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null</value> <value>0, 0, 0, 0</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="datalist.Size" type="System.Drawing.Size, System.Drawing"> <data name="datalist.Size" type="System.Drawing.Size, System.Drawing">
<value>286, 330</value> <value>286, 330</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<value>284, 325</value> <data name="datalist.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;datalist.Name" xml:space="preserve">
<value>datalist</value>
</data>
<data name="&gt;&gt;datalist.Type" xml:space="preserve">
<value>GcDevicePc.ListViewNF, GcDevicePc, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;datalist.Parent" xml:space="preserve"> <data name="&gt;&gt;datalist.Parent" xml:space="preserve">
<value>$this</value> <value>$this</value>
</data> </data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <data name="&gt;&gt;datalist.ZOrder" xml:space="preserve">
<data name="datalist.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <value>0</value>
<value>0, 0, 0, 0</value>
</data> </data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value> <value>6, 12</value>
</data> </data>
<data name="datalist.Location" type="System.Drawing.Point, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>0, 0</value> <value>284, 325</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DataState</value>
</data>
<data name="datalist.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="&gt;&gt;datalist.ZOrder" xml:space="preserve">
<value>0</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>GC 显示系统</value> <value>宋体, 9pt</value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
...@@ -324,17 +325,13 @@ ...@@ -324,17 +325,13 @@
AAA= AAA=
</value> </value>
</data> </data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing"> <data name="$this.Text" xml:space="preserve">
<value>宋体, 9pt</value> <value>GC 显示系统</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<data name="datalist.TabIndex" type="System.Int32, mscorlib"> <value>DataState</value>
<value>0</value> </data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>WeifenLuo.WinFormsUI.Docking.DockContent, WeifenLuo.WinFormsUI.Docking, Version=2.9.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481</value>
</data> </data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>en</value>
</metadata>
</root> </root>
\ No newline at end of file
...@@ -15,6 +15,7 @@ using GcDevicePc.GCBuffer; ...@@ -15,6 +15,7 @@ using GcDevicePc.GCBuffer;
namespace GcDevicePc.DeviceConfigUI namespace GcDevicePc.DeviceConfigUI
{ {
//仪器配置界面
public delegate void UpdataHMIOP(ushort val); public delegate void UpdataHMIOP(ushort val);
public partial class ConfigDevice : Form public partial class ConfigDevice : Form
{ {
...@@ -347,11 +348,22 @@ namespace GcDevicePc.DeviceConfigUI ...@@ -347,11 +348,22 @@ namespace GcDevicePc.DeviceConfigUI
private void savebtn_Click(object sender, EventArgs e) private void savebtn_Click(object sender, EventArgs e)
{ {
//Console.WriteLine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StatusFolder); try
{
//SaveDialog saveDialog = new SaveDialog(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.SubStatusFolder, 2); sendfilename = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.SubStatusFolder,"DevStatus.ini");
//DialogResult dr = saveDialog.ShowDialog();
//if (dr == DialogResult.OK) if (File.Exists(sendfilename))
{
System.IO.File.Delete(sendfilename);
}
hWConfig.CreatHWConfig(sendfilename);
hWConfig.SavaHWConfig();
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue == false)
{
Task.Run(() => { SaveSetting(); }); Task.Run(() => { SaveSetting(); });
backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork); backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
this.backgroundWorker1.RunWorkerAsync(); //运行backgroundWorker组件 this.backgroundWorker1.RunWorkerAsync(); //运行backgroundWorker组件
...@@ -359,30 +371,29 @@ namespace GcDevicePc.DeviceConfigUI ...@@ -359,30 +371,29 @@ namespace GcDevicePc.DeviceConfigUI
form.ShowDialog(this); form.ShowDialog(this);
form.Close(); form.Close();
} }
private void SaveSetting() else
{ {
try MessageBox.Show(bEnglishLanguage == false ? "请停止系统,再更新配置!" : "Please stop the system and update the configuration!");
}
}
catch (Exception)
{ {
sendfilename = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.SubStatusFolder,
"DevStatus.ini");
if (File.Exists(sendfilename))
{
System.IO.File.Delete(sendfilename);
} }
hWConfig.CreatHWConfig(sendfilename);
hWConfig.SavaHWConfig(); //Console.WriteLine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StatusFolder);
//SaveDialog saveDialog = new SaveDialog(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.SubStatusFolder, 2);
//DialogResult dr = saveDialog.ShowDialog();
//if (dr == DialogResult.OK)
string ip = globaldata.connection_ip;
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue == false) }
private void SaveSetting()
{ {
savebtn.Enabled = false; savebtn.Enabled = false;
string ip = globaldata.connection_ip;
SCclient.WtClientInit(ip, globaldata.fileserverport); SCclient.WtClientInit(ip, globaldata.fileserverport);
//#if Use_English_Folder //#if Use_English_Folder
// SCclient.WtClientCopytoServer("DevStatus.ini", sendfilename, globaldata.remoteFolder + "Instrument Status\\"); // SCclient.WtClientCopytoServer("DevStatus.ini", sendfilename, globaldata.remoteFolder + "Instrument Status\\");
...@@ -433,23 +444,12 @@ namespace GcDevicePc.DeviceConfigUI ...@@ -433,23 +444,12 @@ namespace GcDevicePc.DeviceConfigUI
} }
// MessageBox.Show(bEnglishLanguage == false ? "更新配置成功!" : "Update configuration successfully!"); // MessageBox.Show(bEnglishLanguage == false ? "更新配置成功!" : "Update configuration successfully!");
// this.Close(); // this.Close();
if (MessageBox.Show("下发完成,需要重启色谱和软件,是否马上重启软件?\n建议等色谱重启完成后再点击\"是(Y)\"", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question,MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) == DialogResult.Yes) if (MessageBox.Show("下发完成,需要重启色谱和软件,是否马上重启软件?\n建议等色谱重启完成后再点击\"是(Y)\"", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) == DialogResult.Yes)
{ {
Process.Start(Application.ExecutablePath); Process.Start(Application.ExecutablePath);
Process.GetCurrentProcess().Kill(); Process.GetCurrentProcess().Kill();
} }
} }
else
{
MessageBox.Show(bEnglishLanguage == false ? "请停止系统,再更新配置!" : "Please stop the system and update the configuration!");
}
}
catch (Exception)
{
}
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{//配置进度条,这里暂用for来代替执行进度 {//配置进度条,这里暂用for来代替执行进度
for (int i = 0; i <= 100; i++) for (int i = 0; i <= 100; i++)
......
This diff is collapsed.
This diff is collapsed.
<?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="cms_Chart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>367, 22</value>
</metadata>
<metadata name="tim_UpdateState.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="tim_ReadInterval.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>216, 22</value>
</metadata>
<metadata name="cms_file.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>480, 22</value>
</metadata>
<metadata name="tip_.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>578, 22</value>
</metadata>
</root>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WindowsFormsControlLibrary_PopUp;
namespace GcDevicePc.ExpansionMethod
{
public static class SelfAdaption
{
public static Point NewSize(this UserControl_PopUp UserControl_PopUp1, Size oldSize, Size newSize, Point oldtextPoint)
{
double scale = 0;
Point location = new Point();
scale = (double)((double)newSize.Height / (double)oldSize.Height);
location.Y = (int)(oldtextPoint.Y * scale)+newSize.Height*2/3;
scale = (double)((double)newSize.Width / (double)oldSize.Width);
location.X = (int)(oldtextPoint.X * scale);
return location;
}
}
}
...@@ -24,7 +24,7 @@ namespace GcDevicePc ...@@ -24,7 +24,7 @@ namespace GcDevicePc
CurveDisPlay2 curdisplay2 = new CurveDisPlay2(); CurveDisPlay2 curdisplay2 = new CurveDisPlay2();
CurveDisPlay3 curdisplay3 = new CurveDisPlay3(); CurveDisPlay3 curdisplay3 = new CurveDisPlay3();
DataState dataleft = new DataState();//状态显示 DataState dataleft = new DataState();//右侧状态显示窗口
private bool bEnglishLanguage = (Thread.CurrentThread.CurrentUICulture == CultureInfo.GetCultureInfo("en")) ? true:false; private bool bEnglishLanguage = (Thread.CurrentThread.CurrentUICulture == CultureInfo.GetCultureInfo("en")) ? true:false;
public Formdebug() public Formdebug()
{ {
...@@ -50,26 +50,104 @@ namespace GcDevicePc ...@@ -50,26 +50,104 @@ namespace GcDevicePc
//dataleft.Close_Threading(); //dataleft.Close_Threading();
//dataleft.Close(); //dataleft.Close();
} }
/// <summary>
/// 前检测对应检测器名称
/// </summary>
private string strDetNameFront;
/// <summary>
/// 中检测对应检测器名称
/// </summary>
private string strDetNameInter;
/// <summary>
/// 后检测对应检测器名称
/// </summary>
private string strDetNameBehind;
/// <summary>
/// 获取检测器对应名称
/// </summary>
private void DetName()
{
if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1)
{
{
if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 0) //TCD
{
strDetNameFront = "TCD1";
}
else if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 1)
{
strDetNameFront = "FID1";
}
else if (CProfileDevice.m_DevParam.syspara.u16DetFrontType == 3)
{
strDetNameFront = "FPD1";
}
}
}
private void Load_Win() if (CProfileDevice.m_DevParam.syspara.u16AuxHeater1 != 1)
{
if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1)
{
{
if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 0) //TCD
{
strDetNameInter = "TCD2";
}
else if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 1)
{
strDetNameInter = "FID2";
}
else if (CProfileDevice.m_DevParam.syspara.u16DetInterType == 3)
{
strDetNameInter = "FPD2";
}
}
}
}
if (CProfileDevice.m_DevParam.syspara.u16AuxHeater2 != 1)
{
if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1)
{
{
if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 0)
{
strDetNameBehind = "TCD3";
}
else if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 1)
{ {
strDetNameBehind = "FID3";
}
else if (CProfileDevice.m_DevParam.syspara.u16DetBehindType == 3)
{
strDetNameBehind = "FPD3";
}
}
}
}
}
private void Load_Win()
{
DetName();
if (!String.IsNullOrEmpty(globaldata.connection_ip)) if (!String.IsNullOrEmpty(globaldata.connection_ip))
{ {
if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1) if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1)
{ {
curdisplay.Text = bEnglishLanguage == false?"前检测器":"Front DET"; curdisplay.Text = bEnglishLanguage == false ? "前检测器"+ "("+strDetNameFront+")": "Front DET";
} }
if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1) if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1)
{ {
curdisplay2.Text = bEnglishLanguage == false ? "中检测器":"Middle DET"; curdisplay2.Text = bEnglishLanguage == false ? "中检测器" + "("+strDetNameInter+")": "Middle DET";
} }
if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1) if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1)
{ {
curdisplay3.Text = bEnglishLanguage == false ?"后检测器":"Back DET"; curdisplay3.Text = bEnglishLanguage == false ? "后检测器" + "("+strDetNameBehind+")": "Back DET";
} }
} }
...@@ -78,22 +156,24 @@ namespace GcDevicePc ...@@ -78,22 +156,24 @@ namespace GcDevicePc
if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1) if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1)
{ {
curdisplay.Text = bEnglishLanguage == false ? "前检测器":"Front DET"; curdisplay.Text = bEnglishLanguage == false ? "前检测器" : "Front DET";
} }
if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1) if (CProfileDevice.m_DevParam.syspara.u16DetInter == 1)
{ {
curdisplay2.Text = bEnglishLanguage == false ? "中检测器":"Middle DET"; curdisplay2.Text = bEnglishLanguage == false ? "中检测器" : "Middle DET";
} }
if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1) if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1)
{ {
curdisplay3.Text = bEnglishLanguage == false ? "后检测器":"Back DET"; curdisplay3.Text = bEnglishLanguage == false ? "后检测器" : "Back DET";
} }
} }
if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1) if (CProfileDevice.m_DevParam.syspara.u16DetFront == 1)
{ {
this.dockPanel1.Contains(curdisplay); this.dockPanel1.Contains(curdisplay);
...@@ -116,6 +196,7 @@ namespace GcDevicePc ...@@ -116,6 +196,7 @@ namespace GcDevicePc
curdisplay2.Dispose(); curdisplay2.Dispose();
} }
if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1) if (CProfileDevice.m_DevParam.syspara.u16DetBehind == 1)
{ {
this.dockPanel1.Contains(curdisplay3); this.dockPanel1.Contains(curdisplay3);
...@@ -126,7 +207,18 @@ namespace GcDevicePc ...@@ -126,7 +207,18 @@ namespace GcDevicePc
{ {
curdisplay3.Dispose(); curdisplay3.Dispose();
} }
//前中后检测窗口,激活已有的最前面一个
if (!curdisplay.IsDisposed)
{
curdisplay.Show();
}
else
{
if (!curdisplay2.IsDisposed)
{
curdisplay2.Show();
}
}
//Start_Thread(); //Start_Thread();
//dockPanelSideLeft.Show(this.dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight); //dockPanelSideLeft.Show(this.dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockRight);
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>..\VocsSetup\GC_Control\</OutputPath>
<DefineConstants>TRACE;DEBUG;ENABLE_DOUBLEST_STARTUP Use_English_Folder</DefineConstants> <DefineConstants>TRACE;DEBUG;ENABLE_DOUBLEST_STARTUP Use_English_Folder</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
...@@ -110,7 +110,13 @@ ...@@ -110,7 +110,13 @@
<Reference Include="AutoClosingMessageBox, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="AutoClosingMessageBox, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AutoClosingMessageBox.1.0.0.2\lib\net40\AutoClosingMessageBox.dll</HintPath> <HintPath>..\packages\AutoClosingMessageBox.1.0.0.2\lib\net40\AutoClosingMessageBox.dll</HintPath>
</Reference> </Reference>
<Reference Include="C1.C1DataExtender.2, Version=2.0.20113.81, Culture=neutral, PublicKeyToken=7c4b5683f80b910e, processorArchitecture=MSIL" />
<Reference Include="C1.Win.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=944ae1ea0e47ca04" />
<Reference Include="C1.Win.C1Chart.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=a22e16972c085838, processorArchitecture=MSIL" /> <Reference Include="C1.Win.C1Chart.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=a22e16972c085838, processorArchitecture=MSIL" />
<Reference Include="C1.Win.C1Chart3D.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=a22e16972c085838, processorArchitecture=MSIL" />
<Reference Include="C1.Win.C1Command.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=e808566f358766d8" />
<Reference Include="C1.Win.C1Command.4, Version=4.0.20201.416, Culture=neutral, PublicKeyToken=e808566f358766d8, processorArchitecture=MSIL" />
<Reference Include="C1.Win.C1Input.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a, processorArchitecture=MSIL" />
<Reference Include="CKVocAlgorithm"> <Reference Include="CKVocAlgorithm">
<HintPath>..\dll\CKVocAlgorithm.dll</HintPath> <HintPath>..\dll\CKVocAlgorithm.dll</HintPath>
</Reference> </Reference>
...@@ -134,6 +140,10 @@ ...@@ -134,6 +140,10 @@
<HintPath>..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll</HintPath> <HintPath>..\packages\NModbus4.2.1.0\lib\net40\NModbus4.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="SamplerCounterControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\a\Desktop\自动进样器\headspace\packages\202112dl\SamplerCounterControl.dll</HintPath>
</Reference>
<Reference Include="SpaceM"> <Reference Include="SpaceM">
<HintPath>..\dll\SpaceM.dll</HintPath> <HintPath>..\dll\SpaceM.dll</HintPath>
</Reference> </Reference>
...@@ -144,7 +154,9 @@ ...@@ -144,7 +154,9 @@
<HintPath>..\dll\SQLiteOperate.dll</HintPath> <HintPath>..\dll\SQLiteOperate.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Data.SQLite, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite, Version=1.0.104.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>bin\x86\Debug\System.Data.SQLite.dll</HintPath> <HintPath>bin\x86\Debug\System.Data.SQLite.dll</HintPath>
...@@ -155,6 +167,7 @@ ...@@ -155,6 +167,7 @@
<Reference Include="System.Design" /> <Reference Include="System.Design" />
<Reference Include="System.Drawing.Design" /> <Reference Include="System.Drawing.Design" />
<Reference Include="System.Management" /> <Reference Include="System.Management" />
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Windows.Forms.DataVisualization" /> <Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
...@@ -254,6 +267,7 @@ ...@@ -254,6 +267,7 @@
<Compile Include="Common\MoudbusOperation.cs" /> <Compile Include="Common\MoudbusOperation.cs" />
<Compile Include="Common\NModbusSlave.cs" /> <Compile Include="Common\NModbusSlave.cs" />
<Compile Include="Common\RunTableHelper.cs" /> <Compile Include="Common\RunTableHelper.cs" />
<Compile Include="Common\Sys_ini.cs" />
<Compile Include="Common\TWFile.cs" /> <Compile Include="Common\TWFile.cs" />
<Compile Include="Compound.cs"> <Compile Include="Compound.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -556,6 +570,12 @@ ...@@ -556,6 +570,12 @@
<Compile Include="DeviceConfigUI\Sampling.Designer.cs"> <Compile Include="DeviceConfigUI\Sampling.Designer.cs">
<DependentUpon>Sampling.cs</DependentUpon> <DependentUpon>Sampling.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="DrawUI\TempTrend.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DrawUI\TempTrend.Designer.cs">
<DependentUpon>TempTrend.cs</DependentUpon>
</Compile>
<Compile Include="EPCTips.cs"> <Compile Include="EPCTips.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -657,9 +677,7 @@ ...@@ -657,9 +677,7 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProThread\ChannelDataSaveSum.cs" /> <Compile Include="ProThread\ChannelDataSaveSum.cs" />
<Compile Include="ProThread\ChannelDataTh.cs" /> <Compile Include="ProThread\ChannelDataTh.cs" />
<Compile Include="ProThread\CKvocUpdata.cs" /> <Compile Include="ProThread\CKvocUpdataSum.cs" />
<Compile Include="ProThread\CKvocUpdata2.cs" />
<Compile Include="ProThread\CKvocUpdata3.cs" />
<Compile Include="ProThread\CPipeCtl.cs" /> <Compile Include="ProThread\CPipeCtl.cs" />
<Compile Include="ProThread\DataOutput.cs" /> <Compile Include="ProThread\DataOutput.cs" />
<Compile Include="ProThread\DataRcv.cs" /> <Compile Include="ProThread\DataRcv.cs" />
...@@ -763,6 +781,9 @@ ...@@ -763,6 +781,9 @@
<DependentUpon>AboutForm.cs</DependentUpon> <DependentUpon>AboutForm.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="auxtool.byn.resx">
<DependentUpon>auxtool.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="auxtool.en.resx"> <EmbeddedResource Include="auxtool.en.resx">
<DependentUpon>auxtool.cs</DependentUpon> <DependentUpon>auxtool.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
...@@ -1027,6 +1048,9 @@ ...@@ -1027,6 +1048,9 @@
<EmbeddedResource Include="DeviceConfigUI\Sampling.resx"> <EmbeddedResource Include="DeviceConfigUI\Sampling.resx">
<DependentUpon>Sampling.cs</DependentUpon> <DependentUpon>Sampling.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="DrawUI\TempTrend.resx">
<DependentUpon>TempTrend.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="EPCTips.resx"> <EmbeddedResource Include="EPCTips.resx">
<DependentUpon>EPCTips.cs</DependentUpon> <DependentUpon>EPCTips.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -1093,6 +1117,7 @@ ...@@ -1093,6 +1117,7 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="QuitForm.resx"> <EmbeddedResource Include="QuitForm.resx">
<DependentUpon>QuitForm.cs</DependentUpon> <DependentUpon>QuitForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="RestartHmi.resx"> <EmbeddedResource Include="RestartHmi.resx">
<DependentUpon>RestartHmi.cs</DependentUpon> <DependentUpon>RestartHmi.cs</DependentUpon>
...@@ -1133,6 +1158,9 @@ ...@@ -1133,6 +1158,9 @@
<DependentUpon>SysConfigSecondary.cs</DependentUpon> <DependentUpon>SysConfigSecondary.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="SysConfigSecondary.iu-Cans-CA.resx">
<DependentUpon>SysConfigSecondary.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SysConfigSecondary.resx"> <EmbeddedResource Include="SysConfigSecondary.resx">
<DependentUpon>SysConfigSecondary.cs</DependentUpon> <DependentUpon>SysConfigSecondary.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
...@@ -1209,6 +1237,7 @@ ...@@ -1209,6 +1237,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Components\" /> <Folder Include="Components\" />
<Folder Include="ExpansionMethod\" />
<Folder Include="UI\configmenu\" /> <Folder Include="UI\configmenu\" />
<Folder Include="UI\ico\" /> <Folder Include="UI\ico\" />
<Folder Include="UI\menu\" /> <Folder Include="UI\menu\" />
...@@ -1223,6 +1252,10 @@ ...@@ -1223,6 +1252,10 @@
<Content Include="UI\picture\色谱3.png" /> <Content Include="UI\picture\色谱3.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\WindowsFormsControlLibrary_PopUp\WindowsFormsControlLibrary_PopUp.csproj">
<Project>{AFC4DDC8-D40D-481E-AE7A-5AFB73C88E78}</Project>
<Name>WindowsFormsControlLibrary_PopUp</Name>
</ProjectReference>
<ProjectReference Include="..\SharedSpace\SharedSpace.csproj"> <ProjectReference Include="..\SharedSpace\SharedSpace.csproj">
<Project>{5498f944-5721-461b-b07f-3105ef0bf643}</Project> <Project>{5498f944-5721-461b-b07f-3105ef0bf643}</Project>
<Name>SharedSpace</Name> <Name>SharedSpace</Name>
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
this.statusStrip = new System.Windows.Forms.StatusStrip(); this.statusStrip = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabelusertime = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabelusertime = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabelText = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabelText = new System.Windows.Forms.ToolStripStatusLabel();
this.tool_CounterControlStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.HmiStatus = new System.Windows.Forms.ToolStripStatusLabel(); this.HmiStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.AdjustStat = new System.Windows.Forms.ToolStripStatusLabel(); this.AdjustStat = new System.Windows.Forms.ToolStripStatusLabel();
this.workProgress = new System.Windows.Forms.ToolStripProgressBar(); this.workProgress = new System.Windows.Forms.ToolStripProgressBar();
...@@ -80,6 +81,7 @@ ...@@ -80,6 +81,7 @@
this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker(); this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker();
this.timerWorker = new System.Windows.Forms.Timer(this.components); this.timerWorker = new System.Windows.Forms.Timer(this.components);
this.timer2 = new System.Windows.Forms.Timer(this.components); this.timer2 = new System.Windows.Forms.Timer(this.components);
this.userControl_PopUp1 = new WindowsFormsControlLibrary_PopUp.UserControl_PopUp();
this.menuStrip.SuspendLayout(); this.menuStrip.SuspendLayout();
this.statusStrip.SuspendLayout(); this.statusStrip.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -348,6 +350,7 @@ ...@@ -348,6 +350,7 @@
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabelusertime, this.toolStripStatusLabelusertime,
this.toolStripStatusLabelText, this.toolStripStatusLabelText,
this.tool_CounterControlStatus,
this.HmiStatus, this.HmiStatus,
this.AdjustStat, this.AdjustStat,
this.workProgress, this.workProgress,
...@@ -368,6 +371,12 @@ ...@@ -368,6 +371,12 @@
this.toolStripStatusLabelText.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); this.toolStripStatusLabelText.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right)));
this.toolStripStatusLabelText.Name = "toolStripStatusLabelText"; this.toolStripStatusLabelText.Name = "toolStripStatusLabelText";
// //
// tool_CounterControlStatus
//
resources.ApplyResources(this.tool_CounterControlStatus, "tool_CounterControlStatus");
this.tool_CounterControlStatus.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right)));
this.tool_CounterControlStatus.Name = "tool_CounterControlStatus";
//
// HmiStatus // HmiStatus
// //
resources.ApplyResources(this.HmiStatus, "HmiStatus"); resources.ApplyResources(this.HmiStatus, "HmiStatus");
...@@ -425,10 +434,17 @@ ...@@ -425,10 +434,17 @@
this.timer2.Interval = 1000; this.timer2.Interval = 1000;
this.timer2.Tick += new System.EventHandler(this.timer2_Tick); this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
// //
// userControl_PopUp1
//
resources.ApplyResources(this.userControl_PopUp1, "userControl_PopUp1");
this.userControl_PopUp1.Name = "userControl_PopUp1";
this.userControl_PopUp1.PopUpMsg = "cs2";
//
// MDIBase // MDIBase
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.userControl_PopUp1);
this.Controls.Add(this.statusStrip); this.Controls.Add(this.statusStrip);
this.Controls.Add(this.menuStrip); this.Controls.Add(this.menuStrip);
this.DoubleBuffered = true; this.DoubleBuffered = true;
...@@ -499,6 +515,8 @@ ...@@ -499,6 +515,8 @@
private System.Windows.Forms.ToolStripProgressBar workProgress; private System.Windows.Forms.ToolStripProgressBar workProgress;
private System.Windows.Forms.ToolStripStatusLabel MacToolStripStatusLabel1; private System.Windows.Forms.ToolStripStatusLabel MacToolStripStatusLabel1;
private System.Windows.Forms.ToolStripMenuItem sysconfigpSec; private System.Windows.Forms.ToolStripMenuItem sysconfigpSec;
private System.Windows.Forms.ToolStripStatusLabel tool_CounterControlStatus;
private WindowsFormsControlLibrary_PopUp.UserControl_PopUp userControl_PopUp1;
} }
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -29,22 +29,36 @@ ...@@ -29,22 +29,36 @@
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.userControl_PopUp1 = new WindowsFormsControlLibrary_PopUp.UserControl_PopUp();
this.SuspendLayout(); this.SuspendLayout();
// //
// userControl_PopUp1
//
this.userControl_PopUp1.Location = new System.Drawing.Point(12, 487);
this.userControl_PopUp1.Name = "userControl_PopUp1";
this.userControl_PopUp1.PopUpMsg = "cs2";
this.userControl_PopUp1.Size = new System.Drawing.Size(251, 70);
this.userControl_PopUp1.TabIndex = 7;
this.userControl_PopUp1.Visible = false;
//
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1008, 730); this.ClientSize = new System.Drawing.Size(1008, 730);
this.Controls.Add(this.userControl_PopUp1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "MainForm"; this.Name = "MainForm";
// this.Text = "-1.5.9 用户界面"; this.Text = "";
this.Controls.SetChildIndex(this.userControl_PopUp1, 0);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private WindowsFormsControlLibrary_PopUp.UserControl_PopUp userControl_PopUp1;
#endregion #endregion
//private System.Windows.Forms.TabPage tabPage1; //private System.Windows.Forms.TabPage tabPage1;
......
...@@ -8,6 +8,8 @@ using System.Diagnostics; ...@@ -8,6 +8,8 @@ using System.Diagnostics;
using GcDevicePc.IniParam; using GcDevicePc.IniParam;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using GcDevicePc.Common;
namespace GcDevicePc.ProThread namespace GcDevicePc.ProThread
{ {
class CKvocUpdata class CKvocUpdata
...@@ -71,7 +73,7 @@ namespace GcDevicePc.ProThread ...@@ -71,7 +73,7 @@ namespace GcDevicePc.ProThread
{ {
CurveDisPlay.curdisp.cleardata(); CurveDisPlay.curdisp.cleardata();
globaldata.starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[0]).ctimer; globaldata.starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[0]).ctimer;
time = 0; time = 0;//表示开始计时
globaldata.startimerIsSet1 = false; globaldata.startimerIsSet1 = false;
}//是否清空绘图的标志,外部触发(物理按钮和无源输入)不会更新这个状态为true;或者累计时长大于600min }//是否清空绘图的标志,外部触发(物理按钮和无源输入)不会更新这个状态为true;或者累计时长大于600min
...@@ -82,6 +84,7 @@ namespace GcDevicePc.ProThread ...@@ -82,6 +84,7 @@ namespace GcDevicePc.ProThread
#if (debug) #if (debug)
st.Start(); //计时开始 st.Start(); //计时开始
#endif #endif
for (int i = 0; i < globaldata.m_signalbuffer.Draw_Port.Count; i++) for (int i = 0; i < globaldata.m_signalbuffer.Draw_Port.Count; i++)
{ {
if (globaldata.MethodRun_Statue == 4 || globaldata.MethodRun_Statue == 5) if (globaldata.MethodRun_Statue == 4 || globaldata.MethodRun_Statue == 5)
...@@ -97,7 +100,7 @@ namespace GcDevicePc.ProThread ...@@ -97,7 +100,7 @@ namespace GcDevicePc.ProThread
{ {
CKVocAnalyzer.GlobalCKV.debugwork = 4; CKVocAnalyzer.GlobalCKV.debugwork = 4;
isstart = 2; isstart = 2;
time = 0; time = 0;//重新开始计时
drbool = false; drbool = false;
globaldata.starttimer = globaldata.m_hmibuffer.gcinfo.NowStartTime; globaldata.starttimer = globaldata.m_hmibuffer.gcinfo.NowStartTime;
NowTimeOld = globaldata.m_hmibuffer.gcinfo.NowStartTime; NowTimeOld = globaldata.m_hmibuffer.gcinfo.NowStartTime;
...@@ -109,7 +112,7 @@ namespace GcDevicePc.ProThread ...@@ -109,7 +112,7 @@ namespace GcDevicePc.ProThread
CurveDisPlay.curdisp.SetAxisX( CurveDisPlay.curdisp.SetAxisX(
(double)globaldata.m_dpbuffer.ShowList.showtime (double)globaldata.m_dpbuffer.ShowList.showtime
.alltime / 60.0); .alltime / 60.0);
time = 0; time = 0;//重新开始计时
drbool = false; drbool = false;
globaldata.starttimer = globaldata.m_hmibuffer.gcinfo.NowStartTime; globaldata.starttimer = globaldata.m_hmibuffer.gcinfo.NowStartTime;
NowTimeOld = globaldata.m_hmibuffer.gcinfo.NowStartTime; NowTimeOld = globaldata.m_hmibuffer.gcinfo.NowStartTime;
...@@ -198,14 +201,12 @@ namespace GcDevicePc.ProThread ...@@ -198,14 +201,12 @@ namespace GcDevicePc.ProThread
if (time > 0xFFFF) if (time > 0xFFFF)
{ {
// Console.WriteLine("data err"); // Console.WriteLine("data err");
File.AppendAllText(@"./timeErr.txt", time + "\t");//异常time Log.DebugInfo("前检测异常time:"+time );
// File.AppendAllText(@"./timeErr.txt", );//异常time
} }
//time += 0.00083; //time += 0.00083;
globaldata.starttimer = globaldata.starttimer =((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]) .ctimer;
((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]) value = (((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]) .cdata * 1000.0f);
.ctimer;
value = (((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i])
.cdata * 1000.0f);
if (time < 600) if (time < 600)
{ {
listPoint.Add(new double[] { Math.Round(time, 4), Math.Round(value, 6) }); listPoint.Add(new double[] { Math.Round(time, 4), Math.Round(value, 6) });
...@@ -230,6 +231,7 @@ namespace GcDevicePc.ProThread ...@@ -230,6 +231,7 @@ namespace GcDevicePc.ProThread
.ctimer) && isstart == 2) .ctimer) && isstart == 2)
{ {
drbool = true; drbool = true;
Log.DebugInfo("前检测终点判断,更改drbool为true");//debug
isstart = 0; isstart = 0;
break; break;
} }
...@@ -237,6 +239,7 @@ namespace GcDevicePc.ProThread ...@@ -237,6 +239,7 @@ namespace GcDevicePc.ProThread
//已停止(运行)状态 //已停止(运行)状态
if (bBeforeStopFlag != bNowStopFlag) if (bBeforeStopFlag != bNowStopFlag)
{ {
Log.DebugInfo("前检测已停止状态,更改drbool为true");//debug
if (drbool == false && bBeforeStopFlag == false && bNowStopFlag == true) if (drbool == false && bBeforeStopFlag == false && bNowStopFlag == true)
{ {
drbool = true; drbool = true;
...@@ -247,9 +250,11 @@ namespace GcDevicePc.ProThread ...@@ -247,9 +250,11 @@ namespace GcDevicePc.ProThread
} }
} }
else else
globaldata.starttimer = {
((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]) Log.DebugInfo("前检测未满足重置条件"+"---globaldata.starttimer="+globaldata.starttimer+"---((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer="+((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer);//debug
.ctimer; globaldata.starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer;
}
// Log.DebugInfo("前检测未满足重置条件"+"---globaldata.starttimer="+globaldata.starttimer+"---((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer="+((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer);//测试能否打印
} }
//读取数据完毕 //读取数据完毕
// Console.WriteLine(globaldata.m_signalbuffer.Draw_Port.Count); // Console.WriteLine(globaldata.m_signalbuffer.Draw_Port.Count);
...@@ -284,6 +289,7 @@ namespace GcDevicePc.ProThread ...@@ -284,6 +289,7 @@ namespace GcDevicePc.ProThread
//lr.Clear(); //lr.Clear();
if (drbool) if (drbool)
{ {
Log.DebugInfo("前检测进入时间戳重置");//debug
time = 0; time = 0;
CurveDisPlay.curdisp.cleardata(); CurveDisPlay.curdisp.cleardata();
} }
......
...@@ -7,6 +7,7 @@ using GcDevicePc.GCBuffer; ...@@ -7,6 +7,7 @@ using GcDevicePc.GCBuffer;
using System.Diagnostics; using System.Diagnostics;
using GcDevicePc.CK_UI; using GcDevicePc.CK_UI;
using GcDevicePc.IniParam; using GcDevicePc.IniParam;
using GcDevicePc.Common;
namespace GcDevicePc.ProThread namespace GcDevicePc.ProThread
{ {
...@@ -43,7 +44,7 @@ namespace GcDevicePc.ProThread ...@@ -43,7 +44,7 @@ namespace GcDevicePc.ProThread
// if ((globaldata.m_hmibuffer.gcinfo.methodstatus == 4 || globaldata.m_hmibuffer.gcinfo.methodstatus == 5) || globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue) //判断HMI工作模式 0-空闲 1-2 准备 3准备就绪 4-5 运行(分保持和程升) 6-7结束后处理 // if ((globaldata.m_hmibuffer.gcinfo.methodstatus == 4 || globaldata.m_hmibuffer.gcinfo.methodstatus == 5) || globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue) //判断HMI工作模式 0-空闲 1-2 准备 3准备就绪 4-5 运行(分保持和程升) 6-7结束后处理
// //改为全状态下绘制基线(之前是保存在临时,点击开启系统后一股脑丢出) // //改为全状态下绘制基线(之前是保存在临时,点击开启系统后一股脑丢出)
// { // {
#if(debug) #if (debug)
Stopwatch st = new Stopwatch(); //计时 Stopwatch st = new Stopwatch(); //计时
st.Reset(); //清零 st.Reset(); //清零
#endif #endif
...@@ -68,7 +69,7 @@ namespace GcDevicePc.ProThread ...@@ -68,7 +69,7 @@ namespace GcDevicePc.ProThread
else else
{ {
if (globaldata.startimerIsSet2||time>600) if (globaldata.startimerIsSet2 || time > 600)
{ {
CurveDisPlay2.curdisp2.cleardata(); CurveDisPlay2.curdisp2.cleardata();
starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[0]).ctimer; starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[0]).ctimer;
...@@ -80,7 +81,7 @@ namespace GcDevicePc.ProThread ...@@ -80,7 +81,7 @@ namespace GcDevicePc.ProThread
timeend -= 5; timeend -= 5;
if (starttimer == 0) if (starttimer == 0)
starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[0]).ctimer; starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[0]).ctimer;
#if(debug) #if (debug)
st.Start(); //计时开始 st.Start(); //计时开始
#endif #endif
for (int i = 0; i < globaldata.m_signalbuffer.Draw_Port2.Count; i++) for (int i = 0; i < globaldata.m_signalbuffer.Draw_Port2.Count; i++)
...@@ -185,6 +186,12 @@ namespace GcDevicePc.ProThread ...@@ -185,6 +186,12 @@ namespace GcDevicePc.ProThread
time += ((((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer - starttimer) / 1000.0f / 60.0f); time += ((((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer - starttimer) / 1000.0f / 60.0f);
//time += 0.00083; //time += 0.00083;
if (time > 0xFFFF)
{
// Console.WriteLine("data err");
Log.DebugInfo("中检测异常time:"+time );
// File.AppendAllText(@"./timeErr.txt", );//异常time
}
starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer; starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer;
value = (((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).cdata * 1000.0f); value = (((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).cdata * 1000.0f);
...@@ -193,8 +200,6 @@ namespace GcDevicePc.ProThread ...@@ -193,8 +200,6 @@ namespace GcDevicePc.ProThread
listPoint.Add(new double[] { Math.Round(time, 4), Math.Round(value, 6) }); listPoint.Add(new double[] { Math.Round(time, 4), Math.Round(value, 6) });
listRaw.Add(new double[] { ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer, Math.Round(value, 6) }); listRaw.Add(new double[] { ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer, Math.Round(value, 6) });
} }
//时间判断终点 //时间判断终点
...@@ -204,6 +209,7 @@ namespace GcDevicePc.ProThread ...@@ -204,6 +209,7 @@ namespace GcDevicePc.ProThread
if ((globaldata.m_hmibuffer.gcinfo.NowStartTime < globaldata.m_hmibuffer.gcinfo.NowEndTime) && (globaldata.m_hmibuffer.gcinfo.NowEndTime <= ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer) && isstart == 2) if ((globaldata.m_hmibuffer.gcinfo.NowStartTime < globaldata.m_hmibuffer.gcinfo.NowEndTime) && (globaldata.m_hmibuffer.gcinfo.NowEndTime <= ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer) && isstart == 2)
{ {
Log.DebugInfo("中检测终点判断,更改drbool为true");//debug
drbool = true; drbool = true;
...@@ -214,9 +220,10 @@ namespace GcDevicePc.ProThread ...@@ -214,9 +220,10 @@ namespace GcDevicePc.ProThread
} }
} }
//停止按钮按下判断 //停止按钮按下判断
if(bBeforeStopFlag != bNowStopFlag) if (bBeforeStopFlag != bNowStopFlag)
{ {
if(drbool == false && bBeforeStopFlag == false && bNowStopFlag == true) Log.DebugInfo("中检测已停止状态,更改drbool为true");//debug
if (drbool == false && bBeforeStopFlag == false && bNowStopFlag == true)
{ {
drbool = true; drbool = true;
isstart = 0; isstart = 0;
...@@ -227,7 +234,10 @@ namespace GcDevicePc.ProThread ...@@ -227,7 +234,10 @@ namespace GcDevicePc.ProThread
} }
else else
{
Log.DebugInfo("中检测未满足重置条件" + "---globaldata.starttimer=" + globaldata.starttimer + "---((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer=" + ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer);//debug
starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer; starttimer = ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port2[i]).ctimer;
}
} }
...@@ -260,6 +270,7 @@ namespace GcDevicePc.ProThread ...@@ -260,6 +270,7 @@ namespace GcDevicePc.ProThread
//lr.Clear(); //lr.Clear();
if (drbool) if (drbool)
{ {
Log.DebugInfo("中检测进入时间戳重置");//debug
time = 0; time = 0;
CurveDisPlay2.curdisp2.cleardata(); CurveDisPlay2.curdisp2.cleardata();
} }
......
This diff is collapsed.
...@@ -7,8 +7,9 @@ using System.Collections; ...@@ -7,8 +7,9 @@ using System.Collections;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using GcDevicePc.Common; using GcDevicePc.Common;
namespace GcDevicePc.ProThread namespace GcDevicePc.ProThread
{using System.IO; {
using System.Collections.Generic; using System.IO;
using System.Collections.Generic;
class HMISearch class HMISearch
{ {
...@@ -160,7 +161,11 @@ using System.Collections.Generic; ...@@ -160,7 +161,11 @@ using System.Collections.Generic;
int iReadBytes = 0; int iReadBytes = 0;
try try
{ {
for (int i = 0; i <= _localip.Count-1; i--) UInt16 usTrytimes = 0;
// for (int i = 0; i <= _localip.Count-1; i--)
while (usTrytimes < 100)
{
for (int i = 0; i <= _localip.Count - 1; i++)
{ {
sLocalIPIndex = i; sLocalIPIndex = i;
client = new UdpClient(new IPEndPoint(IPAddress.Parse(this._localip[i]), 0)); client = new UdpClient(new IPEndPoint(IPAddress.Parse(this._localip[i]), 0));
...@@ -173,10 +178,10 @@ using System.Collections.Generic; ...@@ -173,10 +178,10 @@ using System.Collections.Generic;
endpoint = new IPEndPoint(IPAddress.Parse("18.18.18.255"), 233); endpoint = new IPEndPoint(IPAddress.Parse("18.18.18.255"), 233);
} }
client.Send(sendBytes, sendBytes.Length, endpoint); client.Send(sendBytes, sendBytes.Length, endpoint);
Thread.Sleep(500); // Thread.Sleep(500);
byte[] recvBytes; byte[] recvBytes;
client.Client.Blocking = false; client.Client.Blocking = false;
UInt16 usTrytimes = 0; // UInt16 usTrytimes = 0;
while (true) while (true)
{ {
iReadBytes = 30; iReadBytes = 30;
...@@ -186,13 +191,14 @@ using System.Collections.Generic; ...@@ -186,13 +191,14 @@ using System.Collections.Generic;
{ {
recvBytes = client.Receive(ref endpoint); recvBytes = client.Receive(ref endpoint);
iReadBytes = recvBytes.Length; iReadBytes = recvBytes.Length;
if(DoRecvDataCallBack(recvBytes, iReadBytes) == true) if (DoRecvDataCallBack(recvBytes, iReadBytes) == true)
continue; continue;
} }
else else
{ {
usTrytimes++; usTrytimes++;
if (usTrytimes >= 100) // if (usTrytimes >= 100)
if (usTrytimes >= 20)
break; break;
} }
Thread.Sleep(100); Thread.Sleep(100);
...@@ -211,8 +217,10 @@ using System.Collections.Generic; ...@@ -211,8 +217,10 @@ using System.Collections.Generic;
// } // }
//} //}
} }
return false; // return false;
}
} }
return false; return false;
} }
catch (Exception e) catch (Exception e)
...@@ -230,7 +238,9 @@ using System.Collections.Generic; ...@@ -230,7 +238,9 @@ using System.Collections.Generic;
try try
{ {
ushort countDown = usSearchTime;//限定时间,用于倒计时判定
while (countDown > 0)
{
for (int i = 0; i < _localip.Count; i++) for (int i = 0; i < _localip.Count; i++)
{ {
sLocalIPIndex = i; sLocalIPIndex = i;
...@@ -248,7 +258,7 @@ using System.Collections.Generic; ...@@ -248,7 +258,7 @@ using System.Collections.Generic;
} }
// endpoint = new IPEndPoint(IPAddress.Parse("192.168.10.230"), 233); // endpoint = new IPEndPoint(IPAddress.Parse("192.168.10.230"), 233);
client.Send(sendBytes, sendBytes.Length, endpoint); client.Send(sendBytes, sendBytes.Length, endpoint);
Thread.Sleep(500); // Thread.Sleep(500);
byte[] recvBytes; byte[] recvBytes;
client.Client.Blocking = false; client.Client.Blocking = false;
UInt16 usTrytimes = 0; UInt16 usTrytimes = 0;
...@@ -261,19 +271,28 @@ using System.Collections.Generic; ...@@ -261,19 +271,28 @@ using System.Collections.Generic;
{ {
recvBytes = client.Receive(ref endpoint); recvBytes = client.Receive(ref endpoint);
iReadBytes = recvBytes.Length; iReadBytes = recvBytes.Length;
if(DoRecvDataCallBack(recvBytes, iReadBytes) == true) if (DoRecvDataCallBack(recvBytes, iReadBytes) == true)
continue; continue;
} }
else else
{ {
usTrytimes ++; usTrytimes++;
if(usTrytimes >= (usSearchTime/_localip.Count/2)) if (usTrytimes>20)
{
countDown-=2;
//每个IP搜索2S,限定时间内重复搜索各IP
break; break;
} }
// if (usTrytimes >= (usSearchTime / _localip.Count / 2))
// break;
}
Thread.Sleep(100); Thread.Sleep(100);
} }
} }
}
//bool bCanfindMacAddr = false; //bool bCanfindMacAddr = false;
//globaldata.DeviceInfo DeviceInfo = new globaldata.DeviceInfo(); //globaldata.DeviceInfo DeviceInfo = new globaldata.DeviceInfo();
//for (int k = 0; k < globaldata.DeviceList.Count && !string.IsNullOrEmpty(FMAC); k++) //for (int k = 0; k < globaldata.DeviceList.Count && !string.IsNullOrEmpty(FMAC); k++)
...@@ -317,7 +336,7 @@ using System.Collections.Generic; ...@@ -317,7 +336,7 @@ using System.Collections.Generic;
ASCIIEncoding asciiEncoding = new ASCIIEncoding(); ASCIIEncoding asciiEncoding = new ASCIIEncoding();
m_DeviceInfo.bActive = false; m_DeviceInfo.bActive = false;
for (i = 0; i < 100; i++ ) for (i = 0; i < 100; i++)
{ {
if (asciiEncoding.GetString(pBuf, 6 + i, 1) == "\0") if (asciiEncoding.GetString(pBuf, 6 + i, 1) == "\0")
break; break;
...@@ -346,9 +365,9 @@ using System.Collections.Generic; ...@@ -346,9 +365,9 @@ using System.Collections.Generic;
{ {
globaldata.CanSearchDeviceList.Add(m_DeviceInfo); globaldata.CanSearchDeviceList.Add(m_DeviceInfo);
} }
for(int k = 0; k < globaldata.DeviceList.Count;k++) for (int k = 0; k < globaldata.DeviceList.Count; k++)
{ {
if(((globaldata.DeviceInfo)globaldata.DeviceList[k]).MacAddr == tmpmac) if (((globaldata.DeviceInfo)globaldata.DeviceList[k]).MacAddr == tmpmac)
{ {
return false; return false;
} }
......
using SpaceM; using GcDevicePc.DrawUI;
using SpaceM;
using System; using System;
using System.Globalization; using System.Globalization;
using System.Threading; using System.Threading;
...@@ -29,6 +30,8 @@ namespace GcDevicePc ...@@ -29,6 +30,8 @@ namespace GcDevicePc
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en"); Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en");
} }
Application.Run(new StartForm()); Application.Run(new StartForm());
// Application.Run(new TempTrend());
mutex.ReleaseMutex(); mutex.ReleaseMutex();
} }
else else
......
...@@ -12,7 +12,7 @@ namespace GcDevicePc.Properties { ...@@ -12,7 +12,7 @@ namespace GcDevicePc.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.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())));
......
C1.Win.C1Input.C1CheckBox, C1.Win.C1Input.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a
C1.Win.C1Command.C1CommandDock, C1.Win.C1Command.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=e808566f358766d8
C1.Win.C1Input.C1Button, C1.Win.C1Input.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a
C1.Win.C1Chart.C1Chart, C1.Win.C1Chart.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=a22e16972c085838 C1.Win.C1Chart.C1Chart, C1.Win.C1Chart.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=a22e16972c085838
C1.Win.C1Input.C1SplitButton, C1.Win.C1Input.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a
C1.Win.C1Chart3D.C1Chart3D, C1.Win.C1Chart3D.2, Version=2.0.20201.416, Culture=neutral, PublicKeyToken=a22e16972c085838
C1.C1DataExtender.C1DataViewSet, C1.C1DataExtender.2, Version=2.0.20113.81, Culture=neutral, PublicKeyToken=7c4b5683f80b910e
...@@ -28,6 +28,7 @@ namespace GcDevicePc ...@@ -28,6 +28,7 @@ namespace GcDevicePc
private static Thread _tPreload; private static Thread _tPreload;
private static Thread SearchHMIThread; private static Thread SearchHMIThread;
private MainForm _mMainForm; private MainForm _mMainForm;
// private MDIBase _mMainForm;
private bool bBindOK = false; private bool bBindOK = false;
private bool bStartSearchOK = false; private bool bStartSearchOK = false;
private bool bWaitOver = false; private bool bWaitOver = false;
...@@ -46,10 +47,11 @@ namespace GcDevicePc ...@@ -46,10 +47,11 @@ namespace GcDevicePc
{ {
//如果当前已经完全不透明,则停止timer //如果当前已经完全不透明,则停止timer
_opacityTimer.Stop(); _opacityTimer.Stop();
System.Timers.Timer t = new System.Timers.Timer(StayTime); //设置时间间隔为5秒 // System.Timers.Timer t = new System.Timers.Timer(StayTime);
t.Elapsed += new System.Timers.ElapsedEventHandler(Timer_TimesUp); // t.Elapsed += new System.Timers.ElapsedEventHandler(Timer_TimesUp);
t.AutoReset = false; //每到指定时间Elapsed事件是触发一次(false),还是一直触发(true) // t.AutoReset = false; //每到指定时间Elapsed事件是触发一次(false),还是一直触发(true)
t.Start(); // t.Start();
Timer_TimesUp();
} }
} }
...@@ -80,7 +82,7 @@ namespace GcDevicePc ...@@ -80,7 +82,7 @@ namespace GcDevicePc
this.Opacity = this._mCurrentOpacity; this.Opacity = this._mCurrentOpacity;
} }
private void Timer_TimesUp(object sender, System.Timers.ElapsedEventArgs e) private void Timer_TimesUp()
{ {
_opacityTimer = new System.Timers.Timer(); _opacityTimer = new System.Timers.Timer();
_opacityTimer.Interval = 30; _opacityTimer.Interval = 30;
...@@ -162,6 +164,7 @@ namespace GcDevicePc ...@@ -162,6 +164,7 @@ namespace GcDevicePc
{ {
_tPreload.Join(); _tPreload.Join();
_mMainForm = new MainForm(); _mMainForm = new MainForm();
//_mMainForm = new MDIBase();
StartFormbgWorker.CancelAsync(); StartFormbgWorker.CancelAsync();
Hide(); Hide();
_mMainForm.Show(); _mMainForm.Show();
...@@ -355,7 +358,7 @@ namespace GcDevicePc ...@@ -355,7 +358,7 @@ namespace GcDevicePc
{ {
// Thread.Sleep(10000); //延时10S等待HMI开机,改为用户指定(选项) // Thread.Sleep(10000); //延时10S等待HMI开机,改为用户指定(选项)
HMISearch mysearch = new HMISearch(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmimac); HMISearch mysearch = new HMISearch(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmimac);
mysearch.bSearch_Bind_HMI(); // mysearch.bSearch_Bind_HMI();
bStartSearchOK = true; bStartSearchOK = true;
mysearch.ThStart(); mysearch.ThStart();
// mysearch.ThStart(); // mysearch.ThStart();
......
...@@ -157,12 +157,13 @@ namespace GcDevicePc ...@@ -157,12 +157,13 @@ namespace GcDevicePc
public event UpdataHMIOpS uphops; public event UpdataHMIOpS uphops;
WaitForm form;
private void Button1_Click(object sender, EventArgs e) private void Button1_Click(object sender, EventArgs e)
{ {
Task.Run(() => { SaveSetting(); }); Task.Run(() => { SaveSetting(); });
backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork); backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
this.backgroundWorker1.RunWorkerAsync(); //运行backgroundWorker组件 this.backgroundWorker1.RunWorkerAsync(); //运行backgroundWorker组件
WaitForm form = new WaitForm(this.backgroundWorker1); //显示进度条窗体 form = new WaitForm(this.backgroundWorker1); //显示进度条窗体
form.ShowDialog(this); form.ShowDialog(this);
form.Close(); form.Close();
...@@ -208,7 +209,15 @@ namespace GcDevicePc ...@@ -208,7 +209,15 @@ namespace GcDevicePc
} }
ini.WriteString("Version", "AppName", this.textBox9.Text); ini.WriteString("Version", "AppName", this.textBox9.Text);
backgroundWorker1.ReportProgress(100);
try
{
form.Close();
}
catch (Exception)
{
//一般不会出现,除非保存配置耗时太长
}
if (MessageBox.Show("下发完成,需要重启色谱和软件,是否马上重启软件?\n建议等色谱重启完成后再点击\"是(Y)\"", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) == DialogResult.Yes) if (MessageBox.Show("下发完成,需要重启色谱和软件,是否马上重启软件?\n建议等色谱重启完成后再点击\"是(Y)\"", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) == DialogResult.Yes)
{ {
Process.Start(Application.ExecutablePath); Process.Start(Application.ExecutablePath);
...@@ -230,7 +239,7 @@ namespace GcDevicePc ...@@ -230,7 +239,7 @@ namespace GcDevicePc
} }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{//配置进度条,这里暂用for来代替执行进度 {//配置进度条,这里暂用for来代替执行进度
for (int i = 0; i <= 100; i++) for (int i = 0; i <= 90; i++)
{ {
Thread.Sleep(5); Thread.Sleep(5);
backgroundWorker1.ReportProgress(i); backgroundWorker1.ReportProgress(i);
...@@ -509,6 +518,8 @@ namespace GcDevicePc ...@@ -509,6 +518,8 @@ namespace GcDevicePc
public event StopForUpdateFirm sfupdatefirm; public event StopForUpdateFirm sfupdatefirm;
public event UpdateFirmCMD updatefirm; public event UpdateFirmCMD updatefirm;
private void firmwareupdate_Click(object sender, EventArgs e) private void firmwareupdate_Click(object sender, EventArgs e)
{
if (MessageBox.Show("对电源,温控,检测器进行镜像更新,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) == DialogResult.Yes)
{ {
if (HmiIP != null) if (HmiIP != null)
{ {
...@@ -520,6 +531,7 @@ namespace GcDevicePc ...@@ -520,6 +531,7 @@ namespace GcDevicePc
} }
} }
}
private bool updatefirm_ok = false; private bool updatefirm_ok = false;
private bool sendfirm_ok = false; private bool sendfirm_ok = false;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("SamplerCounterControl")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SamplerCounterControl")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("ad1c51cd-86b5-416b-9708-0ea7c2414edc")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
[SYSINFO]
ECOUNT=1
[ENTITY0]
ECC=Default,0,0,0,0,0,0,0,0,0,0,,1000,,,0,0,0,0,0
ECCD0=1,Ũ1,0,,0,,1
ECCD0_Orig0=0,uV*sec,Default,...\Default.raw
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment