private void HandleReceivedBarCode(string barCode) { var genericContainer = GenericContainerManager.GetGenericContainerByBarCode(barCode); if (!CheckContainerType(genericContainer)) { throw new DataException("This bar code neither represent a sample container nor a deposit"); } var sampleListDialog = new SampleListDialog(genericContainer); _barCodeController = null; if (sampleListDialog.ShowDialog() == DialogResult.OK) { var depositContainer = sampleListDialog.GetSelectedDeposit(); var selectedContainers = sampleListDialog.GetSelectedContainers(); var doublets = GetDoublets(selectedContainers, out var uniqueList); if (doublets.Count > 0) { var doubletsDialog = new DoubletsDialog(doublets, "These duplicates are sorted out from the list!"); doubletsDialog.ShowDialog(); selectedContainers = uniqueList; } UpdateListView(selectedContainers, depositContainer); printToolStripMenuItem.Enabled = true; exportToolStripMenuItem.Enabled = true; } }
public SampleListDialog() { InitializeComponent(); MyPutInContainer = null; MyBarCodeController = null; InitListView(); }
private void Awake() { if (Instance != null) { Destroy(this); } Instance = this; }
public SampleListDialog() { InitializeComponent(); _putInContainer = null; _barCodeController = null; _resetTimer.Elapsed += ResetTimer_Elapsed; InitListView(); }
private void Init() { InitListView(); // Init barcode controller MyBarCodeController = new BarCodeController(this); MyBarcodeEventhandler = new BarCodeEventHandler(BarCodeReceived); MyBarCodeController.BarCodeReceived += MyBarcodeEventhandler; IdentificationTextBox.Text = UserManager.GetCurrentUser().GetName(); }
private void Init() { BarcodeTextBox.Select(); //BarcodeCatcherTextBox.Width = 0; var barCodeController = new BarCodeController(this); barCodeController.BarCodeReceived += BarCodeReceived; var locA = ManualCheckBox.Location; var locB = BarcodeTextBox.Location; _shrinkDistance = (locB.Y + BarcodeTextBox.Height) - (locA.Y + ManualCheckBox.Height); MakeManualLoginInvisible(); }
private void Init() { Point locA, locB; BarCodeController barCodeController; BarcodeTextBox.Select(); //BarcodeCatcherTextBox.Width = 0; barCodeController = new BarCodeController(this); barCodeController.BarCodeReceived += new BarCodeEventHandler(BarCodeReceived); locA = ManualCheckBox.Location; locB = BarcodeTextBox.Location; MyShrinkDistance = (locB.Y + BarcodeTextBox.Height) - (locA.Y + ManualCheckBox.Height); MakeManualLoginInvisible(); }
public SampleListDialog(IGenericContainer container) { InitializeComponent(); InitListView(); MyBarCodeController = new BarCodeController(this); MyBarCodeController.BarCodeReceived += new BarCodeEventHandler(BarCodeReceived); if (LoadSampleStorageDuoDialog.IsSampleContainer(container)) { InitWithSampleContainer(container); } else if (LoadSampleStorageDuoDialog.IsStorageContainer(container)) { InitWithPutInContainer(container); } else { throw new Data.Exception.DataException("This container neither represent a sample container nor a deposit"); } }
private void HandleReceivedBarCode(string barCode) { SampleListDialog sampleListDialog; IGenericContainer genericContainer; IGenericContainer depositContainer; GenericContainerList selectedContainers; GenericContainerList doublets, uniqueList; DoubletsDialog doubletsDialog; genericContainer = GenericContainerManager.GetGenericContainerByBarCode(barCode); if (!CheckContainerType(genericContainer)) { throw new Data.Exception.DataException("This bar code neither represent a sample container nor a deposit"); } sampleListDialog = new SampleListDialog(genericContainer); MyBarCodeController = null; if (sampleListDialog.ShowDialog() == DialogResult.OK) { depositContainer = sampleListDialog.GetSelectedDeposit(); selectedContainers = sampleListDialog.GetSelectedContainers(); doublets = GetDoublets(selectedContainers, out uniqueList); if (doublets.Count > 0) { doubletsDialog = new DoubletsDialog(doublets, "These duplicates are sorted out from the list!"); doubletsDialog.ShowDialog(); selectedContainers = uniqueList; } SampleStorageListView.BeginUpdate(); foreach (IGenericContainer container in selectedContainers) { SampleStorageListView.Items.Add(new DuoViewItem(depositContainer, container)); } SampleStorageListView.EndUpdate(); SampleStorageListView.Columns[(int)DuoViewItem.ListIndex.SampleContainer].Width = -2; this.printToolStripMenuItem.Enabled = true; this.exportToolStripMenuItem.Enabled = true; } MyBarCodeController = new BarCodeController(this); MyBarCodeController.BarCodeReceived += MyBarcodeEventhandler; }
private void Init() { InitListView(); // Init barcode controller _barCodeController = new BarCodeController(this); _barcodeEventhandler = BarCodeReceived; _barCodeController.BarCodeReceived += _barcodeEventhandler; IdentificationTextBox.Text = UserManager.GetCurrentUser().GetName(); if (Settings.Default.DatabaseName.ToLower().Contains("practice")) { Text += $" ({Settings.Default.DatabaseName})"; ValidationReminderPanel.BackgroundImage = Resources.ValidationBackground; } else if (Settings.Default.DatabaseName.ToLower().Contains("devel")) { Text += $" ({Settings.Default.DatabaseName})"; ValidationReminderPanel.BackgroundImage = Resources.DevelBackground; } var versionProvider = new VersionProvider(); Text += $", ChiasmaDeposit {versionProvider.GetApplicationVersion()}"; }