RefreshDHCP() public static method

public static RefreshDHCP ( string device_id ) : void
device_id string
return void
Ejemplo n.º 1
0
        private void refreshText()
        {
            string tmp = RefComm.ReadLog();



            if (tmp.Length != 0)
            {
                if (textBox3.Text.Length > 1024)
                {
                    textBox3.Text = "";
                    textBox3.ScrollToCaret();
                }
                textBox3.ScrollToCaret();//自动滚屏
                textBox3.AppendText(tmp);
                textBox3.ScrollToCaret();
            }
            //自动更新IP
            if (tmp.Contains("Success"))
            {
                NetworkInterfaceAvaliable.RefreshDHCP(NetworkInterfaceAvaliable.adapters_dict[comboBox1.Text]);
                textBox3.AppendText("IP Refreshed.\r\n");
                textBox3.ScrollToCaret();//自动滚屏
            }
        }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (NetworkInterfaceAvaliable.adapters_dict.ContainsKey(Cfg.device))
     {
         NetworkInterfaceAvaliable.RefreshDHCP(NetworkInterfaceAvaliable.adapters_dict[Cfg.device]);
     }
     else
     {
         MessageBox.Show("你没有选择网卡!");
         this.Close();
     }
 }