Exemplo n.º 1
0
        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();
                }
            }
        }
Exemplo n.º 2
0
        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 { }
            }
        }
Exemplo n.º 3
0
        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 { }
            }
        }
Exemplo n.º 4
0
        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();
                }
            }
        }