diff --git a/GitInstaller/GitInstaller.sln b/GitInstaller/GitInstaller.sln index a4773ae..8b986f4 100644 --- a/GitInstaller/GitInstaller.sln +++ b/GitInstaller/GitInstaller.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.30320.27 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitInstaller", "GitInstaller\GitInstaller.csproj", "{6B88A56A-98E2-450D-A059-65BD18919AE1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitInstallerNET5", "..\GitInstallerNET5\GitInstallerNET5\GitInstallerNET5.csproj", "{40E2DF0D-A017-4EBD-844A-92708E425293}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {6B88A56A-98E2-450D-A059-65BD18919AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU {6B88A56A-98E2-450D-A059-65BD18919AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU {6B88A56A-98E2-450D-A059-65BD18919AE1}.Release|Any CPU.Build.0 = Release|Any CPU + {40E2DF0D-A017-4EBD-844A-92708E425293}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40E2DF0D-A017-4EBD-844A-92708E425293}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40E2DF0D-A017-4EBD-844A-92708E425293}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40E2DF0D-A017-4EBD-844A-92708E425293}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/GitInstaller/GitInstaller/GitInstaller.csproj b/GitInstaller/GitInstaller/GitInstaller.csproj index 84e606b..4f865ac 100644 --- a/GitInstaller/GitInstaller/GitInstaller.csproj +++ b/GitInstaller/GitInstaller/GitInstaller.csproj @@ -71,11 +71,18 @@ MSBuild:Compile Designer + + LicenseWindow.xaml + ManualWindow.xaml + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/GitInstaller/GitInstaller/Installer.cs b/GitInstaller/GitInstaller/Installer.cs index 50e4424..c4ac1a5 100644 --- a/GitInstaller/GitInstaller/Installer.cs +++ b/GitInstaller/GitInstaller/Installer.cs @@ -120,11 +120,30 @@ async void GetVersions() /// The installation directory internal void StartInstallation(int releaseindex, string installdir) { - _window.bt_install.IsEnabled = false; - _installrelease = Releases[releaseindex]; - _window.WriteLog("Starting installation of release \"" + _installrelease.Tag + "\" to \"" + installdir + "\"..."); - _installdir = installdir; - DownloadAssets(); + if(Settings.ShowLicense) + { + LicenseWindow licenseWindow = new LicenseWindow(); + if (licenseWindow.ShowDialog() == true) + { + _window.bt_install.IsEnabled = false; + _installrelease = Releases[releaseindex]; + _window.WriteLog("Starting installation of release \"" + _installrelease.Tag + "\" to \"" + installdir + "\"..."); + _installdir = installdir; + DownloadAssets(); + } + else + { + _window.WriteLog("You need to accept the license to proceed with the installation."); + } + } + else + { + _window.bt_install.IsEnabled = false; + _installrelease = Releases[releaseindex]; + _window.WriteLog("Starting installation of release \"" + _installrelease.Tag + "\" to \"" + installdir + "\"..."); + _installdir = installdir; + DownloadAssets(); + } } /// diff --git a/GitInstaller/GitInstaller/LicenseWindow.xaml b/GitInstaller/GitInstaller/LicenseWindow.xaml new file mode 100644 index 0000000..f5b77ce --- /dev/null +++ b/GitInstaller/GitInstaller/LicenseWindow.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + Loading License + Please wait... + + +