public ViewDeviceForm(ExtendedForm parentForm, MappedObject device, bool startHidden = false) : base(parentForm, device, startHidden)
        {
            currentViewDevice = (Device)device;

            InitializeComponent();
            InitDBControls();

            controlParser = new DBControlParser(this);
            controlParser.EnableFieldValidation();

            defaultFormTitle = this.Text;

            liveBox = new LiveBox(this);
            liveBox.AttachToControl(CurrentUserTextBox, DevicesCols.CurrentUser, LiveBoxSelectAction.UserSelect, DevicesCols.MunisEmpNum);
            liveBox.AttachToControl(DescriptionTextBox, DevicesCols.Description, LiveBoxSelectAction.SelectValue);

            munisToolBar = new MunisToolBar(this);
            munisToolBar.InsertMunisDropDown(ToolStrip1, 6);

            windowList = new WindowList(this);
            windowList.InsertWindowList(ToolStrip1);

            statusSlider = new SliderLabel();
            statusSlider.FlashStripOnNewMessage = true;
            StatusStrip.Items.Add(statusSlider.ToToolStripControl(StatusStrip));

            RefreshCombos();

            DataGridHistory.DoubleBuffered(true);
            TrackingGrid.DoubleBuffered(true);

            SetEditMode(false);

            LoadCurrentDevice();

            WatchdogInstance.Watchdog.StatusChanged += Watchdog_StatusChanged;

            if (!startHidden)
            {
                this.Show();
            }
            else
            {
                // Let the base class know that the hidden form is ready.
                // Since no load event occurs, we need someway to notify
                // when all the components are instantiated and populated.
                base.HiddenFormReady();
            }
        }
Example #2
0
        public ScanningUI()
        {
            InitializeComponent();
            InitDBControls();
            controlParser = new DBControlParser(this);
            ScanItemsGrid.DoubleBuffered(true);
            PopulateLocationsCombo();
            ScanDateTimeTextBox.Text = DateTime.Now.ToString();
            AttachFilterMenuEvents();

            statusLabel.FlashStripOnNewMessage = true;
            statusLabel.AutoSize = true;
            statusStrip1.Items.Insert(0, statusLabel.ToToolStripControl(statusStrip1));

            this.Show();
        }