Beispiel #1
0
        private void SelectControl(NvnButton button)
        {
            if (selectedControl != null)
            {
                selectedControl.IsSelected = false;
            }

            selectedControl = button;
            foreach (ControlType type in buttons.Keys)
            {
                if (buttons[type] == selectedControl)
                {
                    ControlsManager.NotifyControlSelectionChanged(type);
                    break;
                }
            }
            // Invalidate (paint) all button controls
            selectedControl.IsSelected = true;
            foreach (Control control in this.Controls)
            {
                if (control is NvnButton)
                {
                    control.Invalidate();
                }
            }
        }
Beispiel #2
0
 private void ButtonsControl_Load(object sender, EventArgs e)
 {
     selectedControl            = (NvnButton)btnProductInformation;
     selectedControl.IsSelected = true;
     selectedControl.Invalidate();
     ControlsManager.NotifyControlSelectionChanged(ControlType.ProductInformation);
 }