Ejemplo n.º 1
0
        private void subpanels_MouseUp(object sender, MouseEventArgs e)
        {
            Panel This = (Panel)sender;

            if ((e.X < 0) || (e.X > This.Width) || (e.Y < 0) || (e.Y > This.Height))
            {
                This.Tag = "";
                This.Refresh();
            }
            else
            {
                This.Tag = "Entered";
                This.Refresh();
                //Take Some Action now
                if (This.Name == "subPanel1")
                {
                    System.Threading.Thread.CurrentThread.Name = "CXPClient UI";

                    //MSR.LST.ConferenceXP.FMain.arguments = "";
                    FMain frmVirtualClassroom = new FMain();

                    FMain.InvokeSettingsArguments();

                    frmVirtualClassroom.Show();
                }
            }
        }
Ejemplo n.º 2
0
 static void ShowApp(object sender, EventArgs e)
 {
     mainForm.Show();
 }
Ejemplo n.º 3
0
        private static void OnAppIdle(object sender, EventArgs e)
        {
            if (applicationContext.MainForm == null)
            {
                Application.Idle -= new EventHandler(OnAppIdle);

                // 初始化ApplicationService.Current
                Service.ApplicationService.Current();

                System.Threading.Thread threadDb = new System.Threading.Thread(
                    new System.Threading.ThreadStart(TryConnectDB));
                threadDb.Start();

                try
                {
                    if (System.Configuration.ConfigurationSettings.AppSettings["NTier"] != null &&
                        System.Configuration.ConfigurationSettings.AppSettings["NTier"] == "1")
                    {
                        RemotingConfiguration.Configure("BenQGuru.eMES.Client.exe.config");
                    }
                }
                catch (Exception ex)
                {
                    string errorInfo = System.DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss") //error date & time
                                       + "\t" + ex.Message                                 //error message
                                       + "\t" + ex.Source                                  //error object name;
                                       + "\r\n" + ex.StackTrace;

                    UserControl.FileLog.FileLogOut("Client.log", errorInfo);
                }

                System.Diagnostics.Process pr = null;   //RunningInstance();
                if (pr == null)
                {
                    FMain mainForm = new FMain();
                    applicationContext.MainForm = mainForm;
                    Service.ApplicationService.Current().MainWindows = mainForm;
                    Application.DoEvents();
                    mainForm.Show();
                    if (appArguments != null && appArguments.Length > 0)
                    {
                        if (appArguments[0].ToUpper() == "AUTOLOGIN" && appArguments.Length >= 4)
                        {
                            FLogin flogin = new FLogin();
                            flogin.MdiParent              = mainForm;
                            flogin.ucLEUserCode.Value     = appArguments[1];
                            flogin.ucLEPassword.Text      = appArguments[2];
                            flogin.ucLEResourceCode.Value = appArguments[3];
                            flogin.ucBtnLogin_Click(null, EventArgs.Empty);

                            if (appArguments.Length >= 5)
                            {
                                FAutoTestConfig fautotest = new FAutoTestConfig();
                                fautotest.CheckAutoLaunchTest();
                            }
                        }
                        else if (appArguments[0].ToUpper() == "AUTOCOLLECT")
                        {
                            FAutoTestConfig fautotest = new FAutoTestConfig();
                            fautotest.LoadAutoCollectConfig();
                        }
                    }
                }
                else
                {
                    HandleRunningInstance(pr);
                }
                splashForm.Close();
                splashForm = null;
            }
        }