Пример #1
0
 void dhcpRenew_Click(object sender, EventArgs e)
 {
     try
     {
         DisableRenew();
         Cursor.Current = Cursors.WaitCursor;
         ThreadPool.QueueUserWorkItem(delegate(object o)
         {
             m_nic.DhcpRelease();
             m_nic.Refresh();
             RefreshProps();
             m_nic.DhcpRenew();
             Thread.Sleep(5000);
             m_nic.Refresh();
             RefreshProps();
             EnableRenew();
         });
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }