private void NextBtn_Click(object sender, RoutedEventArgs e) { // if u know how to make it better, contact me switch (MainFrame.Content.GetType().Name.ToString()) { case "WelcomePage": MainFrame.Navigate(licenseAgreementPage); break; case "LicenseAgreementPage": MainFrame.Navigate(installTypePage); break; case "InstallTypePage": MainFrame.Navigate(installLocationPage); break; case "InstallLocationPage": LauncherInstaller launcherInstaller = new LauncherInstaller(installLocationPage.installPathTextBox.Text, installationProgressPage); break; default: break; } }
private void Window_Initialized(object sender, EventArgs e) { BL_Core.LanguageManager.Init(); string[] ConsoleArgs = Environment.GetCommandLineArgs(); bool isSilent = false; foreach (string argument in ConsoleArgs) { if (argument.StartsWith("--")) { Console.WriteLine("Recieved argument: " + argument); if (argument == "--silent") { isSilent = true; } if (argument == "--beta") { LauncherInstaller.IsBeta = true; } } } if (isSilent) { Application.Current.MainWindow.Hide(); LauncherInstaller launcherInstaller = new LauncherInstaller(Directory.GetCurrentDirectory(), installationProgressPage, isSilent); } }
private void Window_Initialized(object sender, EventArgs e) { string[] ConsoleArgs = Environment.GetCommandLineArgs(); foreach (string argument in ConsoleArgs) { if (argument.StartsWith("--")) { Console.WriteLine("Recieved argument: " + argument); // hide window and launch update process if (argument == "--silent") { Application.Current.MainWindow.Hide(); LauncherInstaller launcherInstaller = new LauncherInstaller(Directory.GetCurrentDirectory(), installationProgressPage, true); } } } }