Ejemplo n.º 1
0
 private void btn_OK_Click(object sender, System.EventArgs e)
 {
     this.cl = new OPCclient();
     try
     {
         int num = this.cl.Connect(this.tb_IPAddrServer.Text, this.tb_NameServer.Text, 1000);
         if (num != 0)
         {
             throw new System.Exception(this.cl.ErrTxt);
         }
         this.cl.Disconnect();
         base.DialogResult = System.Windows.Forms.DialogResult.OK;
     }
     catch (System.Exception e2)
     {
         Program.showErrorMessage(e2, this);
         base.DialogResult = System.Windows.Forms.DialogResult.None;
     }
     finally
     {
         this.cl = null;
     }
 }
Ejemplo n.º 2
0
 internal Items(ItemsData items, OPCclient client)
 {
     this._client = client;
     this._items  = items;
 }