private void BtnRunScan_Click(object sender, EventArgs e) { try { Program.UserConfig.GameFilesPath = tb_GamePath.Text; Program.UserConfig.Save(Program.UserConfigFilePath); using (var form = new GameScanProgressForm(Program.UserConfig.GameFilesPath, Program.UserConfig.IsSteamVersion, checkBox1.Checked ? 10 : 1)) { var dr = form.ShowDialog(); if (dr == DialogResult.OK) { Close(); } } } catch (Exception ex) { MsgBox.ShowMessage($@"Exception: {ex.Message}", @"Celeste Fan Project", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Btn_Install_Editor_Click(object sender, EventArgs e) { if (_gameScannner == null) { return; } Btn_Install_Editor.Enabled = false; btn_Browse.Enabled = false; try { using (var form = new GameScanProgressForm(_gameScannner)) { form.ShowDialog(); if (form.DialogResult != DialogResult.OK) { throw new Exception("Installation failed"); } label2.Text = @"Installed"; label2.ForeColor = Color.Green; btn_Browse.Enabled = true; } } catch (Exception exception) { MsgBox.ShowMessage( $"Error: Error during the installation of the 'Game Editor'. Error message: {exception.Message}", @"Celeste Fan Project", MessageBoxButtons.OK, MessageBoxIcon.Error); label2.Text = @"Non-Installed"; label2.ForeColor = Color.Red; Btn_Install_Editor.Enabled = true; } }