/// <summary> /// Initializes a new instance of the <see cref="ManualScanner"/> class. /// </summary> public PointerScanner() { this.InitializeComponent(); // Windows Forms hosting -- TODO: Phase this out this.PointerScanAddressHexDecBox = new HexDecTextBox(DataTypes.UInt64); this.PointerScanAddressHexDecBox.IsHex = true; this.PointerScanAddressHexDecBox.TextChanged += this.PointerScanAddressUpdated; this.pointerScanAddressHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.PointerScanAddressHexDecBox)); this.DepthHexDecBox = new HexDecTextBox(DataTypes.Int32); this.DepthHexDecBox.TextChanged += this.DepthUpdated; this.DepthHexDecBox.SetValue(PointerScannerViewModel.DefaultPointerScanDepth); this.depthHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.DepthHexDecBox)); this.PointerRadiusHexDecBox = new HexDecTextBox(DataTypes.Int32); this.PointerRadiusHexDecBox.TextChanged += this.PointerRadiusUpdated; this.PointerRadiusHexDecBox.SetValue(PointerScannerViewModel.DefaultPointerScanRadius); this.pointerRadiusHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.PointerRadiusHexDecBox)); this.PointerRescanAddressHexDecBox = new HexDecTextBox(DataTypes.UInt64); this.PointerRescanAddressHexDecBox.IsHex = true; this.PointerRescanAddressHexDecBox.TextChanged += this.PointerRescanAddressUpdated; this.pointerRescanAddressHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.PointerRescanAddressHexDecBox)); this.PointerRescanValueHexDecBox = new HexDecTextBox(); this.PointerRescanValueHexDecBox.TextChanged += this.PointerRescanValueUpdated; this.pointerRescanValueHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.PointerRescanValueHexDecBox)); Task.Run(() => PointerScanResultsViewModel.GetInstance().Subscribe(this)); }
/// <summary> /// Initializes a new instance of the <see cref="ValueEditor" /> class. /// </summary> /// <param name="addressItem">The initial address being edited.</param> public ValueEditor(AddressItem addressItem) { this.InitializeComponent(); this.ValueHexDecBox = new HexDecTextBox(addressItem.DataType); this.ValueHexDecBox.TextChanged += this.ValueHexDecBoxTextChanged; this.ValueHexDecBox.IsHex = addressItem.IsValueHex; this.ValueHexDecBox.SetValue(addressItem.AddressValue); this.ValueEditorTextEditorContainer.Children.Add(WinformsHostingHelper.CreateHostedControl(this.ValueHexDecBox)); }
/// <summary> /// Initializes a new instance of the <see cref="ManualScanner"/> class. /// </summary> public ManualScanner() { this.InitializeComponent(); // Windows Forms hosting -- TODO: Phase this out this.ValueHexDecBox = new HexDecTextBox(); this.ValueHexDecBox.TextChanged += this.ValueUpdated; this.valueHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.ValueHexDecBox)); Task.Run(() => ScanResultsViewModel.GetInstance().Subscribe(this)); }
/// <summary> /// Initializes a new instance of the <see cref="OffsetEditor" /> class /// </summary> /// <param name="offsets">The initial offsets to edit</param> public OffsetEditor(IList <Int32> offsets) { this.InitializeComponent(); // Windows Forms hosting -- TODO: Phase this out this.OffsetHexDecBox = new HexDecTextBox(); this.OffsetHexDecBox.IsHex = true; this.OffsetHexDecBox.TextChanged += this.ValueUpdated; this.offsetHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.OffsetHexDecBox)); this.OffsetEditorViewModel.Offsets = offsets == null ? null : new ObservableCollection <PrimitiveBinding <Int32> >(offsets.Select(x => new PrimitiveBinding <Int32>(x))); }
/// <summary> /// Initializes a new instance of the <see cref="ProjectExplorer" /> class. /// </summary> public ProjectExplorer() { this.InitializeComponent(); this.nodeCache = new BiDictionary <ProjectItem, ProjectNode>(); this.projectTree = new TreeModel(); this.InitializeDesigner(); this.projectExplorerTreeViewContainer.Children.Add(WinformsHostingHelper.CreateHostedControl(this.projectExplorerTreeView)); EngineCore.GetInstance().Input?.GetKeyboardCapture().Subscribe(this); ProjectExplorerViewModel.GetInstance().Subscribe(this); }
/// <summary> /// Initializes a new instance of the <see cref="Settings" /> class. /// </summary> public Settings() { this.InitializeComponent(); // Windows Forms hosting -- TODO: Phase this out this.AlignmentHexDecBox = new HexDecTextBox(DataType.Int32); this.AlignmentHexDecBox.TextChanged += this.AlignmentUpdated; this.AlignmentHexDecBox.IsHex = true; this.AlignmentHexDecBox.SetValue(this.SettingsViewModel.Alignment); this.alignment.Children.Add(WinformsHostingHelper.CreateHostedControl(this.AlignmentHexDecBox)); this.ScanRangeStartHexDecBox = new HexDecTextBox(DataType.UInt64); this.ScanRangeStartHexDecBox.TextChanged += this.StartRangeUpdated; this.ScanRangeStartHexDecBox.IsHex = true; this.ScanRangeStartHexDecBox.SetValue(this.SettingsViewModel.StartAddress); this.scanRangeStart.Children.Add(WinformsHostingHelper.CreateHostedControl(this.ScanRangeStartHexDecBox)); this.ScanRangeEndHexDecBox = new HexDecTextBox(DataType.UInt64); this.ScanRangeEndHexDecBox.TextChanged += this.EndRangeUpdated; this.ScanRangeEndHexDecBox.IsHex = true; this.ScanRangeEndHexDecBox.SetValue(this.SettingsViewModel.EndAddress); this.scanRangeEnd.Children.Add(WinformsHostingHelper.CreateHostedControl(this.ScanRangeEndHexDecBox)); this.FreezeIntervalHexDecBox = new HexDecTextBox(DataType.Int32); this.FreezeIntervalHexDecBox.TextChanged += this.FreezeIntervalUpdated; this.FreezeIntervalHexDecBox.SetValue(this.SettingsViewModel.FreezeInterval); this.freezeInterval.Children.Add(WinformsHostingHelper.CreateHostedControl(this.FreezeIntervalHexDecBox)); this.RescanIntervalHexDecBox = new HexDecTextBox(DataType.Int32); this.RescanIntervalHexDecBox.TextChanged += this.RescanIntervalUpdated; this.RescanIntervalHexDecBox.SetValue(this.SettingsViewModel.RescanInterval); this.rescanInterval.Children.Add(WinformsHostingHelper.CreateHostedControl(this.RescanIntervalHexDecBox)); this.TableReadIntervalHexDecBox = new HexDecTextBox(DataType.Int32); this.TableReadIntervalHexDecBox.TextChanged += this.TableReadIntervalUpdated; this.TableReadIntervalHexDecBox.SetValue(this.SettingsViewModel.TableReadInterval); this.tableReadInterval.Children.Add(WinformsHostingHelper.CreateHostedControl(this.TableReadIntervalHexDecBox)); this.ResultReadIntervalHexDecBox = new HexDecTextBox(DataType.Int32); this.ResultReadIntervalHexDecBox.TextChanged += this.ResultReadIntervalUpdated; this.ResultReadIntervalHexDecBox.SetValue(this.SettingsViewModel.ResultReadInterval); this.resultReadInterval.Children.Add(WinformsHostingHelper.CreateHostedControl(this.ResultReadIntervalHexDecBox)); this.InputCorrelatorTimeoutHexDecBox = new HexDecTextBox(DataType.Int32); this.InputCorrelatorTimeoutHexDecBox.TextChanged += this.InputCorrelatorTimeoutUpdated; this.InputCorrelatorTimeoutHexDecBox.SetValue(this.SettingsViewModel.InputCorrelatorTimeOutInterval); this.inputCorrelatorTimeout.Children.Add(WinformsHostingHelper.CreateHostedControl(this.InputCorrelatorTimeoutHexDecBox)); }
/// <summary> /// Initializes a new instance of the <see cref="ManualScanner"/> class. /// </summary> public PointerScanner() { this.InitializeComponent(); // Windows Forms hosting -- TODO: Phase this out this.ValueHexDecBox = new HexDecTextBox(typeof(UInt64)); this.ValueHexDecBox.IsHex = true; this.ValueHexDecBox.TextChanged += this.ValueUpdated; this.valueHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.ValueHexDecBox)); this.DepthHexDecBox = new HexDecTextBox(typeof(UInt32)); this.DepthHexDecBox.TextChanged += this.DepthUpdated; this.DepthHexDecBox.SetValue(PointerScannerViewModel.DefaultPointerScanDepth); this.depthHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.DepthHexDecBox)); this.PointerRadiusHexDecBox = new HexDecTextBox(typeof(UInt32)); this.PointerRadiusHexDecBox.TextChanged += this.PointerRadiusUpdated; this.PointerRadiusHexDecBox.SetValue(PointerScannerViewModel.DefaultPointerScanRadius); this.pointerRadiusHexDecBox.Children.Add(WinformsHostingHelper.CreateHostedControl(this.PointerRadiusHexDecBox)); }
/// <summary> /// Initializes a new instance of the <see cref="PropertyViewer" /> class. /// </summary> public PropertyViewer() { this.InitializeComponent(); // Windows Forms hosting -- TODO: Phase this out this.propertyGrid = new System.Windows.Forms.PropertyGrid(); // Use reflection to set all propertygrid colors to dark, since some are otherwise not publically accessible PropertyInfo[] allProperties = this.propertyGrid.GetType().GetProperties(); IEnumerable <PropertyInfo> colorProperties = allProperties.Select(x => x).Where(x => x.PropertyType == typeof(Color)); colorProperties.ForEach(x => x.SetValue(this.propertyGrid, DarkBrushes.SqualrColorPanel, null)); this.propertyGrid.BackColor = DarkBrushes.SqualrColorPanel; this.propertyGrid.CommandsBackColor = DarkBrushes.SqualrColorPanel; this.propertyGrid.HelpBackColor = DarkBrushes.SqualrColorPanel; this.propertyGrid.SelectedItemWithFocusBackColor = DarkBrushes.SqualrColorPanel; this.propertyGrid.ViewBackColor = DarkBrushes.SqualrColorPanel; this.propertyGrid.CommandsActiveLinkColor = DarkBrushes.SqualrColorPanel; this.propertyGrid.CommandsDisabledLinkColor = DarkBrushes.SqualrColorPanel; this.propertyGrid.CategorySplitterColor = DarkBrushes.SqualrColorWhite; this.propertyGrid.CommandsBorderColor = DarkBrushes.SqualrColorFrame; this.propertyGrid.HelpBorderColor = DarkBrushes.SqualrColorFrame; this.propertyGrid.ViewBorderColor = DarkBrushes.SqualrColorFrame; this.propertyGrid.CategoryForeColor = DarkBrushes.SqualrColorWhite; this.propertyGrid.CommandsForeColor = DarkBrushes.SqualrColorWhite; this.propertyGrid.DisabledItemForeColor = DarkBrushes.SqualrColorWhite; this.propertyGrid.HelpForeColor = DarkBrushes.SqualrColorWhite; this.propertyGrid.SelectedItemWithFocusForeColor = DarkBrushes.SqualrColorWhite; this.propertyGrid.ViewForeColor = DarkBrushes.SqualrColorWhite; PropertyViewerViewModel.GetInstance().Subscribe(this); this.propertyViewer.Children.Add(WinformsHostingHelper.CreateHostedControl(this.propertyGrid)); }