Commit f043db03 authored by liu's avatar liu

小细节修改

parent 2f1c2e54
using System;
using System.ComponentModel;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
using GcDevicePc.ProThread;
using GcDevicePc.CK_UI;
using GcDevicePc.Common;
using System.Threading;
using GcDevicePc.CK_UI;
using Ini.Net;
using System.Runtime.InteropServices;
using GcDevicePc.ConfigMethod;
using GcDevicePc.Controls;
using GcDevicePc.GCBuffer;
using GcDevicePc.IniParam;
using GcDevicePc.ProThread;
using Ini.Net;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace GcDevicePc
{
......@@ -21,7 +21,7 @@ namespace GcDevicePc
{
#region 相关变量
//private int childFormNumber = 0;
private static FormUser _userForm; //用户界面
private static FormUser _userForm; //用户界面
private static Formdebug _debugForm; //调试界面
private static EPCTips _EPCTipsForm; //EPC报警界面
......@@ -34,7 +34,7 @@ namespace GcDevicePc
private string Formstr;//窗口名称
private string statestr;//状态信息
// private Color stateColor=new Color();//状态颜色;
// private Color stateColor=new Color();//状态颜色;
private bool IsStateColor = false;
System.DateTime startTime; //系统启动时间
TimeSpan timespan;
......@@ -106,9 +106,9 @@ namespace GcDevicePc
CKVocAnalyzer.Config.Instance.ReadAxisRange();
LogOperate.LogInit.Instance.path = CKVocAnalyzer.GlobalCKV.FolderLog;
LogOperate.LogInit.Instance.Init();
CKVocAnalyzer.GlobalCKV.tcpservice.tcpStart(CKVocAnalyzer.GlobalCKV.hostadd, CKVocAnalyzer.GlobalCKV.tcpport);
CKVocAnalyzer.GlobalCKV.tcpservice.tcpStart(CKVocAnalyzer.GlobalCKV.hostadd, CKVocAnalyzer.GlobalCKV.tcpport);
//自动删除
SpaceM.SpaceThread sthread = new SpaceM.SpaceThread(CKVocAnalyzer.GlobalCKV.HistDataPath,CKVocAnalyzer.GlobalCKV.SpaceSize,CKVocAnalyzer.GlobalCKV.SpaceTimes);
SpaceM.SpaceThread sthread = new SpaceM.SpaceThread(CKVocAnalyzer.GlobalCKV.HistDataPath, CKVocAnalyzer.GlobalCKV.SpaceSize, CKVocAnalyzer.GlobalCKV.SpaceTimes);
sthread.SpaceStart();
Log.Info("System Init Success");
......@@ -330,14 +330,14 @@ namespace GcDevicePc
_EPCTipsForm = new EPCTips();
_EPCTipsForm.MdiParent = this;
_EPCTipsForm.Location = new Point(0, ClientSize.Height- _EPCTipsForm.Height);
_EPCTipsForm.Location = new Point(0, ClientSize.Height - _EPCTipsForm.Height);
_EPCTipsForm.Hide();
// debugForm.Show();
Formstr = "用户界面";
startTime = DateTime.Now;
// toolStripStatusLabeSystme.Text = string.Format("状态:{0}", Formstr);
// toolStripStatusLabeSystme.Text = string.Format("状态:{0}", Formstr);
timespan = DateTime.Now - startTime;
toolStripStatusLabelusertime.Text = String.Format("运行时间:{0}", timespan.Days.ToString() + "天" + timespan.Hours.ToString() + "时" + timespan.Minutes.ToString() + "分" + timespan.Seconds.ToString() + "秒");
......@@ -351,7 +351,7 @@ namespace GcDevicePc
{
SetMainFormMethodName(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName.Substring(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName.LastIndexOf("\\") + 1));
}
title.Width = this.ClientSize.Width - 5;
title.Location = new Point(0, 0);
......@@ -367,7 +367,7 @@ namespace GcDevicePc
autopensys();
this.SizeChanged += new EventHandler(this.MDIBase_SizeChanged);
(title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOrdBtnClicked += PictureMenu1_PMOrdBtnClicked;
(title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptBtnClicked += PictureMenu1_PMOptBtnClicked;
(title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMSysBtnClicked += PictureMenu1_PMSysBtnClicked;
......@@ -376,7 +376,7 @@ namespace GcDevicePc
//pictureMenu1.PMSysBtnClicked += PictureMenu1_PMSysBtnClicked;
//点火接口
_userForm.autofire += new Fireport(fireupopt);
//this.a = false;
epcs = false;
timer2.Start();
......@@ -522,7 +522,7 @@ namespace GcDevicePc
LMessageBox dialog = new LMessageBox(this.Location, this.Size, true, "停止系统", "确定停止系统吗?", LMessageBox.MessageBoxPosition.MBP_Center);
//if (dialog.ShowDialog() == DialogResult.OK)
//{
//}
//DialogResult dr = MessageBox.Show("确定停止系统吗?", "停止系统", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly);
......@@ -651,7 +651,7 @@ namespace GcDevicePc
globaldata.starttimer = 0x7FFFFFFF;
IniFile IniParser = new IniFile(tmpfile);
if(IniParser.KeyExists("StartUp", "打开系统"))
if (IniParser.KeyExists("StartUp", "打开系统"))
opensys = IniParser.ReadInteger("StartUp", "打开系统");
if ((opensys == 1 && globaldata.m_hmibuffer.gcinfo.methodstatus == 0) || globaldata.m_hmibuffer.gcinfo.methodstatus != 0)
......@@ -665,7 +665,7 @@ namespace GcDevicePc
// hmistatus_opensys();
//}
}
catch(Exception ex)
catch (Exception ex)
{
Log.Error(ex.Message);
}
......@@ -759,12 +759,12 @@ namespace GcDevicePc
}
}
catch(Exception ex)
catch (Exception ex)
{
Log.Error(ex.Message);
}
}
/// <summary>
/// 更新显示栏信息
/// </summary>
......@@ -794,17 +794,17 @@ namespace GcDevicePc
HmiStatus.Text = String.Format("状态:{0}", statestr);
timespan = System.DateTime.Now - startTime;
toolStripStatusLabelusertime.Text = String.Format("运行时间:{0}",
toolStripStatusLabelusertime.Text = String.Format("运行时间:{0}",
timespan.Days.ToString() + "天" + timespan.Hours.ToString() + "时" + timespan.Minutes.ToString() + "分" + timespan.Seconds.ToString() + "秒");
// Trace.WriteLine(string.Format("时间{0},状态{1}", getIdleTick(),LandIn.Island),"sys");
//Console.WriteLine(t2.ToString());
//监视界面活动
if (getIdleTick()>60*30 && LandIn.Island)
if (getIdleTick() > 60 * 30 && LandIn.Island)
{
if (_userForm != null)
{
Formstr = "用户窗口";
......@@ -813,7 +813,7 @@ namespace GcDevicePc
}
LandIn.Island = false;
SetMenu(LandIn.Island);
Trace.WriteLine("进入自动销户","sys");
Trace.WriteLine("进入自动销户", "sys");
}
}
[StructLayout(LayoutKind.Sequential)]
......@@ -836,7 +836,7 @@ namespace GcDevicePc
LASTINPUTINFO vLastInputInfo = new LASTINPUTINFO();
vLastInputInfo.cbSize = Marshal.SizeOf(vLastInputInfo);
if (!GetLastInputInfo(ref vLastInputInfo)) return 0;
return (Environment.TickCount - (long)vLastInputInfo.dwTime)/1000;
return (Environment.TickCount - (long)vLastInputInfo.dwTime) / 1000;
}
public void SendPCCMD(bool flag)
......@@ -981,7 +981,7 @@ namespace GcDevicePc
catch
{
}
}
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
......@@ -991,11 +991,11 @@ namespace GcDevicePc
this.workProgress.Visible = false;
autoResetEvent.Set();
}
catch
catch
{
}
}
private void WaitHMIFree()
......@@ -1006,7 +1006,7 @@ namespace GcDevicePc
this.workProgress.Value = 0;
this.backgroundWorker1.RunWorkerAsync();
}
}
private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
......@@ -1074,7 +1074,7 @@ namespace GcDevicePc
catch
{
}
}
private void backgroundWorker2_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
......@@ -1087,7 +1087,7 @@ namespace GcDevicePc
catch
{
}
}
private void WaitHMIWork()
......@@ -1099,12 +1099,12 @@ namespace GcDevicePc
this.backgroundWorker2.RunWorkerAsync();
}
}
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
this.workProgress.Value = e.ProgressPercentage;
}
private void backgroundWorker2_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
this.workProgress.Value = e.ProgressPercentage;
......@@ -1196,7 +1196,7 @@ namespace GcDevicePc
SetMainFormMethodName(tmpname);
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, tmpname.ToString());
if(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 2)
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_BATMethodName = Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, tmpname.ToString());
globaldata.m_profileMethod.SetMethodFullName(globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName);
......@@ -1207,7 +1207,7 @@ namespace GcDevicePc
globaldata.m_profileMethod.GetColTableElseAllPara();
globaldata.m_profileMethod.GetFidAllPara();
globaldata.m_profileMethod.GetTcdAllPara();
globaldata.m_profileMethod.GetAuxiliaryAllPara();
globaldata.m_profileMethod.GetAuxiliaryAllPara();
}
else
{
......@@ -1217,15 +1217,15 @@ namespace GcDevicePc
catch
{
Log.Error("System Init Failed");
Log.Error("System Init Failed");
}
statestr = "设备联机";
IsStateColor=true;
IsStateColor = true;
hmiopt = new HMIControl(globaldata.connection_ip, globaldata.datamodbusport);
mymodbus = new GcDataTh(globaldata.connection_ip, globaldata.datamodbusport);
......@@ -1252,7 +1252,7 @@ namespace GcDevicePc
Slave485test = new GCModbusSlave485(globaldata.m_pcbuffer.gcpcinfo.outputinfo.port, 9600);
Slave485test.CModbusSlave485Init(1, 2, 3, 5);
}
}
catch (Exception e)
{
......@@ -1265,7 +1265,7 @@ namespace GcDevicePc
IsStateColor = false;
}
}
catch(Exception ex)
catch (Exception ex)
{
Log.Error(ex.Message);
}
......@@ -1518,7 +1518,7 @@ namespace GcDevicePc
case 4:
case 5:
//if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue == 0)
// startbtn();
// startbtn();
break;
case 6:
case 7:
......@@ -1685,7 +1685,7 @@ namespace GcDevicePc
// (this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 0;
//}
if (flag!=10 && flag != 0)
if (flag != 10 && flag != 0)
{
OSflag = true;
......@@ -1719,7 +1719,7 @@ namespace GcDevicePc
if (data[0] == 1)
{
tips += "检测器通道一报警,报警码:"+ data[1].ToString();
tips += "检测器通道一报警,报警码:" + data[1].ToString();
}
if (data[2] == 1)
{
......@@ -1756,7 +1756,7 @@ namespace GcDevicePc
_EPCTipsForm.MyProperty = tips;
_EPCTipsForm.Show();
}
}
void Common_HeadInfo()
......@@ -1772,7 +1772,7 @@ namespace GcDevicePc
string tmpFileName;
tmpFileName = globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_MethodName;
SetMainFormMethodNameTH(tmpFileName.Substring(tmpFileName.LastIndexOf("\\") + 1) + " 单次运行");
}
void QuickRun_HeadInfo()
......@@ -1810,23 +1810,23 @@ namespace GcDevicePc
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_BATMethodName = System.IO.Path.Combine(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, runtable.INIGetStringValue("运行表", key[num], "无"));
}
}
catch(Exception ex)
catch (Exception ex)
{
Trace.Write(ex);
}
}
private void MDIBase_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult dr = new QuitForm().ShowDialog();
uint ret = 0;
uint count = 0;
if (dr == DialogResult.OK) //停止系统并退出
{
......@@ -1879,8 +1879,8 @@ namespace GcDevicePc
// }
//}
}
try
......@@ -1964,10 +1964,10 @@ namespace GcDevicePc
try
{
if(globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue)
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue)
{
MessageBox.Show("系统开启中......");
return ;
return;
}
if (!String.IsNullOrEmpty(globaldata.connection_ip))
......@@ -2040,9 +2040,9 @@ namespace GcDevicePc
}
}
Console.WriteLine(""+ OSflag);
Console.WriteLine("" + OSflag);
}
catch(Exception ex)
catch (Exception ex)
{
Trace.Write(ex);
}
......@@ -2083,7 +2083,7 @@ namespace GcDevicePc
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
FileServerClient rtclient = new FileServerClient();
initret = rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
initret = rtclient.WtClientInit(globaldata.connection_ip, globaldata.fileserverport);
if (initret == 1)
{
......@@ -2130,7 +2130,7 @@ namespace GcDevicePc
rtclient.WtClientClose();
globaldata.m_pcbuffer.gcpcinfo.pcfileinfo.cur_RunTab = Path.Combine(folder, runtablename);
}
}
return ret;
}
......@@ -2144,7 +2144,7 @@ namespace GcDevicePc
if (!String.IsNullOrEmpty(globaldata.connection_ip))
{
hmiopt.SetBatCount(count);
SendSTDCMD();
SendSTDCMD();
}
}
......@@ -2170,7 +2170,7 @@ namespace GcDevicePc
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.system_Statue = false;
globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.work_Statue = 0;
}
Console.WriteLine(""+ OSflag);
Console.WriteLine("" + OSflag);
}
/// <summary>
......@@ -2184,7 +2184,7 @@ namespace GcDevicePc
{
hmiopt.HAirSwitch(val);
}
private void UserLoginMenu_Click(object sender, EventArgs e)
{
......@@ -2353,7 +2353,7 @@ namespace GcDevicePc
// f_auxtool.Show();
// }
//}
}
UserConfig confu;
......@@ -2374,7 +2374,7 @@ namespace GcDevicePc
{
confu.Activate();
}
}
RunTables f_runtablef;
private void MethodBatMenu_Click(object sender, EventArgs e)
......@@ -2517,7 +2517,7 @@ namespace GcDevicePc
}
}
MethodMain myformbb;
private void MethodBrowseMenuItem_Click(object sender, EventArgs e)
......@@ -2594,7 +2594,7 @@ namespace GcDevicePc
}
}
Console.WriteLine(" 后 "+ globaldata.m_hmibuffer.gcinfo.methodstatus);
Console.WriteLine(" 后 " + globaldata.m_hmibuffer.gcinfo.methodstatus);
}
WaveTotalForm total;
......@@ -2675,7 +2675,7 @@ namespace GcDevicePc
{
hist.Activate();
}
}
catch (Exception ex)
{
......@@ -2761,7 +2761,7 @@ namespace GcDevicePc
{
showConfig.Activate();
}
}
catch (Exception ex)
{
......@@ -2942,7 +2942,7 @@ namespace GcDevicePc
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.RunType == 0)
{
hmiopt.WriteOpenVal();
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 4;
}
cancelbtn();
......@@ -2986,11 +2986,12 @@ namespace GcDevicePc
/// <param name="boolrun"></param>
private void AutoAdjustRun(bool boolrun)
{
if(boolrun)
if (boolrun)
{
CurveDisPlay.curdisp.SetAutoAdjust();
}else
}
else
{
CurveDisPlay.curdisp.StopAutoAdjust();
}
......@@ -3011,12 +3012,12 @@ namespace GcDevicePc
{
SharedSpace.MControl.errstr = null;
SharedSpace.MControl.zhouqi = globaldata.m_dpbuffer.ShowList.showtime.alltime;
if(SharedSpace.MControl.zhouqi*SharedSpace.MControl.runcount<=SharedSpace.MControl.dateend)
if (SharedSpace.MControl.zhouqi * SharedSpace.MControl.runcount <= SharedSpace.MControl.dateend)
{
if (RunTableOpt(SharedSpace.MControl.path, SharedSpace.MControl.Name)==1&& SharedSpace.MControl.MethodType==1)
if (RunTableOpt(SharedSpace.MControl.path, SharedSpace.MControl.Name) == 1 && SharedSpace.MControl.MethodType == 1)
{
Trace.WriteLine(string.Format("开始校准{0},{1}", SharedSpace.MControl.zhouqi, SharedSpace.MControl.runcount), "sys");
SharedSpace.MControl.SetRun = true;//仪器进入校准环境
......@@ -3030,9 +3031,10 @@ namespace GcDevicePc
CurveDisPlay.forcePurge = true;
AutoAdjust = DateTime.Now.AddSeconds(SharedSpace.MControl.dateend);
}
}else
}
else
{
SharedSpace.MControl.errstr = "校准时间不够";
SharedSpace.MControl.SetOut = false;
......@@ -3056,11 +3058,11 @@ namespace GcDevicePc
SharedSpace.MControl.SetRun = false;
if (SharedSpace.Data.typesint == 2)
{
CurveDisPlay.curdisp.ConfingAdjust();
CurveDisPlay.curdisp.ConfingAdjust();
}
Trace.WriteLine("校准结束", "sys");
}
if(SharedSpace.MControl.MethodType==2)
if (SharedSpace.MControl.MethodType == 2)
{
SharedSpace.MControl.SetOut = false;
SharedSpace.MControl.SetRun = false;
......@@ -3076,8 +3078,8 @@ namespace GcDevicePc
if (SharedSpace.MControl.forceEnd && SharedSpace.MControl.SetOut && SharedSpace.MControl.SetRun)
{
SharedSpace.MControl.IsEnd = false;
if (RunTableOpt(SharedSpace.MControl.defaultPath, SharedSpace.MControl.defaultName) == 1&&SharedSpace.MControl.MethodType == 1)
if (RunTableOpt(SharedSpace.MControl.defaultPath, SharedSpace.MControl.defaultName) == 1 && SharedSpace.MControl.MethodType == 1)
{
SharedSpace.MControl.SetOut = false;
SharedSpace.MControl.SetRun = false;
......@@ -3107,7 +3109,7 @@ namespace GcDevicePc
private void timer2_Tick(object sender, EventArgs e)
{
epct++;
if (epct>20)
if (epct > 20)
{
if (epcs == true)
{
......@@ -3123,7 +3125,7 @@ namespace GcDevicePc
tips_Show(globaldata.m_hmibuffer.gcinfo.EPCStatus);
}
}
}
private void changeVsi_Click(object sender, EventArgs e)
......
......@@ -199,7 +199,22 @@ namespace GcDevicePc.ProThread
}
}
public void testr12(ushort addr, ushort statue)
{
int ret;
int count = 0;
ret = m_modbus.WriteSingleCoil(addr, statue, this.strIP, this.netPost);
while (ret != 0)
{
count++;
ret = m_modbus.WriteSingleCoil(addr, statue, this.strIP, this.netPost);
Thread.Sleep(100);
if (count == 3)
break;
}
}
/// <summary>
/// 点火
/// </summary>
......
......@@ -12,24 +12,24 @@ namespace GcDevicePc
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
bool createNew;
Application.Run(new TestForm());
//Application.Run(new TestForm());
{
//using (System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out createNew))
//{
// if (createNew)
// {
// Application.Run(new StartForm());
// mutex.ReleaseMutex();
// }
// else
// {
// MessageBox.Show("应用程序已经在运行中...");
// System.Threading.Thread.Sleep(1000);
// Application.Exit();
// System.Diagnostics.Process.GetCurrentProcess().Kill();
// // System.Environment.Exit(1);
// }
//}
using (System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out createNew))
{
if (createNew)
{
Application.Run(new StartForm());
mutex.ReleaseMutex();
}
else
{
MessageBox.Show("应用程序已经在运行中...");
System.Threading.Thread.Sleep(1000);
Application.Exit();
System.Diagnostics.Process.GetCurrentProcess().Kill();
// System.Environment.Exit(1);
}
}
}
}
}
......
......@@ -33,6 +33,8 @@
this.gcTitle1 = new GcDevicePc.Controls.GCTitle();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// button1
......@@ -47,7 +49,7 @@
//
// button2
//
this.button2.Location = new System.Drawing.Point(250, 364);
this.button2.Location = new System.Drawing.Point(241, 318);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 1;
......@@ -83,11 +85,27 @@
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.Button4_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(241, 274);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 21);
this.textBox1.TabIndex = 5;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(357, 274);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 21);
this.textBox2.TabIndex = 5;
//
// TestForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 583);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.gcTitle1);
......@@ -96,6 +114,7 @@
this.Name = "TestForm";
this.Text = "TestForm";
this.ResumeLayout(false);
this.PerformLayout();
}
......@@ -106,5 +125,7 @@
private Controls.GCTitle gcTitle1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
}
}
\ No newline at end of file
using GcDevicePc.Common;
using GcDevicePc.ConfigMethod;
using GcDevicePc.Controls;
using GcDevicePc.ProThread;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -115,16 +116,20 @@ namespace GcDevicePc
}
HMIControl hMI = new HMIControl("172.16.1.58", 502);
private void button2_Click(object sender, EventArgs e)
{
//MessageBox.Show("asd");
//this.pictureMenu1.PMOptbtnstatus = 4;
//(this.title.Controls.Find("pictureMenu1", true)[0] as PictureMenu).PMOptbtnstatus = 3;
//tinfliang
//LMessageBox box = new LMessageBox();
//box.Show(100, 100, this.Location, true, "1230", "3214", LMessageBox.MessageBoxType.MBT_ButtonOK);
hMI.testr12(Convert.ToUInt16(textBox1.Text), Convert.ToUInt16(textBox2.Text));
}
private void Button3_Click(object sender, EventArgs e)
......
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