Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Get_Host_IP_Address();
            IPAddress ip_Checked;
            string    IP_address_for_check;

            IP_address_for_check = textBox2.Text;
            bool ValidateIP = IPAddress.TryParse(IP_address_for_check, out ip_Checked);

            Updateinterface?.Invoke(this, EventArgs.Empty);

            if (ValidateIP)
            {
                try
                {
                    GetMACaddress.Worker(ip_Checked.ToString());
                    ping_node.Qty_of_tries = (int)numericPing.Value;
                    ping_node._IPaddress   = ip_Checked;
                    ping_node.Start();
                }
                catch
                {
                    MessageBox.Show("Fault of pinging IP address");
                }
            }
            else
            {
                MessageBox.Show("This is not a valide ip address, enter in format XXX.XXX.XXX.XXX");
            }
        }
Exemple #2
0
 private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
     Netwrok_Interface.Full_List_of_interface = checkBox1.Checked;
     Updateinterface?.Invoke(this, EventArgs.Empty);
 }