示例#1
0
 /// <summary>
 /// Creates the statusbar object for this scanner
 /// </summary>
 private void createStatusBar()
 {
     if (_statusBar == null)
     {
         _statusBar = new ScannerStatusBar
         {
             AltStatus = BAltStatus,
             CtrlStatus = BCtrlStatus,
             FuncStatus = BFuncStatus,
             ShiftStatus = BShiftStatus,
             LockStatus = BLockStatus
         };
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="statusBar"></param>
 public StatusBarController(ScannerStatusBar statusBar)
 {
     _statusBar = statusBar;
 }
示例#3
0
        /// <summary>
        /// Creates the status bar
        /// </summary>
        private void createStatusBar()
        {
            if (_statusBar != null)
            {
                return;
            }

            _statusBar = new ScannerStatusBar
            {
                AltStatus = BAltStatus,
                CtrlStatus = BCtrlStatus,
                FuncStatus = BFuncStatus,
                ShiftStatus = BShiftStatus
            };
        }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="statusBar"></param>
 public StatusBarController(ScannerStatusBar statusBar = null)
 {
     _statusBar = statusBar;
 }
示例#5
0
        /// <summary>
        /// Creates the status bar for the form to display the status of the
        /// Ctrl, Alt and Shift keys
        /// </summary>
        public void CreateStatusBar()
        {
            ScannerForm.Height += 30;

            _statusBarPanelShift.BorderStyle = StatusBarPanelBorderStyle.None;
            StatusBarControl.Panels.Add(_statusBarPanelShift);

            _statusBarPanelCtrl.BorderStyle = StatusBarPanelBorderStyle.None;
            StatusBarControl.Panels.Add(_statusBarPanelCtrl);

            _statusBarPanelAlt.BorderStyle = StatusBarPanelBorderStyle.None;
            StatusBarControl.Panels.Add(_statusBarPanelAlt);

            StatusBarControl.SizingGrip = false;
            StatusBarControl.ShowPanels = true;

            StatusBarControl.Height = 30;
            StatusBarControl.Margin = new Padding(4, 4, 4, 4);
            StatusBarControl.Font = new Font("Arial", 16.0f);
            ScannerForm.Controls.Add(StatusBarControl);

            var statusbar = new ScannerStatusBar
            {
                AltStatus = _statusBarPanelAlt,
                CtrlStatus = _statusBarPanelCtrl,
                ShiftStatus = _statusBarPanelShift,
            };

            StatusBar = statusbar;
        }