コード例 #1
0
ファイル: ButtonsControl.cs プロジェクト: thr27/NvnInstaller
        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();
                }
            }
        }
コード例 #2
0
ファイル: ButtonsControl.cs プロジェクト: thr27/NvnInstaller
 private void ButtonsControl_Load(object sender, EventArgs e)
 {
     selectedControl            = (NvnButton)btnProductInformation;
     selectedControl.IsSelected = true;
     selectedControl.Invalidate();
     ControlsManager.NotifyControlSelectionChanged(ControlType.ProductInformation);
 }