Checking EZPPClient Files after download, suggest repair if errors where found
This commit is contained in:
parent
6dc54f175e
commit
2e795ad2e4
|
@ -81,12 +81,12 @@ namespace EZPPClient_Installer
|
||||||
UpdateInstallButton(false);
|
UpdateInstallButton(false);
|
||||||
|
|
||||||
|
|
||||||
List<string> outdatedFiles = DownloadUtil.FilesToDownload(osuEZPPPath);
|
List<string> outdatedFiles = DownloadUtil.FilesToDownload(osuEZPPPath, false);
|
||||||
|
|
||||||
if (!IsEmpty(outdatedFiles))
|
if (!IsEmpty(outdatedFiles))
|
||||||
{
|
{
|
||||||
InstallButton.Content = "Update";
|
|
||||||
UpdateInstallButton(true);
|
UpdateInstallButton(true);
|
||||||
|
InstallButton.Content = "Update";
|
||||||
linkFoldersCheckbox.IsEnabled = false;
|
linkFoldersCheckbox.IsEnabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ namespace EZPPClient_Installer
|
||||||
|
|
||||||
private void UpdateInstallButton(bool enable)
|
private void UpdateInstallButton(bool enable)
|
||||||
{
|
{
|
||||||
InstallButton.IsEnabled = enable;
|
InstallButton.Content = enable ? "Install" : "Reinstall";
|
||||||
linkFoldersCheckbox.IsEnabled = enable;
|
linkFoldersCheckbox.IsEnabled = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ namespace EZPPClient_Installer
|
||||||
|
|
||||||
string EZPPFolder = osuFolder + @"\EZPPClient";
|
string EZPPFolder = osuFolder + @"\EZPPClient";
|
||||||
|
|
||||||
if (!InstallButton.Content.Equals("Update"))
|
if (InstallButton.Content.Equals("Install"))
|
||||||
{
|
{
|
||||||
if (linkFoldersCheckbox.IsChecked.Value)
|
if (linkFoldersCheckbox.IsChecked.Value)
|
||||||
{
|
{
|
||||||
|
@ -302,7 +302,7 @@ namespace EZPPClient_Installer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<string> filesToDownload = DownloadUtil.FilesToDownload(EZPPFolder);
|
List<string> filesToDownload = DownloadUtil.FilesToDownload(EZPPFolder, InstallButton.Content.Equals("Reinstall"));
|
||||||
|
|
||||||
Visibility prevInstallBtnVis = InstallButton.Visibility;
|
Visibility prevInstallBtnVis = InstallButton.Visibility;
|
||||||
Visibility prevUninstallBtnVis = Uninstall_Button.Visibility;
|
Visibility prevUninstallBtnVis = Uninstall_Button.Visibility;
|
||||||
|
@ -326,31 +326,61 @@ namespace EZPPClient_Installer
|
||||||
Download_Text.Visibility = Visibility.Hidden;
|
Download_Text.Visibility = Visibility.Hidden;
|
||||||
Download_Progressbar.Visibility = Visibility.Hidden;
|
Download_Progressbar.Visibility = Visibility.Hidden;
|
||||||
|
|
||||||
_ = new ContentDialog()
|
|
||||||
{
|
|
||||||
Title = "Success!",
|
|
||||||
Content = InstallButton.Content.Equals("Update") ? "The EZPPClient was successfully updated!" : "The EZPPClient was successfully installed!",
|
|
||||||
PrimaryButtonText = "Yaaay :3"
|
|
||||||
}.ShowAsync();
|
|
||||||
SystemSounds.Asterisk.Play();
|
|
||||||
this.Focus();
|
|
||||||
|
|
||||||
Uninstall_Button.Visibility = Visibility.Visible;
|
Uninstall_Button.Visibility = Visibility.Visible;
|
||||||
UpdateInstallButton(false);
|
UpdateInstallButton(false);
|
||||||
|
|
||||||
string osuEZPPPath = folderTextbox.Text + @"\EZPPClient";
|
string osuEZPPPath = folderTextbox.Text + @"\EZPPClient";
|
||||||
List<string> outdatedFiles = DownloadUtil.FilesToDownload(osuEZPPPath);
|
List<string> outdatedFiles = DownloadUtil.FilesToDownload(osuEZPPPath, false);
|
||||||
|
|
||||||
if (!IsEmpty(outdatedFiles))
|
if (!IsEmpty(outdatedFiles))
|
||||||
{
|
{
|
||||||
InstallButton.Content = "Update";
|
|
||||||
UpdateInstallButton(true);
|
UpdateInstallButton(true);
|
||||||
|
InstallButton.Content = "Update";
|
||||||
linkFoldersCheckbox.IsEnabled = false;
|
linkFoldersCheckbox.IsEnabled = false;
|
||||||
|
string updateText = "It seems like the installation was faulty, please hit Update to repair the EZPPClient.";
|
||||||
|
|
||||||
|
switch (InstallButton.Content)
|
||||||
|
{
|
||||||
|
case "Update":
|
||||||
|
updateText = "It seems like the update was faulty, please hit Update to repair the EZPPClient.";
|
||||||
|
break;
|
||||||
|
case "Reinstall":
|
||||||
|
updateText = "It seems like the reinstallation was faulty, please hit Update to repair the EZPPClient.";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ = new ContentDialog()
|
||||||
|
{
|
||||||
|
Title = "Hmmm..",
|
||||||
|
Content = updateText,
|
||||||
|
PrimaryButtonText = "Okay qwq"
|
||||||
|
}.ShowAsync();
|
||||||
|
SystemSounds.Asterisk.Play();
|
||||||
|
this.Focus();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InstallButton.Content = "Install";
|
string updateText = "The EZPPClient was successfully installed!";
|
||||||
linkFoldersCheckbox.IsEnabled = false;
|
|
||||||
|
switch (InstallButton.Content)
|
||||||
|
{
|
||||||
|
case "Update":
|
||||||
|
updateText = "The EZPPClient was successfully updated!";
|
||||||
|
break;
|
||||||
|
case "Reinstall":
|
||||||
|
updateText = "The EZPPClient was successfully reinstalled!";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ = new ContentDialog()
|
||||||
|
{
|
||||||
|
Title = "Success!",
|
||||||
|
Content = updateText,
|
||||||
|
PrimaryButtonText = "Yaaay :3"
|
||||||
|
}.ShowAsync();
|
||||||
|
SystemSounds.Asterisk.Play();
|
||||||
|
this.Focus();
|
||||||
|
UpdateInstallButton(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -394,16 +424,15 @@ namespace EZPPClient_Installer
|
||||||
UpdateInstallButton(false);
|
UpdateInstallButton(false);
|
||||||
|
|
||||||
string osuEZPPPath = folderTextbox.Text + @"\EZPPClient";
|
string osuEZPPPath = folderTextbox.Text + @"\EZPPClient";
|
||||||
List<string> outdatedFiles = DownloadUtil.FilesToDownload(osuEZPPPath);
|
List<string> outdatedFiles = DownloadUtil.FilesToDownload(osuEZPPPath, false);
|
||||||
|
|
||||||
if (!IsEmpty(outdatedFiles))
|
if (!IsEmpty(outdatedFiles))
|
||||||
{
|
{
|
||||||
InstallButton.Content = "Update";
|
|
||||||
UpdateInstallButton(true);
|
UpdateInstallButton(true);
|
||||||
|
InstallButton.Content = "Update";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InstallButton.Content = "Install";
|
|
||||||
UpdateInstallButton(true);
|
UpdateInstallButton(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user