void UC_PowerControlConfig_GetFunctionCardPowerEvent(object sender, EventArgs e) { if (this.InvokeRequired) { while (!this.IsHandleCreated) { if (this == null || this.IsDisposed) { return; } } FunctionCardPowerEventDel cs = new FunctionCardPowerEventDel(UC_PowerControlConfig_GetFunctionCardPowerEvent); this.BeginInvoke(cs, new object[] { sender, e }); } else { _vm.CmdInitialize.Execute(null); bindingSource1.ResetBindings(false); if (_vm.PowerConfig == null || _vm.PowerConfig.Count == 0) { crystalButton_OK.Enabled = false; } else { crystalButton_OK.Enabled = true; } this.Invalidate(); CloseProcessForm(); } }
void UC_PowerControlConfig_GetFunctionCardPowerEvent(object sender, EventArgs e) { if (this.InvokeRequired) { while (!this.IsHandleCreated) { if (this == null || this.IsDisposed) { return; } } FunctionCardPowerEventDel cs = new FunctionCardPowerEventDel(UC_PowerControlConfig_GetFunctionCardPowerEvent); this.BeginInvoke(cs,new object[]{sender,e}); } else { _vm.CmdInitialize.Execute(null); bindingSource1.ResetBindings(false); if (_vm.PowerConfig == null || _vm.PowerConfig.Count == 0) { crystalButton_OK.Enabled = false; } else { crystalButton_OK.Enabled = true; } this.Invalidate(); CloseProcessForm(); } }