ChangeActiveRoot() public method

public ChangeActiveRoot ( DeviceForm devForm ) : bool
devForm DeviceForm
return bool
Esempio n. 1
0
 private void DeviceChangeActiveRoot(object sender, EventArgs e)
 {
     if (InvokeRequired)
     {
         try
         {
             Invoke((Delegate) new DeviceChangeActiveRootDelegate(DeviceChangeActiveRoot), sender, e);
         }
         catch { }
     }
     else
     {
         m_mutex.WaitOne();
         DeviceForm devForm = sender as DeviceForm;
         if (devForm != null)
         {
             comPortTreeForm.ChangeActiveRoot(devForm);
         }
         m_mutex.ReleaseMutex();
     }
 }