diff --git a/GitInstaller/GitInstaller/GitInstaller.csproj b/GitInstaller/GitInstaller/GitInstaller.csproj index 89714e7..84e606b 100644 --- a/GitInstaller/GitInstaller/GitInstaller.csproj +++ b/GitInstaller/GitInstaller/GitInstaller.csproj @@ -71,6 +71,9 @@ MSBuild:Compile Designer + + ManualWindow.xaml + @@ -89,6 +92,10 @@ MainWindow.xaml Code + + Designer + MSBuild:Compile + diff --git a/GitInstaller/GitInstaller/Installer.cs b/GitInstaller/GitInstaller/Installer.cs index 770f340..6481d8f 100644 --- a/GitInstaller/GitInstaller/Installer.cs +++ b/GitInstaller/GitInstaller/Installer.cs @@ -95,13 +95,6 @@ async void GetVersions() Releases.Add(robj); } } - - //Old - //if(!Array.Exists(Settings.Ignored_Tags, x => x == robj.Tag)) - //{ - // idcount++; - // Releases.Add(robj); - //} } _window.cb_versions.SelectedIndex = 0; @@ -109,7 +102,7 @@ async void GetVersions() _window.prog_loading.IsIndeterminate = false; if(Releases.Count < 1) { - MessageBox.Show("No releases found for this repository! Can't progress with the installation..."); + MessageBox.Show("No releases found for this repository! Can't progress with the installation...", "Warning!", MessageBoxButton.OK, MessageBoxImage.Warning); Environment.Exit(2); return; } @@ -178,21 +171,6 @@ async void DownloadAssets() assetcount++; } } - - //Old - //if (!Array.Exists(Settings.Ignored_Files, x => x == asset.Filename)) - //{ - // string installfname = Path.Combine(_installdir, asset.Filename); - // await client.DownloadFileTaskAsync(new Uri(asset.DownloadUrl), installfname); - // downloadedfiles.Add(installfname); - // assetcount++; - // _window.WriteLog($"Asset downloaded... ({assetcount}/{maxcount})"); - //} - //else - //{ - // _window.WriteLog($"Asset \"{asset.Filename}\" will be ignored..."); - // assetcount++; - //} } catch (Exception ex) { diff --git a/GitInstaller/GitInstaller/MainWindow.xaml.cs b/GitInstaller/GitInstaller/MainWindow.xaml.cs index d0afd6f..51717b6 100644 --- a/GitInstaller/GitInstaller/MainWindow.xaml.cs +++ b/GitInstaller/GitInstaller/MainWindow.xaml.cs @@ -40,7 +40,12 @@ public MainWindow() } else { - MessageBox.Show("The Installer can't progress because the settings file couldn't loaded!"); + ManualWindow mwin = new ManualWindow(); + if(mwin.ShowDialog() == true) + { + return; + } + MessageBox.Show("The Installer can't progress because the settings file couldn't loaded!", "Warning!", MessageBoxButton.OK, MessageBoxImage.Warning); Environment.Exit(1); } } @@ -66,7 +71,7 @@ private void UninstallClicked(object sender, RoutedEventArgs e) if (result == System.Windows.Forms.DialogResult.OK) { if (!Uninstaller.DoUninstall(fbd.SelectedPath)) - System.Windows.Forms.MessageBox.Show("Couldn't uninstall the software, read the log for more informations!"); + MessageBox.Show("Couldn't uninstall the software, read the log for more informations!", "Warning!", MessageBoxButton.OK, MessageBoxImage.Warning); else WriteLog("Software was uninstalled successfuly!"); } @@ -109,7 +114,7 @@ private void VersionChanged(object sender, SelectionChangedEventArgs e) { if (ex.HResult != -2146233086) { - MessageBox.Show("There was an unexpected error while changing the version!"); + MessageBox.Show("There was an unexpected error while changing the version!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error); throw ex; } } diff --git a/GitInstaller/GitInstaller/ManualWindow.xaml b/GitInstaller/GitInstaller/ManualWindow.xaml new file mode 100644 index 0000000..c5249f3 --- /dev/null +++ b/GitInstaller/GitInstaller/ManualWindow.xaml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + +