internal void SetCommandButtonEnabled(System.Windows.Forms.Button pCommandButton, bool pEnabledStatus) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (pCommandButton.InvokeRequired) { SetCommandButtonEnabledCallback d = new SetCommandButtonEnabledCallback(SetCommandButtonEnabled); this.Invoke(d, new object[] { pCommandButton, pEnabledStatus }); } else { pCommandButton.Enabled = pEnabledStatus; } }
internal void SetCommandButtonEnabled(System.Windows.Forms.Button pCommandButton,bool pEnabledStatus) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (pCommandButton.InvokeRequired) { SetCommandButtonEnabledCallback d = new SetCommandButtonEnabledCallback(SetCommandButtonEnabled); this.Invoke(d, new object[] { pCommandButton,pEnabledStatus }); } else { pCommandButton.Enabled = pEnabledStatus; } }