// Begin first scan private void ScanFirst(ISearchType type, ISearchMethod method, ulong start, ulong stop, object[] param) { Invoke((MethodInvoker) delegate { this.BtBeginScan.Enabled = false; this.BtStopScan.Text = "Stop"; this.BtStopScan.Enabled = true; this.ResultBox.List = new NetCheatX.Core.Containers.SearchResultContainer <ISearchResult>(); }); this.ResultBox.ScanFirst(type, method, new Types.MemoryRange[] { new Types.MemoryRange() { start = start, stop = stop } }, param, (p, v, m, t) => { if (method == p) { try { Invoke((MethodInvoker) delegate { this.PbScanProgress.LeftText = t; this.PbScanProgress.Maximum = 100; this.PbScanProgress.Value = (int)(100f * ((float)v / (float)m)); }); } catch (Exception e) { } } }); Invoke((MethodInvoker) delegate { this.BtBeginScan.Text = "Next Scan"; this.BtBeginScan.Enabled = true; this.BtStopScan.Text = "New Scan"; }); this._scanState = Types.SearchMode.Next; }
private void BtStopScan_Click(object sender, EventArgs e) { if (this.BtStopScan.Text == "New Scan") { this.ResultBox.Reset(); this.BtBeginScan.Text = "Start Initial"; this.BtBeginScan.Enabled = true; this.BtStopScan.Text = "Stop"; this.BtStopScan.Enabled = false; this._scanState = Types.SearchMode.First; } else if (this.BtStopScan.Text == "Stop") { } }
private void UpdateSearchMethods(Types.SearchMode mode) { CBItem oldItem = CbScanMethod.SelectedIndex < 0 ? null : (CBItem)CbScanMethod.SelectedItem; CBItem item; CbScanMethod.BeginUpdate(); CbScanMethod.SuspendLayout(); CbScanMethod.Items.Clear(); _isUserInput = false; // Setup method combo boxes foreach (ISearchMethod sm in _host.SearchMethods) { if (sm.Mode == mode || sm.Mode == Types.SearchMode.Both) { item = new UI.CBItem(sm); this.CbScanMethod.Items.Add(item); if (!_cbScanMethodToolTips.Keys.Contains(sm)) { _cbScanMethodToolTips.Add(sm, item.ToTooltip()); } if (oldItem != null && oldItem.Plugin == item.Plugin) { CbScanMethod.SelectedIndex = CbScanMethod.Items.Count - 1; // Update Search Data Types UpdateSearchTypes(sm); } } } _isUserInput = true; CbScanMethod.ResumeLayout(true); CbScanMethod.EndUpdate(); }