示例#1
0
        private void _checkforLocalbridge1()
        {
            DataTable _bl1 = BridgeList.bridgeList();

            Data.bridgelist = new List <string>();
            // _bl1.Clear();

            for (int i = 0; i <= _bl1.Rows.Count - 1; i++)
            {
                Data.bridgelist.Add(_bl1.Rows[i][2].ToString());
                // comboBox1.Items.Add(Data.bridgelist[i]);  <-----this was on seceond form
            }
            if (Data.bridgelist.Count > 1)
            {
                Data.bridgeExists = true;
            }
            else
            {
                Data.bridgeExists = false;
            }
            if (Data.bridgeExists)
            {
                AddLocalBridgeButton.Enabled = false;
            }
            ;
            if (!Data.bridgeExists)
            {
                AddLocalBridgeButton.Enabled = true;
            }
            ;
            return;
        }
示例#2
0
        private void AddLocalBridgeButton_Click(object sender, EventArgs e)
        {
            _cmd   _fr  = new _cmd();
            string _esc = "\"" + L_LocalBridgeBox.Text + "\"";

            // _fr.Execmd("localhost:5555", "server", " /Password:pirkon12","BridgeDelete", "Bridge /Device:" + "\"" + L_LocalBridgeBox.Text + "\"");
            _fr.Execmd("localhost:5555", "server", " BridgeCreate", " Bridge /Device:" + "\"" + L_LocalBridgeBox.Text + "\"", " /Password:pirkon12");
            MessageBox.Show("Local Bridge Added.");
            BridgeList.bridgeList();
            AvailableInterfaces.Items.Clear();
            AvailableInterfaces.SelectedItems.Clear();
            for (int i = 0; i < AvailableInterfaces.CheckedItems.Count; i++)
            {
                AvailableInterfaces.SetItemChecked(AvailableInterfaces.CheckedIndices[i], false);
            }

            // AvailableInterfaces.SetItemChecked(AvailableInterfaces.CheckedIndices[0], false);
            _LocalBridge();
        }
示例#3
0
        private void _checkforLocalbridge()
        {
            DataTable _bl1 = BridgeList.bridgeList();

            Data.bridgelist = new List <string>();
            for (int i = 0; i <= _bl1.Rows.Count - 1; i++)
            {
                Data.bridgelist.Add(_bl1.Rows[i][2].ToString());

                // comboBox1.Items.Add(Data.bridgelist[i]);  <-----this was on seceond form
            }

            if (Data.bridgelist.Count > 1)
            {
                Data.bridgeExists      = true;
                NetworkConnection.Text = Data._bridgeWindowsname;
                return;
            }
            else
            {
                Data.bridgeExists = false;
            }
        }