Inheritance: System.Windows.Forms.Form
Beispiel #1
0
        static void Main()
        {
            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                formMain formMain = new formMain(false);
                string   password = formMain.XmlHelper.configGet("password");

                if (password.Trim() != "")
                {
                    popupPassword popupPassword = new popupPassword(password);
                    Application.Run(popupPassword);
                    if (!popupPassword.auth)
                    {
                        return;
                    }
                }

                Application.Run(new formMain(true));
            }
            else
            {
                // send our Win32 message to make the currently running instance
                // jump on top of all the other windows
                NativeMethods.PostMessage((IntPtr)0xffff, NativeMethods.WmShowMe, IntPtr.Zero, IntPtr.Zero);
            }
        }
Beispiel #2
0
        static void Main()
        {
            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                formMain mainform = new formMain(false);
                string password = mainform.XmlConfigGet("password");

                if (password.Trim() != "")
                {
                    popupPassword passwordopup = new popupPassword(password);
                    Application.Run(passwordopup);
                    if (!passwordopup.auth) return;
                }

                Application.Run(new formMain(true));
            }
            else
            {
                // send our Win32 message to make the currently running instance
                // jump on top of all the other windows
                NativeMethods.PostMessage((IntPtr) NativeMethods.HWND_BROADCAST, NativeMethods.WM_SHOWME, IntPtr.Zero, IntPtr.Zero);
            }
        }
Beispiel #3
0
        static void Main()
        {
            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                formMain mainform = new formMain(false);
                string   password = mainform.XmlConfigGet("password");

                if (password.Trim() != "")
                {
                    popupPassword passwordopup = new popupPassword(password);
                    Application.Run(passwordopup);
                    if (!passwordopup.auth)
                    {
                        return;
                    }
                }

                Application.Run(new formMain(true));
            }
            else
            {
                // send our Win32 message to make the currently running instance
                // jump on top of all the other windows
                NativeMethods.PostMessage((IntPtr)NativeMethods.HWND_BROADCAST, NativeMethods.WM_SHOWME, IntPtr.Zero, IntPtr.Zero);
            }
        }