Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     OPCRaW.connOPcserver("localhost", "KEPware.KEPServerEx.V4");
     OPCRaW.OPCServerADDgroup("one", "Channel1.Device1.123");
     gonext         = false;
     timer1.Enabled = true;
 }
Exemple #2
0
 private void disconn()
 {
     kill = true;
     ///停止后台线程触发
     while (backgroundWorker1.IsBusy)
     {
         //backgroundWorker1.CancelAsync();
         Thread.Sleep(3000);
     }
     ///等待线程处理完成
     OPCRaW.DisConnectOPCServerOfBCNetS7();      ///执行服务器断开操作
     kill = false;
 }
Exemple #3
0
        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            return;

            if (kill == true)
            {
                OPCRaW.DisConnectOPCServerOfBCNetS7();      ///执行服务器断开操作
                textBox1.Text = "---";
                textBox2.Text = "---";
                textBox3.Text = "---";
                textBox4.Text = "---";
                textBox5.Text = "---";
                textBox6.Text = "---";
                textBox7.Text = "---";
                this.Cursor   = Cursors.Default;
                kill          = false;
            }
        }
Exemple #4
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     OPCRaW.ReadRunTimeData(ref a, ref qua, ref reserved, ref time, ref type, ref hclient, ref hashcode);
     gonext = false;
 }
Exemple #5
0
 private void treadtest()
 {
     OPCRaW.ReadRunTimeData(ref a, ref qua, ref reserved, ref time, ref type, ref hclient, ref hashcode);
     gonext = false;
 }