예제 #1
0
파일: Program.cs 프로젝트: gamdolist/qwine
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     if (!IsConnected())
         using (var f = new DBLogonUI())
             f.ShowDialog();
     else
         Application.Run(new TouchUI());
 }
예제 #2
0
파일: Program.cs 프로젝트: gamdolist/qwine
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (!CekConnection())
            {
                using (var f = new DBLogonUI())
                {
                    f.ShowDialog();
                }
            }
            else
            {
                Application.Run(new MainUI());
            }
        }
예제 #3
0
파일: Program.cs 프로젝트: gamdolist/qwine
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            bool isConnected = false;
            int nCount = 0;

            // show Waiting
            using (var fsplash = new QWaitingWidget("Version " +
                Application.ProductVersion + "\r\n\r\n" +
                "Preparing application\r\nPlease wait!"))
            {
                fsplash.WindowState = FormWindowState.Maximized;
                fsplash.Show();
                fsplash.SetBigCircle();
                Application.DoEvents();

                // 5 phase before setting);
                while (!isConnected && nCount < 3)
                {
                    // connecting
                    isConnected = IsConnected(false);
                    nCount++;

                    if (!isConnected)
                    {
                        // set splash message
                        fsplash.SetMessage(
                            string.Format("Connection failed! Re-trying connecting to server\r\nPHASE {0}", nCount));
                        Application.DoEvents();

                        // delay
                        for (int i = 0; i <= 250; i++)
                        {
                            Thread.Sleep(10);
                            Application.DoEvents();
                        }
                    }
                    else
                    {
                        fsplash.SetMessage(string.Format("Connection successfully !"));
                        Application.DoEvents();
                        Thread.Sleep(250);
                    }
                }
            }

            // if still not connected, show db configuration
            if (!isConnected)
                using (var f = new DBLogonUI())
                    f.ShowDialog();
            else // in connected show main screen
                Application.Run(new MainScreen());
        }
예제 #4
0
파일: MainUI.cs 프로젝트: gamdolist/qwine
 /// <summary>
 /// Ts the keymap.
 /// </summary>
 private void TDatabase()
 {
     if (InvokeRequired)
     {
         var o = new DelegateThis(TDatabase);
         Invoke(o);
     }
     else
     {
         var f = new DBLogonUI {MdiParent = this};
         f.Show();
     }
 }