コード例 #1
0
        private void DeleteUserData_Click(object sender, EventArgs e)
        {
            DialogResult RES1 = Program.ShowError(3, "Clear user data", "Deleting the driver's user data will delete all the SoundFont lists, the DLL overrides and will also uninstall LoudMax.\nThis action is irreversible!\n\nAre you sure you want to continue?\nAfter deleting the data, the configurator will restart.", null);

            if (RES1 == DialogResult.Yes)
            {
                DialogResult RES2 = Program.ShowError(1, "Clear user data", "Would you like to restart the configurator after the process?", null);

                Functions.DeleteDirectory(System.Environment.GetEnvironmentVariable("USERPROFILE") + "\\OmniMIDI\\");

                if (RES2 == DialogResult.Yes)
                {
                    System.Diagnostics.Process.Start(Application.ExecutablePath);
                }

                this.Close();
            }
        }