示例#1
0
        public void UpdateControl()
        {
            WatchVarWrapper.UpdateItemCheckStates();

            UpdateSettings();
            UpdateFlush();
            UpdateSize();
            UpdateColor();
            UpdatePictureBoxes();

            if (!EditMode)
            {
                if (_valueTextBox.Visible)
                {
                    _valueTextBox.Text = WatchVarWrapper.WatchVar.BaseAddressType == BaseAddressTypeEnum.Invalid
                        ? "Invalid variable"
                        : WatchVarWrapper.GetValue(true, true, FixedAddressListGetter()).ToString();
                }
                if (_valueCheckBox.Visible)
                {
                    _valueCheckBox.CheckState = WatchVarWrapper.GetCheckStateValue(FixedAddressListGetter());
                }
            }

            if (EditMode)
            {
                _valueTextBox.ShowTheCaret();
            }
            else
            {
                _valueTextBox.HideTheCaret();
            }

            if (RenameMode)
            {
                _nameTextBox.ShowTheCaret();
            }
            else
            {
                _nameTextBox.HideTheCaret();
            }
        }
示例#2
0
        public void UpdateControl()
        {
            if (!EditMode)
            {
                if (_valueTextBox.Visible)
                {
                    _valueTextBox.Text = _watchVarWrapper.GetStringValue(true, true, FixedAddressList);
                }
                if (_valueCheckBox.Visible)
                {
                    _valueCheckBox.CheckState = _watchVarWrapper.GetCheckStateValue(FixedAddressList);
                }
            }

            _watchVarWrapper.UpdateItemCheckStates();

            UpdateSize();
            UpdateColor();
            UpdatePictureBoxes();
        }