public RamSearch() { SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); InitializeComponent(); WatchListView.QueryItemText += ListView_QueryItemText; WatchListView.QueryItemBkColor += ListView_QueryItemBkColor; WatchListView.VirtualMode = true; Closing += (o, e) => SaveConfigSettings(); _sortedColumn = string.Empty; _sortReverse = false; _settings = new RamSearchEngine.Settings(); _searches = new RamSearchEngine(_settings); TopMost = Global.Config.RamSearchSettings.TopMost; }
private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e) { Size = new Size(_defaultWidth, _defaultHeight); Global.Config.RamSearchColumnWidths = new Dictionary<string, int> { { "AddressColumn", -1 }, { "ValueColumn", -1 }, { "PrevColumn", -1 }, { "ChangesColumn", -1 }, { "DiffColumn", -1 }, }; Global.Config.RamSearchColumnIndexes = new Dictionary<string, int> { { "AddressColumn", 0 }, { "ValueColumn", 1 }, { "PrevColumn", 2 }, { "ChangesColumn", 3 }, { "DiffColumn", 4 }, }; ColumnPositions(); Global.Config.RamSearchShowChangeColumn = true; Global.Config.RamSearchShowPrevColumn = true; Global.Config.RamSearchShowDiffColumn = false; Global.Config.RamSearchSettings.SaveWindowPosition = true; Global.Config.RamSearchSettings.TopMost = TopMost = false; Global.Config.RamSearchSettings.FloatingWindow = false; Global.Config.RamSearchColumnWidths = new Dictionary<string, int> { { "AddressColumn", -1 }, { "ValueColumn", -1 }, { "PrevColumn", -1 }, { "ChangesColumn", -1 }, { "DiffColumn", -1 }, }; _settings = new RamSearchEngine.Settings(); if (_settings.Mode == RamSearchEngine.Settings.SearchMode.Fast) { SetToFastMode(); } RefreshFloatingWindowControl(); ColumnPositions(); LoadColumnInfo(); }
private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e) { var recentFiles = Settings.RecentSearches; // We don't want to wipe recent files when restoring Settings = new RamSearchSettings(); Settings.RecentSearches = recentFiles; Size = new Size(_defaultWidth, _defaultHeight); RamSearchMenu.Items.Remove( RamSearchMenu.Items .OfType<ToolStripMenuItem>() .First(x => x.Name == "GeneratedColumnsSubMenu") ); RamSearchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback)); _settings = new RamSearchEngine.Settings(MemoryDomains); if (_settings.Mode == RamSearchEngine.Settings.SearchMode.Fast) { SetToFastMode(); } RefreshFloatingWindowControl(); LoadColumnInfo(); }
public void Restart() { _settings = new RamSearchEngine.Settings(MemoryDomains); _searches = new RamSearchEngine(_settings, MemoryDomains); MessageLabel.Text = "Search restarted"; DoDomainSizeCheck(); NewSearch(); }
private void RamSearch_Load(object sender, EventArgs e) { TopMost = Settings.TopMost; RamSearchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback)); _settings = new RamSearchEngine.Settings(MemoryDomains); _searches = new RamSearchEngine(_settings, MemoryDomains); ErrorIconButton.Visible = false; _dropdownDontfire = true; LoadConfigSettings(); SpecificValueBox.ByteSize = _settings.Size; SpecificValueBox.Type = _settings.Type; MessageLabel.Text = string.Empty; SpecificAddressBox.MaxLength = (MemoryDomains.MainMemory.Size - 1).NumHexDigits(); HardSetSizeDropDown(_settings.Size); PopulateTypeDropDown(); HardSetDisplayTypeDropDown(_settings.Type); DoDomainSizeCheck(); SetReboot(false); SpecificAddressBox.SetHexProperties(_settings.Domain.Size); SpecificValueBox.ResetText(); SpecificAddressBox.ResetText(); NumberOfChangesBox.ResetText(); DifferenceBox.ResetText(); DifferentByBox.ResetText(); _dropdownDontfire = false; if (_settings.Mode == RamSearchEngine.Settings.SearchMode.Fast) { SetToFastMode(); } NewSearch(); }