public static void StartSplash()
 {
     if ((bool)SEBClientInfo.getSebSetting("createNewDesktop")["createNewDesktop"])
     {
         SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
     }
     SebWindowsClientMain.splash = new SEBSplashScreen();
     Application.Run((Form)SebWindowsClientMain.splash);
 }
コード例 #2
0
 /// ----------------------------------------------------------------------------------------
 /// <summary>
 /// Reset desktop to the default one which was active before starting SEB.
 /// </summary>
 /// <returns>true if succeed</returns>
 /// ----------------------------------------------------------------------------------------
 public static void ResetSEBDesktop()
 {
     // Switch to Default Desktop
     if (sessionCreateNewDesktop)
     {
         Logger.AddInformation("Showing Original Desktop");
         SEBDesktopController.Show(SEBClientInfo.OriginalDesktop.DesktopName);
         Logger.AddInformation("Setting original Desktop as current");
         SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
         Logger.AddInformation("Closing New Dekstop");
         SEBClientInfo.SEBNewlDesktop.Close();
     }
 }
コード例 #3
0
        public static void StartSplash()
        {
            // Set the threads desktop to the new desktop if "Create new Desktop" is activated
            if ((Boolean)SEBClientInfo.getSebSetting(SEBSettings.KeyCreateNewDesktop)[SEBSettings.KeyCreateNewDesktop])
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
            }

            // Instance a splash form given the image names
            splash = new SEBSplashScreen();
            // Run the form
            Application.Run(splash);
        }
 public static void ResetSEBDesktop()
 {
     if (!SebWindowsClientMain.sessionCreateNewDesktop)
     {
         return;
     }
     Logger.AddInformation("Showing Original Desktop", (object)null, (Exception)null, (string)null);
     SEBDesktopController.Show(SEBClientInfo.OriginalDesktop.DesktopName);
     Logger.AddInformation("Setting original Desktop as current", (object)null, (Exception)null, (string)null);
     SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
     Logger.AddInformation("Closing New Dekstop", (object)null, (Exception)null, (string)null);
     SEBClientInfo.SEBNewlDesktop.Close();
 }
コード例 #5
0
 public static void StartLoading()
 {
     if ((bool)SEBClientInfo.getSebSetting("createNewDesktop")["createNewDesktop"] || SEBClientInfo.CreateNewDesktopOldValue)
     {
         SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
     }
     else
     {
         SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
     }
     SEBLoading.loading = new SEBLoading();
     Application.Run((Form)SEBLoading.loading);
 }
コード例 #6
0
 public static void StartSplash()
 {
     if (SEBClientInfo.SEBNewlDesktop != null && (bool)SEBClientInfo.getSebSetting("createNewDesktop")["createNewDesktop"])
     {
         SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
     }
     else
     {
         SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
     }
     SEBSplashScreen.splash = new SEBSplashScreen();
     Application.Run((Form)SEBSplashScreen.splash);
 }
コード例 #7
0
        /// <summary>
        /// Call via separate thread
        /// var thread = new Thread(SEBLoading.StartSplash);
        /// thread.Start();
        /// </summary>
        public static void StartSplash()
        {
            // Set the threads desktop to the new desktop if "Create new Desktop" is activated
            if (SEBClientInfo.SEBNewlDesktop != null && (Boolean)SEBClientInfo.getSebSetting(SEBSettings.KeyCreateNewDesktop)[SEBSettings.KeyCreateNewDesktop])
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
            }
            else
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
            }

            // Instance a splash form given the image names
            splash = new SEBSplashScreen();
            splash.ShowDialog();
        }
コード例 #8
0
        /// <summary>
        /// Call via separate thread
        /// var thread = new Thread(SEBLoading.StartSplash);
        /// thread.Start();
        /// </summary>
        static public void StartSplash()
        {
            // Set the threads desktop to the new desktop if "Create new Desktop" is activated
            if (false)
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
            }
            else
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
            }

            // Instance a splash form given the image names
            splash = new SEBSplashScreen();
            // Run the form
            Application.Run(splash);
        }
コード例 #9
0
ファイル: SEBLoading.cs プロジェクト: t00/seb-win
        /// <summary>
        /// Call via separate thread
        /// var thread = new Thread(SEBLoading.StartLoading);
        /// thread.Start();
        /// </summary>
        static public void StartLoading()
        {
            // Set the threads desktop to the new desktop if "Create new Desktop" is activated
            if ((Boolean)SEBClientInfo.getSebSetting(SEBSettings.KeyCreateNewDesktop)[SEBSettings.KeyCreateNewDesktop] || SEBClientInfo.CreateNewDesktopOldValue)
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
            }
            else
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
            }

            // Instance a loading screen form given the image names
            loading = new SEBLoading();
            // Run the form
            Application.Run(loading);
        }
