Example #1
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            int Result;
            int Rack = System.Convert.ToInt32(Loader._Instance.TxtRack.Text);
            int Slot = System.Convert.ToInt32(Loader._Instance.TxtSlot.Text);

            Result = Client.ConnectTo(Loader._Instance.TxtIP.Text, Rack, Slot);
            Client.ShowResult(Result);
            if (Result == 0)
            {
                Loader._Instance.output.Text           = Loader._Instance.output.Text + " PDU Negotiated : " + Client.PduSizeNegotiated.ToString();
                Loader._Instance.TxtIP.Enabled         = false;
                Loader._Instance.TxtRack.Enabled       = false;
                Loader._Instance.TxtSlot.Enabled       = false;
                Loader._Instance.ConnectBtn.Enabled    = false;
                Loader._Instance.DisconnectBtn.Enabled = true;
                Loader._Instance.Status.Value          = 100;
            }
        }
Example #2
0
        private void ConnectBtn_Click(object sender, EventArgs e)
        {
            int Result;
            int Rack = System.Convert.ToInt32(TxtRack.Text);
            int Slot = System.Convert.ToInt32(TxtSlot.Text);

            Result = Client.ConnectTo(TxtIP.Text, Rack, Slot);
            Client.ShowResult(Result);
            if (Result == 0)
            {
                output.Text           = output.Text + " PDU Negotiated : " + Client.PduSizeNegotiated.ToString();
                TxtIP.Enabled         = false;
                TxtRack.Enabled       = false;
                TxtSlot.Enabled       = false;
                ConnectBtn.Enabled    = false;
                DisconnectBtn.Enabled = true;
                Status.Value          = 100;
                Connected             = true;
            }
        }