Merge pull request #19 from AShifter/master

Fix application closing when choosing mode on Windows
This commit is contained in:
Jayden 2022-06-15 16:58:55 -04:00 committed by GitHub
commit 8c8aba3287
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,14 +27,24 @@ public class ModeSelectionForm : Form {
}
private void openRemotePatcher(object sender, EventArgs e) {
new RemotePatchForm().Show();
this.Close();
RemotePatchForm rpForm = new RemotePatchForm();
rpForm.Show();
rpForm.Closed += OnSubFormClose;
this.Visible = false;
}
private void openLocalPatcher(object sender, EventArgs e) {
throw new NotImplementedException();
}
private void openFilePatcher(object sender, EventArgs e) {
new FilePatchForm().Show();
FilePatchForm fpForm = new FilePatchForm();
fpForm.Show();
fpForm.Closed += OnSubFormClose;
this.Visible = false;
}
private void OnSubFormClose(object sender, EventArgs e)
{
this.Close();
}