コード例 #10
0
        /// <summary>
        /// Call via separate thread
        /// var thread = new Thread(SEBLoading.StartLoading);
        /// thread.Start();
        /// </summary>
        public static void StartLoading()
        {
            SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);

            // Set the threads desktop to the new desktop if "Create new Desktop" is activated
            if ((Boolean)SEBClientInfo.getSebSetting(SEBSettings.KeyCreateNewDesktop)[SEBSettings.KeyCreateNewDesktop] || SEBClientInfo.CreateNewDesktopOldValue)
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop);
            }
            else
            {
                SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
            }

            loading = new SEBLoading();
            loading.ShowDialog();
        }
コード例 #11
0
 /// ----------------------------------------------------------------------------------------
 /// <summary>
 /// Reset desktop to the default one which was active before starting SEB.
 /// </summary>
 /// <returns>true if succeed</returns>
 /// ----------------------------------------------------------------------------------------
 public static void ResetSEBDesktop()
 {
     // Switch to Default Desktop
     if (sessionCreateNewDesktop)
     {
         Logger.AddInformation("Showing Original Desktop");
         SEBDesktopController.Show(SEBClientInfo.OriginalDesktop.DesktopName);
         Logger.AddInformation("Setting original Desktop as current");
         SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
         Logger.AddInformation("Closing New Dekstop");
         SEBClientInfo.SEBNewlDesktop.Close();
     }
     else
     {
         //If you kill the explorer shell you don't need this!
         //SetVisibility(true);
     }
 }
コード例 #12
0
        /// ----------------------------------------------------------------------------------------
        /// <summary>
        /// Create and initialize SEB client settings and check system compatibility.
        /// This method needs to be executed only once when SEB first starts
        /// (not when reconfiguring).
        /// </summary>
        /// <returns>true if succeed</returns>
        /// ----------------------------------------------------------------------------------------
        public static bool InitSebSettings()
        {
            Logger.AddInformation("Attempting to InitSebSettings");

            // If loading of a .seb file isn't in progress and client settings aren't set yet
            if (_loadingSebFile == false && clientSettingsSet == false)
            {
                // Set SebClient configuration
                if (!SEBClientInfo.SetSebClientConfiguration())
                {
                    SEBMessageBox.Show(SEBUIStrings.ErrorCaption, SEBUIStrings.ErrorWhenOpeningSettingsFile, MessageBoxIcon.Error, MessageBoxButtons.OK);
                    Logger.AddError("Error when opening the file KiteStudentPortalSettings.seb!", null, null);
                    return(false);
                }
                clientSettingsSet = true;
                Logger.AddInformation("SEB client configuration set in InitSebSettings().", null, null);
            }

            // Check system version
            if (!SEBClientInfo.SetSystemVersionInfo())
            {
                SEBMessageBox.Show(SEBUIStrings.ErrorCaption, SEBUIStrings.OSNotSupported, MessageBoxIcon.Error, MessageBoxButtons.OK);
                Logger.AddError("Unknown OS. Exiting SEB.", null, null);
                return(false);
            }

            //on NT4/NT5 ++ a new desktop is created
            if (SEBClientInfo.IsNewOS)
            {
                sessionCreateNewDesktop = (Boolean)SEBClientInfo.getSebSetting(SEBSettings.KeyCreateNewDesktop)[SEBSettings.KeyCreateNewDesktop];
                if (sessionCreateNewDesktop)
                {
                    SEBClientInfo.OriginalDesktop = SEBDesktopController.GetCurrent();
                    SEBDesktopController OriginalInput = SEBDesktopController.OpenInputDesktop();

                    SEBClientInfo.SEBNewlDesktop = SEBDesktopController.CreateDesktop(SEBClientInfo.SEB_NEW_DESKTOP_NAME);
                    SEBDesktopController.Show(SEBClientInfo.SEBNewlDesktop.DesktopName);
                    if (!SEBDesktopController.SetCurrent(SEBClientInfo.SEBNewlDesktop))
                    {
                        Logger.AddError("SetThreadDesktop failed! Looks like the thread has hooks or windows in the current desktop.", null, null);
                        SEBDesktopController.Show(SEBClientInfo.OriginalDesktop.DesktopName);
                        SEBDesktopController.SetCurrent(SEBClientInfo.OriginalDesktop);
                        SEBClientInfo.SEBNewlDesktop.Close();
                        SEBMessageBox.Show(SEBUIStrings.createNewDesktopFailed, SEBUIStrings.createNewDesktopFailedReason, MessageBoxIcon.Error, MessageBoxButtons.OK);

                        return(false);
                    }
                    SEBClientInfo.DesktopName = SEBClientInfo.SEB_NEW_DESKTOP_NAME;
                }
                else
                {
                    SEBClientInfo.OriginalDesktop = SEBDesktopController.GetCurrent();
                    SEBClientInfo.DesktopName     = SEBClientInfo.OriginalDesktop.DesktopName;
                    //If you kill the explorer shell you don't need this!
                    //SebWindowsClientForm.SetVisibility(false);
                }
            }

            Logger.AddInformation("Successfully InitSebSettings");
            return(true);
        }