private void SetProperties() { if (_address.HasValue) { AddressBox.SetFromRawInt(_address.Value); } else { AddressBox.ResetText(); } if (_compare.HasValue) { CompareBox.SetFromRawInt(_compare.Value); } else { CompareBox.ResetText(); } if (_value.HasValue) { ValueBox.SetFromRawInt(_value.Value); } else { ValueBox.ResetText(); } }
private void SetFormToDefault() { _loading = true; SetSizeSelected(WatchSize.Byte); PopulateTypeDropdown(); NameBox.Text = ""; if (MemoryDomains != null) { AddressBox.SetHexProperties(MemoryDomains.SystemBus.Size); } ValueBox.ByteSize = CompareBox.ByteSize = WatchSize.Byte; ValueBox.Type = CompareBox.Type = DisplayType.Hex; ValueBox.ResetText(); CompareBox.ResetText(); ValueHexIndLabel.Text = CompareHexIndLabel.Text = HexInd; BigEndianCheckBox.Checked = false; SetTypeSelected(DisplayType.Hex); CheckFormState(); CompareBox.Text = ""; // TODO: A needed hack until WatchValueBox.ToRawInt() becomes nullable _loading = false; }