public virtual void CloseForm() { if (Plugins[ConfigItem.Url] != null && (Plugins[ConfigItem.Url] as Form) != null) { Form theForm = (Plugins[ConfigItem.Url] as Form); if (theForm.InvokeRequired) { Delegate d = new WinFormHelper.InvodeMethodhandler(WinFormHelper.InvokeMethod); theForm.Invoke(d, new object[] { theForm, "Close", new object[] { } }); } else { theForm.Close(); } } }
protected void ShowFormWindow(Form theForm) { if (theForm.InvokeRequired) { Delegate d = new WinFormHelper.InvodeMethodhandler(WinFormHelper.InvokeMethod); theForm.Invoke(d, new object[] { theForm, "Show", new object[] { } }); try { theForm.Invoke(d, new object[] { theForm, "Activate", new object[] { } }); } catch { } } else { theForm.Show(); try { theForm.Activate(); } catch { } } }
protected void ShowFormWindow(Form theForm) { if (theForm.InvokeRequired) { Delegate d = new WinFormHelper.InvodeMethodhandler(WinFormHelper.InvokeMethod); theForm.Invoke(d, new object[] { theForm, "Show", new object[] { } }); try { theForm.Invoke(d, new object[] { theForm, "Activate", new object[] { } }); } catch { } } else { theForm.Show(); try { theForm.Activate(); } catch { } } }
public virtual void CloseForm() { if (Plugins[ConfigItem.Url] != null && (Plugins[ConfigItem.Url] as Form) != null) { Form theForm = (Plugins[ConfigItem.Url] as Form); if (theForm.InvokeRequired) { Delegate d = new WinFormHelper.InvodeMethodhandler(WinFormHelper.InvokeMethod); theForm.Invoke(d, new object[] { theForm, "Close", new object[] { } }); } else { theForm.Close(); } } }