예제 #1
0
        public static UpdaterStartupSettings GetSettings(string[] args)
        {
            if (args.Length == 0 || args.All(string.IsNullOrEmpty))
            {
                return(null);
            }

            UpdaterStartupSettings startupSettings = new UpdaterStartupSettings {
                InstructionsFile = GetInstructionsArg(args)
            };

            return(startupSettings);
        }
예제 #2
0
파일: App.xaml.cs 프로젝트: lulzzz/Telimena
        private void App_Startup(object sender, StartupEventArgs e)
        {
            UpdaterStartupSettings settings = CommandLineArgumentParser.GetSettings(e.Args);
            MainWindow             mainWindow;

            if (settings == null)
            {
#if DEBUG
                mainWindow = new MainWindow(new UpdateInstructions()
                {
                    LatestVersion = "1.2.3.4"
                });
#else
                mainWindow = new MainWindow();
#endif
            }
            else
            {
                mainWindow = new MainWindow(settings);
            }

            mainWindow.Show();
        }
예제 #3
0
 public MainWindow(UpdaterStartupSettings updaterStartupSettings) : this(UpdateInstructionsReader.Read(updaterStartupSettings.InstructionsFile))
 {
 }