public ViewHistoryForm(ExtendedForm parentForm, string entryGuid, string deviceGuid) : base(parentForm, entryGuid) { controlParser = new DBControlParser(this); InitializeComponent(); InitDBControls(); this.deviceGuid = deviceGuid; ViewEntry(entryGuid); }
public NewDeviceForm(ExtendedForm parentForm) : base(parentForm) { InitializeComponent(); InitDBControls(); controlParser = new DBControlParser(this); controlParser.EnableFieldValidation(); ClearAll(); this.Show(); this.Activate(); }
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(); } }
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(); }
private QueryParamCollection BuildSearchList() { var searchParams = new QueryParamCollection(); using (var controlParser = new DBControlParser(this)) { foreach (var ctl in controlParser.GetDBControls(this)) { var ctlValue = controlParser.GetDBControlValue(ctl); if (ctlValue != DBNull.Value && !string.IsNullOrEmpty(ctlValue.ToString())) { var dbInfo = (DBControlInfo)ctl.Tag; bool isExact = false; switch (dbInfo.ColumnName) { //case DevicesCols.OSVersion: // IsExact = true; // break; case DevicesCols.EQType: isExact = true; break; case DevicesCols.Location: isExact = true; break; case DevicesCols.Status: isExact = true; break; default: isExact = false; break; } searchParams.Add(dbInfo.ColumnName, ctlValue, isExact); } } return(searchParams); } }