Esempio n. 1
0
 private void ChangeKeepRunningState(bool enable)
 {
     if (enable)
     {
         StartupManager.EnableKeepRunning();
     }
     else
     {
         StartupManager.DisableKeepRunning();
     }
 }
Esempio n. 2
0
        private static void UpdateAutoQcStarter(object sender, DoWorkEventArgs e)
        {
            if (!Settings.Default.KeepAutoQcRunning)
            {
                return;
            }

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                if (IsFirstRun())
                {
                    // First time running a newer version of the application
                    LogInfo($"Updating {AutoQcStarterExe} shortcut.");
                    StartupManager.UpdateAutoQcStarterInStartup();
                }
                else if (!StartupManager.IsAutoQcStarterRunning())
                {
                    // AutoQCStarter should be running but it is not
                    LogInfo($"{AutoQcStarter} is not running. It should be running since Keep AutoQC Loader running is checked. Starting it up...");
                    StartupManager.UpdateAutoQcStarterInStartup();
                }
            }
        }