Пример #1
0
 public DuoViewItem(ISampleStorageDuo sampleStorageDuo, LoadSampleStorageDuoDialog duoDialog)
     : base(sampleStorageDuo.GetSampleContainerName())
 {
     MyDuoDialog     = duoDialog;
     MyContainerPath = "";
     this.Checked    = sampleStorageDuo.IsChecked();
     this.Selected   = true;
     this.UseItemStyleForSubItems = false;
     this.SubItems.Add(sampleStorageDuo.GetContainerPath());
 }
Пример #2
0
 private void BarCodeReceived(String barCode)
 {
     try
     {
         HandleReceivedBarCode(barCode);
     }
     catch (BarCodeException ex)
     {
         ShowWarning(ex.Message);
     }
     catch (Exception ex)
     {
         LoadSampleStorageDuoDialog.HandleError(ex.Message, ex);
     }
 }
Пример #3
0
 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");
     }
 }
Пример #4
0
        private void HandleReceivedBarCode(String barCode)
        {
            IGenericContainer container;

            container = GenericContainerManager.GetGenericContainerByBarCode(barCode);
            if (LoadSampleStorageDuoDialog.IsSampleContainer(container))
            {
                SampleContainerListView.Items.Add(new ContainerToBePlacedViewItem(container));
                if (MyPutInContainer != null)
                {
                    OkButton.Enabled = true;
                }
            }
            else if (LoadSampleStorageDuoDialog.IsStorageContainer(container))
            {
                MyPutInContainer           = container;
                PutInContainerTextBox.Text = container.GetIdentifier();
                DialogResult = DialogResult.OK;
            }
            else
            {
                throw new Data.Exception.DataException("This container neither represent a sample container nor a deposit");
            }
        }