Beispiel #1
0
 private void InitLiveBox()
 {
     liveBox.AttachToControl(DescriptionTextBox, DevicesCols.Description, LiveBoxSelectAction.DynamicSearch);
     liveBox.AttachToControl(CurrrentUserTextBox, DevicesCols.CurrentUser, LiveBoxSelectAction.DynamicSearch);
     liveBox.AttachToControl(SerialTextBox, DevicesCols.Serial, LiveBoxSelectAction.LoadDevice, DevicesCols.DeviceGuid);
     liveBox.AttachToControl(AssetTagTextBox, DevicesCols.AssetTag, LiveBoxSelectAction.LoadDevice, DevicesCols.DeviceGuid);
 }
        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();
            }
        }
 private void NewDeviceForm_Load(object sender, EventArgs e)
 {
     liveBox = new LiveBox(this);
     liveBox.AttachToControl(CurrentUserTextBox, DevicesCols.CurrentUser, LiveBoxSelectAction.UserSelect, DevicesCols.MunisEmpNum);
     liveBox.AttachToControl(DescriptionTextBox, DevicesCols.Description, LiveBoxSelectAction.SelectValue);
 }