Skip to content

Commit

Permalink
InstallAndPlay cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FenPhoenix committed May 8, 2019
1 parent be0c556 commit fe44a69
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 181 deletions.
8 changes: 4 additions & 4 deletions AngelLoader/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ private async void MainForm_KeyDown(object sender, KeyEventArgs e)
if (FMsDGV.Focused && FMsDGV.SelectedRows.Count > 0 && GameIsKnownAndSupported(GetSelectedFM()))
{
e.SuppressKeyPress = true;
await InstallAndPlay.InstallOrPlay(GetSelectedFM(), askConfIfRequired: true);
await InstallAndPlay.InstallIfNeededAndPlay(GetSelectedFM(), askConfIfRequired: true);
}
}
else if (e.KeyCode == Keys.Escape)
Expand Down Expand Up @@ -2036,7 +2036,7 @@ private void FMRightClickMenu_Opening(object sender, CancelEventArgs e)
if (FMsDGV.RowCount == 0 || FMsDGV.SelectedRows.Count == 0) e.Cancel = true;
}

private async void PlayFMMenuItem_Click(object sender, EventArgs e) => await InstallAndPlay.InstallOrPlay(GetSelectedFM());
private async void PlayFMMenuItem_Click(object sender, EventArgs e) => await InstallAndPlay.InstallIfNeededAndPlay(GetSelectedFM());

private async void InstallUninstallMenuItem_Click(object sender, EventArgs e) => await InstallAndPlay.InstallOrUninstall(GetSelectedFM());

Expand All @@ -2052,7 +2052,7 @@ private void FMRightClickMenu_Opening(object sender, CancelEventArgs e)

private async void InstallUninstallFMButton_Click(object sender, EventArgs e) => await InstallAndPlay.InstallOrUninstall(GetSelectedFM());

private async void PlayFMButton_Click(object sender, EventArgs e) => await InstallAndPlay.InstallOrPlay(GetSelectedFM());
private async void PlayFMButton_Click(object sender, EventArgs e) => await InstallAndPlay.InstallIfNeededAndPlay(GetSelectedFM());

#region Play original game

Expand Down Expand Up @@ -3902,7 +3902,7 @@ private async void FMsDGV_CellDoubleClick(object sender, DataGridViewCellEventAr
return;
}

await InstallAndPlay.InstallOrPlay(fm, askConfIfRequired: true);
await InstallAndPlay.InstallIfNeededAndPlay(fm, askConfIfRequired: true);
}

private async void RefreshFromDiskButton_Click(object sender, EventArgs e) => await Core.RefreshFromDisk();
Expand Down
Loading

0 comments on commit fe44a69

Please sign in to comment.