Ejemplo n.º 1
0
 private void HandleLauncherUpdate(StartupEventArgs e)
 {
     if (e.Args.Length == 2 && e.Args[0] == "update")
     {
         LauncherUpdateSteps current = (LauncherUpdateSteps)Enum.Parse(typeof(LauncherUpdateSteps), e.Args[1]);
         PerformUpdate(current);
     }
     else if (LauncherUpdateAvailable())
     {
         PerformUpdate(LauncherUpdateSteps.Downloading);
     }
 }
Ejemplo n.º 2
0
        private void PerformUpdate(LauncherUpdateSteps currentSteps)
        {
            switch (currentSteps)
            {
            case LauncherUpdateSteps.Downloading:
                DownloadUpdate();
                break;

            case LauncherUpdateSteps.Copying:     // Where currently being executed from somewhere
                ApplyUpdate();
                break;
            }
        }