private void UpdateForm() { if (!_hasDoneColoring) { DoColoring(); _hasDoneColoring = true; } List <object> values = _watchVar.GetValues(); if (values.Count == 0) { return; } object value = values[0]; if (!TypeUtilities.IsNumber(value)) { throw new ArgumentOutOfRangeException(); } byte[] bytes = TypeUtilities.GetBytes(value); if (bytes.Length != _bytes.Count) { throw new ArgumentOutOfRangeException(); } for (int i = 0; i < _bytes.Count; i++) { _bytes[i].SetByteValue(bytes[bytes.Length - 1 - i], false); } if (_showFloatComponents && value is float floatValue) { _textBoxDecValue.Text = MoreMath.GetFloatSign(floatValue).ToString(); _textBoxHexValue.Text = MoreMath.GetFloatExponent(floatValue).ToString(); _textBoxBinaryValue.Text = MoreMath.GetFloatMantissa(floatValue).ToString(); } else { _textBoxDecValue.Text = value.ToString(); _textBoxHexValue.Text = HexUtilities.FormatMemory(value, _watchVar.NibbleCount.Value); _textBoxBinaryValue.Text = String.Join(" ", _bytes.ToList().ConvertAll(b => b.GetBinary())); } }