BF2Statistics.MainForm.BF2sRestoreBtn_Click C# (CSharp) Method

BF2sRestoreBtn_Click() private method

This button restores the clients Ranked Python files to the original state
private BF2sRestoreBtn_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void BF2sRestoreBtn_Click(object sender, EventArgs e)
        {
            // Confirm that the user wants to do this
            if (MessageBox.Show(
                    "Restoring the BF2Statistics python files will erase any and all modifications to the BF2Statistics " +
                    "python files. Are you sure you want to continue?",
                    "Confirmation",
                    MessageBoxButtons.OKCancel,
                    MessageBoxIcon.Warning)
                == DialogResult.OK)
            {
                // Lock the console to prevent errors!
                this.Enabled = false;
                LoadingForm.ShowScreen(this);

                // Replace files with the originals
                try
                {
                    StatsPython.RestoreRankedPyFiles();

                    // Reset medal data profile
                    if (StatsPython.Installed)
                    {
                        StatsPython.Config.MedalDataProfile = "";
                        StatsPython.Config.Save();
                    }

                    // Show Success Message
                    Notify.Show("Stats Python Files Have Been Restored!", "Operation Successful", AlertType.Success);
                }
                catch (Exception E)
                {
                    using (ExceptionForm EForm = new ExceptionForm(E, false))
                    {
                        EForm.Message = "Failed to restore stats python files!";
                        EForm.ShowDialog();
                    }
                }
                finally
                {
                    this.Enabled = true;
                    LoadingForm.CloseForm();
                }
            }
        }
MainForm