private void Cheats_Load(object sender, EventArgs e) { // Hack for previous config settings if (Settings.Columns.Any(c => string.IsNullOrWhiteSpace(c.Text))) { Settings = new CheatsSettings(); } CheatEditor.MemoryDomains = Core; LoadConfigSettings(); CheatsMenu.Items.Add(CheatListView.ToColumnsMenu(ColumnToggleCallback)); ToggleGameGenieButton(); CheatEditor.SetAddEvent(AddCheat); CheatEditor.SetEditEvent(EditCheat); GeneralUpdate(); }
private void RestoreDefaults() { Settings = new CheatsSettings(); CheatsMenu.Items.Remove( CheatsMenu.Items .OfType <ToolStripMenuItem>() .First(x => x.Name == "GeneratedColumnsSubMenu")); CheatsMenu.Items.Add(CheatListView.ToColumnsMenu(ColumnToggleCallback)); Config.Cheats.DisableOnLoad = false; Config.Cheats.LoadFileByGame = true; Config.Cheats.AutoSaveOnClose = true; CheatListView.AllColumns.Clear(); SetColumns(); }
private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e) { Size = new Size(_defaultWidth, _defaultHeight); Settings = new CheatsSettings(); CheatsMenu.Items.Remove( CheatsMenu.Items .OfType <ToolStripMenuItem>() .First(x => x.Name == "GeneratedColumnsSubMenu")); CheatsMenu.Items.Add(CheatListView.ToColumnsMenu(ColumnToggleCallback)); Config.Cheats.DisableOnLoad = false; Config.Cheats.LoadFileByGame = true; Config.Cheats.AutoSaveOnClose = true; RefreshFloatingWindowControl(Settings.FloatingWindow); CheatListView.AllColumns.Clear(); SetColumns(); }