public Form1() { InitializeComponent(); comWorkWay.SelectedIndex = 0; comBaudRate.SelectedIndex = 0; ScanCom(); updateTxt = new UpdateTxt(UpdateTxtMethod); updateListBox = new UpdateListBox(UpdateListBoxMethod); }
public server() { updateTxt = new UpdateTxt(UpdateTxtMethod); InitializeComponent(); Thread thread = new Thread((ThreadStart) delegate { pipeServer.BeginWaitForConnection(WaitForConnectionCallback, pipeServer); }); thread.Start(); }
public FrmRemote() { InitializeComponent(); updateTxt = new UpdateTxt(SendMessage); deviceName = ""; deviceNo = ""; deviceStatus = 0; usbCode = ""; remoteAdd = ""; deviceReady = true; txtTimer = new System.Timers.Timer(500); txtTimer.Elapsed += new System.Timers.ElapsedEventHandler(txtTimer_Tick); //到达时间的时候执行事件; }
/******************************************************************/ public MainForm() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; mainForm = this; setting.Owner = this; button_Stop.Enabled = false; comboBox_Deepth.SelectedIndex = 1; comboBox_Directory.SelectedIndex = 1; updateTxt = new UpdateTxt(UpdateTxtMethod); }
public FrmMain() { InitializeComponent(); runBat(); updateTxt = new UpdateTxt(SendMessage); deviceTimer = new System.Timers.Timer(1000 * 30); deviceTimer.Elapsed += new System.Timers.ElapsedEventHandler(deviceTimer_Tick); //到达时间的时候执行事件; deviceTimer.AutoReset = true; //设置是执行一次(false)还是一直执行(true); msgTimer = new System.Timers.Timer(1000 * 30); //实例化Timer类,设置间隔时间为10000毫秒; msgTimer.Elapsed += new System.Timers.ElapsedEventHandler(msgTimer_Tick); //到达时间的时候执行事件; msgTimer.AutoReset = true; //设置是执行一次(false)还是一直执行(true); jsonMsg = ""; operatorStatus = 0; usbPort = ""; connectedSN = ""; waitedSN = ""; this.btnDisconnect.Enabled = false; this.btnConnect.Enabled = false; dtTest = DateTime.Now; th = new TestHelper(); dtTimeOut = DateTime.Now; }
private void Form1_Load(object sender, EventArgs e) { // 实例化委托 updateTxt = new UpdateTxt(UpdateTxtMethod); }
private void Form1_Load(object sender, EventArgs e) { updateTxt = new UpdateTxt(UpdateTxtMethod); try { Encoding code = Encoding.Default; StreamReader objReader = new StreamReader("ini.txt", code); string sLine = ""; while (sLine != null) { sLine = objReader.ReadLine(); if (sLine != null) { comboBox2.Items.Add(sLine); } } } catch(Exception a) { } }
private void Form1_Load(object sender, EventArgs e) { updateTxt = new UpdateTxt(UpdateTxtMethod); updateListBox = new UpdateListBox(UpdateListBoxMethod); }