Esempio 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();//自动滚屏
            }
        }
Esempio n. 2
0
 static void Main()
 {
     NetworkInterfaceAvaliable.List();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Cfg.Load();
     Application.Run(new Form1());
     RefComm.StopAuthThread();
     return;
 }
Esempio n. 3
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();
     }
 }