Commit 68ee075c authored by wangwanxh@sina.com's avatar wangwanxh@sina.com

Merge branch 'wang_master' of https://gitee.com/wangwanxh/Vocs into wang_master

parents 9e80a754 53767c8e
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<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"/>
</runtime> </runtime>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</logger> </logger>
<appender name="RollingLog" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_Config\GC_Set\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'" />
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</appender> </appender>
<appender name="HmiRollingLog" type="log4net.Appender.RollingFileAppender"> <appender name="HmiRollingLog" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_Config\GC_Set\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'" />
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</appender> </appender>
<appender name="RollingErr" type="log4net.Appender.RollingFileAppender"> <appender name="RollingErr" type="log4net.Appender.RollingFileAppender">
<file value="..\GC_Config\GC_Set\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'" />
......
...@@ -106,7 +106,7 @@ namespace GcDevicePc ...@@ -106,7 +106,7 @@ namespace GcDevicePc
globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.TmpFolder = Path.Combine(tmpFolder, "tmpfile"); globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.TmpFolder = Path.Combine(tmpFolder, "tmpfile");
CheckFolderandFile(0, globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.TmpFolder); CheckFolderandFile(0, globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.TmpFolder);
globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.LogFolder = Path.Combine(tmpFolder, "Logs"); globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.LogFolder = System.Windows.Forms.Application.StartupPath + "\\..\\GC_User\\Logs";
CheckFolderandFile(0, globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.LogFolder); CheckFolderandFile(0, globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.LogFolder);
tmpFolder = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StatusFolder; tmpFolder = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StatusFolder;
......
...@@ -16,6 +16,7 @@ namespace GcDevicePc.Common ...@@ -16,6 +16,7 @@ namespace GcDevicePc.Common
/// <param name="msg">消息内容</param> /// <param name="msg">消息内容</param>
public static void Info(string msg) public static void Info(string msg)
{ {
if(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.info_log)
logInfo.Info(msg); logInfo.Info(msg);
} }
...@@ -25,6 +26,7 @@ namespace GcDevicePc.Common ...@@ -25,6 +26,7 @@ namespace GcDevicePc.Common
/// <param name="msg">消息内容</param> /// <param name="msg">消息内容</param>
public static void HmiInfo(string msg) public static void HmiInfo(string msg)
{ {
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmi_log)
hmiInfo.Info(msg); hmiInfo.Info(msg);
} }
...@@ -33,6 +35,8 @@ namespace GcDevicePc.Common ...@@ -33,6 +35,8 @@ namespace GcDevicePc.Common
/// </summary> /// </summary>
/// <param name="msg">异常信息内容</param> /// <param name="msg">异常信息内容</param>
public static void Error(string msg) public static void Error(string msg)
{
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.error_log)
{ {
StackTrace stackTrace = new StackTrace(); StackTrace stackTrace = new StackTrace();
StackFrame stackFrame = stackTrace.GetFrame(1); StackFrame stackFrame = stackTrace.GetFrame(1);
...@@ -40,4 +44,5 @@ namespace GcDevicePc.Common ...@@ -40,4 +44,5 @@ namespace GcDevicePc.Common
logErr.Error("ClassName:" + methodBase.ReflectedType.Name + " Func Name:" + methodBase.Name + " Info:" + msg); logErr.Error("ClassName:" + methodBase.ReflectedType.Name + " Func Name:" + methodBase.Name + " Info:" + msg);
} }
} }
}
} }
...@@ -41,6 +41,10 @@ namespace GcDevicePc.GCBuffer ...@@ -41,6 +41,10 @@ namespace GcDevicePc.GCBuffer
public ushort work_Statue; //系统工作状态 public ushort work_Statue; //系统工作状态
public ushort RunType; //运行类型 0 打开运行 1 智能运行 2 批处理 public ushort RunType; //运行类型 0 打开运行 1 智能运行 2 批处理
// public bool sendtohw; // public bool sendtohw;
public bool info_log;
public bool error_log;
public bool hmi_log;
} }
public struct ModuleInfo public struct ModuleInfo
...@@ -100,6 +104,10 @@ namespace GcDevicePc.GCBuffer ...@@ -100,6 +104,10 @@ namespace GcDevicePc.GCBuffer
gcpcinfo.pcworkinfo.system_Statue = false; gcpcinfo.pcworkinfo.system_Statue = false;
gcpcinfo.pcworkinfo.work_Statue = 0; gcpcinfo.pcworkinfo.work_Statue = 0;
gcpcinfo.pcworkinfo.info_log = false;
gcpcinfo.pcworkinfo.error_log = false;
gcpcinfo.pcworkinfo.hmi_log = false;
gcpcinfo.moduleinfo.ip = ""; gcpcinfo.moduleinfo.ip = "";
gcpcinfo.outputinfo.port = 0; gcpcinfo.outputinfo.port = 0;
...@@ -118,6 +126,11 @@ namespace GcDevicePc.GCBuffer ...@@ -118,6 +126,11 @@ namespace GcDevicePc.GCBuffer
string wtd624x_gw = test.INIGetStringValue("WTD624X", "GW", null); string wtd624x_gw = test.INIGetStringValue("WTD624X", "GW", null);
string info_log = test.INIGetStringValue("Logs", "InfoLog", null);
string err_log = test.INIGetStringValue("Logs", "ErrLog", null);
string hmi_log = test.INIGetStringValue("Logs", "HmiLog", null);
string gc485 = test.INIGetStringValue("GC485", "COM", null); string gc485 = test.INIGetStringValue("GC485", "COM", null);
//string senddata = test.INIGetStringValue("StartUp", "SendData", null); //string senddata = test.INIGetStringValue("StartUp", "SendData", null);
...@@ -146,6 +159,21 @@ namespace GcDevicePc.GCBuffer ...@@ -146,6 +159,21 @@ namespace GcDevicePc.GCBuffer
{ {
gcpcinfo.outputinfo.port = Convert.ToByte(gc485); gcpcinfo.outputinfo.port = Convert.ToByte(gc485);
} }
if (!String.IsNullOrEmpty(info_log))
{
gcpcinfo.pcworkinfo.info_log = info_log.Equals("1") ? true : false;
}
if (!String.IsNullOrEmpty(err_log))
{
gcpcinfo.pcworkinfo.error_log = err_log.Equals("1") ? true : false;
}
if (!String.IsNullOrEmpty(hmi_log))
{
gcpcinfo.pcworkinfo.hmi_log = hmi_log.Equals("1") ? true : false;
}
} }
// gcpcinfo.pcworkinfo.RunType = 0; //运行类型 0 打开运行 1 智能运行 2 批处理 // gcpcinfo.pcworkinfo.RunType = 0; //运行类型 0 打开运行 1 智能运行 2 批处理
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.appstartup = new System.Windows.Forms.CheckBox(); this.appstartup = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.runquick = new System.Windows.Forms.CheckBox();
this.runbat = new System.Windows.Forms.CheckBox(); this.runbat = new System.Windows.Forms.CheckBox();
this.runsingle = new System.Windows.Forms.CheckBox(); this.runsingle = new System.Windows.Forms.CheckBox();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
...@@ -68,12 +67,15 @@ ...@@ -68,12 +67,15 @@
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.permin = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
this.groupBox7.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// groupBox1 // groupBox1
...@@ -252,7 +254,7 @@ ...@@ -252,7 +254,7 @@
this.groupBox2.Controls.Add(this.appstartup); this.groupBox2.Controls.Add(this.appstartup);
this.groupBox2.Location = new System.Drawing.Point(12, 131); this.groupBox2.Location = new System.Drawing.Point(12, 131);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(118, 47); this.groupBox2.Size = new System.Drawing.Size(104, 47);
this.groupBox2.TabIndex = 1; this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "开机配置"; this.groupBox2.Text = "开机配置";
...@@ -270,33 +272,19 @@ ...@@ -270,33 +272,19 @@
// //
// groupBox3 // groupBox3
// //
this.groupBox3.Controls.Add(this.runquick);
this.groupBox3.Controls.Add(this.runbat); this.groupBox3.Controls.Add(this.runbat);
this.groupBox3.Controls.Add(this.runsingle); this.groupBox3.Controls.Add(this.runsingle);
this.groupBox3.Location = new System.Drawing.Point(143, 131); this.groupBox3.Location = new System.Drawing.Point(122, 131);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(271, 49); this.groupBox3.Size = new System.Drawing.Size(164, 49);
this.groupBox3.TabIndex = 2; this.groupBox3.TabIndex = 2;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "开机自动运行"; this.groupBox3.Text = "开机自动运行";
// //
// runquick
//
this.runquick.AutoSize = true;
this.runquick.Enabled = false;
this.runquick.Location = new System.Drawing.Point(104, 20);
this.runquick.Name = "runquick";
this.runquick.Size = new System.Drawing.Size(72, 16);
this.runquick.TabIndex = 2;
this.runquick.Tag = "1";
this.runquick.Text = "快速运行";
this.runquick.UseVisualStyleBackColor = true;
this.runquick.CheckedChanged += new System.EventHandler(this.autorun_CheckedChanged);
//
// runbat // runbat
// //
this.runbat.AutoSize = true; this.runbat.AutoSize = true;
this.runbat.Location = new System.Drawing.Point(204, 20); this.runbat.Location = new System.Drawing.Point(89, 20);
this.runbat.Name = "runbat"; this.runbat.Name = "runbat";
this.runbat.Size = new System.Drawing.Size(60, 16); this.runbat.Size = new System.Drawing.Size(60, 16);
this.runbat.TabIndex = 1; this.runbat.TabIndex = 1;
...@@ -308,7 +296,7 @@ ...@@ -308,7 +296,7 @@
// runsingle // runsingle
// //
this.runsingle.AutoSize = true; this.runsingle.AutoSize = true;
this.runsingle.Location = new System.Drawing.Point(22, 20); this.runsingle.Location = new System.Drawing.Point(11, 20);
this.runsingle.Name = "runsingle"; this.runsingle.Name = "runsingle";
this.runsingle.Size = new System.Drawing.Size(72, 16); this.runsingle.Size = new System.Drawing.Size(72, 16);
this.runsingle.TabIndex = 0; this.runsingle.TabIndex = 0;
...@@ -476,11 +464,33 @@ ...@@ -476,11 +464,33 @@
this.label12.TabIndex = 0; this.label12.TabIndex = 0;
this.label12.Text = "设置IP:"; this.label12.Text = "设置IP:";
// //
// groupBox7
//
this.groupBox7.Controls.Add(this.permin);
this.groupBox7.Location = new System.Drawing.Point(297, 133);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(118, 47);
this.groupBox7.TabIndex = 4;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "状态记录";
//
// permin
//
this.permin.AutoSize = true;
this.permin.Location = new System.Drawing.Point(11, 18);
this.permin.Name = "permin";
this.permin.Size = new System.Drawing.Size(84, 16);
this.permin.TabIndex = 0;
this.permin.Text = "每分钟记录";
this.permin.UseVisualStyleBackColor = true;
this.permin.CheckedChanged += new System.EventHandler(this.permin_CheckedChanged);
//
// UserConfig // UserConfig
// //
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.ClientSize = new System.Drawing.Size(426, 354); this.ClientSize = new System.Drawing.Size(426, 354);
this.Controls.Add(this.groupBox7);
this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
...@@ -503,6 +513,8 @@ ...@@ -503,6 +513,8 @@
this.groupBox6.PerformLayout(); this.groupBox6.PerformLayout();
this.groupBox5.ResumeLayout(false); this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout(); this.groupBox5.PerformLayout();
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -530,7 +542,6 @@ ...@@ -530,7 +542,6 @@
private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox runbat; private System.Windows.Forms.CheckBox runbat;
private System.Windows.Forms.CheckBox runsingle; private System.Windows.Forms.CheckBox runsingle;
private System.Windows.Forms.CheckBox runquick;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label10;
...@@ -548,5 +559,7 @@ ...@@ -548,5 +559,7 @@
private System.Windows.Forms.TextBox localgw; private System.Windows.Forms.TextBox localgw;
private System.Windows.Forms.TextBox localip; private System.Windows.Forms.TextBox localip;
private System.Windows.Forms.Button changelocal; private System.Windows.Forms.Button changelocal;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.CheckBox permin;
} }
} }
\ No newline at end of file
...@@ -29,7 +29,6 @@ namespace GcDevicePc ...@@ -29,7 +29,6 @@ namespace GcDevicePc
{ {
string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StartUpFolder + "\\startup.ini"; string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StartUpFolder + "\\startup.ini";
INIOperation test = new INIOperation(file); INIOperation test = new INIOperation(file);
// string value;
int count = 0; int count = 0;
if ((sender as CheckBox).Checked == true) if ((sender as CheckBox).Checked == true)
...@@ -42,23 +41,19 @@ namespace GcDevicePc ...@@ -42,23 +41,19 @@ namespace GcDevicePc
if( int.Parse((sender as CheckBox).Tag.ToString()) == 0) if( int.Parse((sender as CheckBox).Tag.ToString()) == 0)
{ {
// MessageBox.Show("单次运行", "提示");
test.INIWriteValue(file, "StartUp", "打开系统", "1"); test.INIWriteValue(file, "StartUp", "打开系统", "1");
test.INIWriteValue(file, "StartUp", "运行类型", "0"); test.INIWriteValue(file, "StartUp", "运行类型", "0");
}else if( int.Parse((sender as CheckBox).Tag.ToString()) == 1) }else if( int.Parse((sender as CheckBox).Tag.ToString()) == 1)
{ {
// MessageBox.Show("快速运行", "提示");
test.INIWriteValue(file, "StartUp", "打开系统", "1"); test.INIWriteValue(file, "StartUp", "打开系统", "1");
test.INIWriteValue(file, "StartUp", "运行类型", "1"); test.INIWriteValue(file, "StartUp", "运行类型", "1");
}else if( int.Parse((sender as CheckBox).Tag.ToString()) == 2) }else if( int.Parse((sender as CheckBox).Tag.ToString()) == 2)
{ {
// MessageBox.Show("批处理", "提示");
test.INIWriteValue(file, "StartUp", "打开系统", "1"); test.INIWriteValue(file, "StartUp", "打开系统", "1");
test.INIWriteValue(file, "StartUp", "运行类型", "2"); test.INIWriteValue(file, "StartUp", "运行类型", "2");
}else }else
{ {
// MessageBox.Show("无", "提示");
test.INIWriteValue(file, "StartUp", "打开系统", "0"); test.INIWriteValue(file, "StartUp", "打开系统", "0");
test.INIWriteValue(file, "StartUp", "运行类型", "0"); test.INIWriteValue(file, "StartUp", "运行类型", "0");
} }
...@@ -72,7 +67,6 @@ namespace GcDevicePc ...@@ -72,7 +67,6 @@ namespace GcDevicePc
if (count == 3) if (count == 3)
{ {
//MessageBox.Show("无", "提示");
test.INIWriteValue(file, "StartUp", "打开系统", "0"); test.INIWriteValue(file, "StartUp", "打开系统", "0");
test.INIWriteValue(file, "StartUp", "运行类型", "0"); test.INIWriteValue(file, "StartUp", "运行类型", "0");
} }
...@@ -148,11 +142,12 @@ namespace GcDevicePc ...@@ -148,11 +142,12 @@ namespace GcDevicePc
INIOperation test = new INIOperation(file); INIOperation test = new INIOperation(file);
string MAC = test.INIGetStringValue("NetWorkConfig", "MAC地址", null); string MAC = test.INIGetStringValue("NetWorkConfig", "MAC地址", null);
string value = test.INIGetStringValue("StartUp", "自启动", null); string value = test.INIGetStringValue("StartUp", "自启动", null);
string opensys = test.INIGetStringValue("StartUp", "打开系统", null); string opensys = test.INIGetStringValue("StartUp", "打开系统", null);
string runtype = test.INIGetStringValue("StartUp", "运行类型", null); string runtype = test.INIGetStringValue("StartUp", "运行类型", null);
string info_log = test.INIGetStringValue("Logs", "InfoLog", null);
string err_log = test.INIGetStringValue("Logs", "ErrLog", null);
string hmi_log = test.INIGetStringValue("Logs", "HmiLog", null);
if (String.IsNullOrEmpty(MAC)) if (String.IsNullOrEmpty(MAC))
{ {
...@@ -177,9 +172,6 @@ namespace GcDevicePc ...@@ -177,9 +172,6 @@ namespace GcDevicePc
if(Convert.ToInt32(runtype) == 0) if(Convert.ToInt32(runtype) == 0)
{ {
this.runsingle.Checked = true; this.runsingle.Checked = true;
}else if(Convert.ToInt32(runtype) == 1)
{
this.runquick.Checked = true;
} }
else if (Convert.ToInt32(runtype) == 2) else if (Convert.ToInt32(runtype) == 2)
{ {
...@@ -187,6 +179,15 @@ namespace GcDevicePc ...@@ -187,6 +179,15 @@ namespace GcDevicePc
} }
} }
if (Convert.ToInt32(hmi_log) == 1)
{
this.permin.Checked = true;
}
else
{
this.permin.Checked = false;
}
if(globaldata.DeviceList.Count > 0) if(globaldata.DeviceList.Count > 0)
{ {
this.hmiip.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[0]).IpAddr; this.hmiip.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[0]).IpAddr;
...@@ -194,7 +195,6 @@ namespace GcDevicePc ...@@ -194,7 +195,6 @@ namespace GcDevicePc
this.hminm.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[0]).Netmask; this.hminm.Text = ((globaldata.DeviceInfo)globaldata.DeviceList[0]).Netmask;
} }
try try
{ {
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
...@@ -483,14 +483,39 @@ namespace GcDevicePc ...@@ -483,14 +483,39 @@ namespace GcDevicePc
Process.GetCurrentProcess().Kill(); Process.GetCurrentProcess().Kill();
} }
} }
} }
catch (Exception) catch (Exception)
{ {
MessageBox.Show("本机IP修改失败!", "提示"); MessageBox.Show("本机IP修改失败!", "提示");
} }
}
/// <summary>
/// 分钟数据记录开关
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void permin_CheckedChanged(object sender, EventArgs e)
{
string file = globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.StartUpFolder + "\\startup.ini";
try
{
INIOperation test = new INIOperation(file);
if (this.permin.Checked == true)
{
test.INIWriteValue(file, "Logs", "HmiLog", "0");
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmi_log = false;
} }
else
{
test.INIWriteValue(file, "Logs", "HmiLog", "1");
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.hmi_log = true;
}
}
catch
{
} }
}
}
} }
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