protected override async void OnStartup(StartupEventArgs e) { CreateMutex(e); Utility.CreateFileFromResource(Constants.ConfigFilePath, Constants.ConfigResource); MainWindow = new MainWindow(); var window = new LauncherUpdate_View(); window.Show(); await Task.Delay(2000); if (await Launcher.CheckForUpdate()) { await Launcher.BeginUpdates(); } else { window.Close(); MainWindow.Show(); } Ultima.InitializePath(); Razor.InitializePath(); if (Ultima.IsInstalled()) { Updates.InitializeUpdates(); } }
public void Event_CheckInstallPlay() { if (Ultima.IsInstalled()) { ShowUOPlay = "Visible"; ShowUoInstall = "Collapsed"; } else { ShowUOPlay = "Collapsed"; ShowUoInstall = "Visible"; } }
public NavBar_ViewModel() { Messenger.Default.Register <string>(this, obj => { if (obj == "CheckPlayInstall") { Event_CheckInstallPlay(); } }); if (Ultima.IsInstalled()) { ShowUOPlay = "Visible"; ShowUoInstall = "Collapsed"; } else { ShowUOPlay = "Collapsed"; ShowUoInstall = "Visible"; } }