private void btnAcceptNewName_Click(object sender, EventArgs e)
        {
            string   newName = txtCustomName.Text;
            StringId id      = SeparatorResourceManager.convertNameToStringID((string)lbDefaultNames.SelectedItem);

            switch (id)
            {
            case StringId.VialB:
            case StringId.VialBpos:
            case StringId.VialBneg:
                squareVialBarcode = vialBarcodes[1] = newName;
                break;

            case StringId.VialA:
                triangleVialBarcode = vialBarcodes[3] = newName;
                break;

            case StringId.VialC:
                circleVialBarcode = vialBarcodes[2] = newName;
                break;
            }

            DbgView("btnAcceptNewName - calling ApplyVialBarcodes()");  //bdr

            theProtocolModel.ApplyVialBarcodes(tabControl1.SelectedIndex, vialBarcodes);
            this.SetupBarcodeListBox();
        }
        private void UpdateTextbox()
        {
            StringId id = SeparatorResourceManager.convertNameToStringID((string)lbDefaultNames.SelectedItem);

            switch (id)
            {
            case StringId.VialA:
                txtCustomName.Text = triangleVialBarcode;
                break;

            case StringId.VialB:
            case StringId.VialBpos:
            case StringId.VialBneg:
                txtCustomName.Text = squareVialBarcode;
                break;

            case StringId.VialC:
                txtCustomName.Text = circleVialBarcode;
                break;
            }

            bool boEnabled = true;

            if (lbCustomNames.Items[lbDefaultNames.SelectedIndex].ToString() == SeparatorResourceManager.GetSeparatorString(StringId.ReagentNotUsed))
            {
                boEnabled          = false;
                txtCustomName.Text = SeparatorResourceManager.GetSeparatorString(StringId.ReagentNotUsed);
            }
            txtCustomName.Enabled    = boEnabled;
            btnAcceptNewName.Enabled = boEnabled;
        }
        private void btnAcceptNewName_Click(object sender, System.EventArgs e)
        {
            string   newName = txtCustomName.Text;
            StringId id      = SeparatorResourceManager.convertNameToStringID((string)lbDefaultNames.SelectedItem);

            switch (id)
            {
            case StringId.QuadrantBuffer:
                bufferBottleC = customVialNames.bufferBottle = newName;
                break;

            case StringId.WasteTube:
                wasteTubeC = customVialNames.wasteTube = newName;
                break;

            case StringId.NegativeFractionTube:
            case StringId.LysisBufferTube:
            case StringId.LysisBufferNegativeFractionTube:
                lysisBufferTubeC = customVialNames.lysisBufferTube = newName;
                break;

            case StringId.VialB:
            case StringId.VialBpos:
            case StringId.VialBneg:
                selectionCocktailVialC = customVialNames.selectionCocktailVial = newName;
                break;

            case StringId.VialA:
                magneticParticleVialC = customVialNames.magneticParticleVial = newName;
                break;

            case StringId.VialC:
                antibodyCocktailVialC = customVialNames.antibodyCocktailVial = newName;
                break;

            case StringId.SampleTube:
                sampleTubeC = customVialNames.sampleTube = newName;
                break;

            case StringId.SeparationTube:
                separationTubeC = customVialNames.separationTube = newName;
                break;

            case StringId.QuadrantBuffer34:
                bufferBottle34C = customVialNames.bufferBottle34 = newName;
                break;

            case StringId.QuadrantBuffer56:
                bufferBottle56C = customVialNames.bufferBottle56 = newName;
                break;
            }
//			theProtocolModel.SetCustomNames(customNames);
            DbgView("btnAcceptNewName - calling ApplyCustomNames()");              //bdr

            theProtocolModel.ApplyCustomNames(tabControl1.SelectedIndex, customVialNames);
            this.SetupCustomListBox();
        }
        private void UpdateTextbox()
        {
            StringId id = SeparatorResourceManager.convertNameToStringID((string)lbDefaultNames.SelectedItem);

            switch (id)
            {
            case StringId.WasteTube:
                txtCustomName.Text = wasteTubeC;
                break;

            case StringId.SeparationTube:
                txtCustomName.Text = separationTubeC;
                break;

            case StringId.NegativeFractionTube:
            case StringId.LysisBufferTube:
            case StringId.LysisBufferNegativeFractionTube:
                txtCustomName.Text = lysisBufferTubeC;
                break;

            case StringId.VialA:
                txtCustomName.Text = magneticParticleVialC;
                break;

            case StringId.VialB:
            case StringId.VialBpos:
            case StringId.VialBneg:
                txtCustomName.Text = selectionCocktailVialC;
                break;

            case StringId.VialC:
                txtCustomName.Text = antibodyCocktailVialC;
                break;

            case StringId.SampleTube:
                txtCustomName.Text = sampleTubeC;
                break;

            case StringId.QuadrantBuffer:
                txtCustomName.Text = bufferBottleC;
                break;

            case StringId.QuadrantBuffer34:
                txtCustomName.Text = bufferBottle34C;
                break;

            case StringId.QuadrantBuffer56:
                txtCustomName.Text = bufferBottle56C;
                break;
            }
        }