Skip to content

Commit

Permalink
Remove Verify Hash Refactor Classes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCarbon committed Jun 20, 2024
1 parent 62aafd9 commit 60705fd
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 909 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void Button_Game_Verify_Files_Click(object sender, EventArgs e)
{
if (FunctionStatus.IsVerifyHashDisabled)
{
ButtonsColorSet(Button_Game_Verify_Files, 3, true);
ButtonsColorSet(Button_Verify_Scan, 3, true);
if (!File.Exists(Path.Combine(Save_Settings.Live_Data.Game_Path, "nfsw.exe")))
{
MessageBox.Show(null, "You need to Download the Game Files first before you can have access to run Verify Hash",
Expand All @@ -123,13 +123,13 @@ private void Button_Game_Verify_Files_Click(object sender, EventArgs e)
}
else if (!FunctionStatus.DoesCDNSupportVerifyHash)
{
ButtonsColorSet(Button_Game_Verify_Files, 3, true);
ButtonsColorSet(Button_Verify_Scan, 3, true);
MessageBox.Show(null, "The current saved CDN does not support 'Verify GameFiles' Scan" +
"\nPlease Choose Another CDN from the list", "GameLauncher", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
ButtonsColorSet(Button_Game_Verify_Files, (Save_Settings.Live_Data.Game_Integrity != "Good") ? 2 : 0, true);
ButtonsColorSet(Button_Verify_Scan, (Save_Settings.Live_Data.Game_Integrity != "Good") ? 2 : 0, true);
Screen_Verify_Hash.OpenScreen();
}
}
Expand Down Expand Up @@ -203,7 +203,7 @@ private async void SettingsSave_Click(object sender, EventArgs e)
Save_Settings.Live_Data.Launcher_CDN = New_Choosen_CDN;
Label_CDN_Current.Text = "CHANGED CDN:";
CDN_Changed_Button_Update = Stop_and_Restart_Downloader = RestartRequired = true;
ButtonsColorSet(Button_Game_Verify_Files, 0, false);
ButtonsColorSet(Button_Verify_Scan, 0, false);
}

if (TabControl_Shared_Hub.SelectedTab.Equals(TabPage_Settings))
Expand Down Expand Up @@ -379,14 +379,14 @@ await Task.Run(() =>
if (Screen_Instance != null)
{
FunctionStatus.DoesCDNSupportVerifyHash = true;
ButtonsColorSet(Button_Game_Verify_Files, (Save_Settings.Live_Data.Game_Integrity != "Good" ? 2 : 0), true);
ButtonsColorSet(Button_Verify_Scan, (Save_Settings.Live_Data.Game_Integrity != "Good" ? 2 : 0), true);
}
break;
default:
if (Screen_Instance != null)
{
FunctionStatus.DoesCDNSupportVerifyHash = false;
ButtonsColorSet(Button_Game_Verify_Files, 3, true);
ButtonsColorSet(Button_Verify_Scan, 3, true);
}
break;
}
Expand Down Expand Up @@ -1007,11 +1007,11 @@ await Task.Run(() =>
if (BuildDevelopment.Allowed())
{
FunctionStatus.DoesCDNSupportVerifyHash = true;
ButtonsColorSet(Button_Game_Verify_Files, 4, true);
ButtonsColorSet(Button_Verify_Scan, 4, true);
}
else
{
ButtonsColorSet(Button_Game_Verify_Files, 0, false);
ButtonsColorSet(Button_Verify_Scan, 0, false);
await Task.Run(() =>
{
if (!Application.OpenForms[this.Name].IsDisposed)
Expand All @@ -1022,11 +1022,11 @@ await Task.Run(() =>
{
case APIStatus.Online:
FunctionStatus.DoesCDNSupportVerifyHash = true;
ButtonsColorSet(Button_Game_Verify_Files, (Save_Settings.Live_Data.Game_Integrity != "Good") ? 2 : 0, true);
ButtonsColorSet(Button_Verify_Scan, (Save_Settings.Live_Data.Game_Integrity != "Good") ? 2 : 0, true);
break;
default:
FunctionStatus.DoesCDNSupportVerifyHash = false;
ButtonsColorSet(Button_Game_Verify_Files, 3, true);
ButtonsColorSet(Button_Verify_Scan, 3, true);
break;
}
}
Expand Down

This file was deleted.

Loading

0 comments on commit 60705fd

Please sign in to comment.