/// <summary>
        /// Called by the model if something was changed there. We use this notification to update
        /// our separate input elements (especially the checkboxes). No need to also update the text fields
        /// as they are already adjusted in the selection change event handler.
        /// </summary>
        /// <param name="control">The control that caused the change.</param>
        public void ValueChanged(BindableControl control, Object value)
        {
            if (value == null || !(control is NodeCheckBox))
            return;

              bool boolValue = Convert.ToBoolean(value);
              if (control == pkNodeControl)
            pkCheckBox.Checked = boolValue;
              else
            if (control == nnNodeControl)
              nnCheckBox.Checked = boolValue;
            else
              if (control == uqNodeControl)
            uniqueCheckBox.Checked = boolValue;
              else
            if (control == binNodeControl)
              binaryCheckBox.Checked = boolValue;
            else
              if (control == unNodeControl)
                unsignedCheckBox.Checked = boolValue;
              else
                if (control == zfNodeControl)
                  zeroFillCheckBox.Checked = boolValue;
                else
                  if (control == aiNodeControl)
                    aiCheckBox.Checked = boolValue;
                  else
                    if (control == gNodeControl)
                      generatedCheckbox.Checked = boolValue;
        }
Esempio n. 2
0
 private void AddNodeControl(string dataPropertyName, BindableControl control)
 {
     control.DataPropertyName = dataPropertyName;
     _treeView.NodeControls.Add(control);
 }