public ProtocolResultVialSelection()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            theProtocolModel = ProtocolModel.GetInstance();

            results = new resultVialChecks();
        }
        private void SetupCheckboxes(int idx)
        {
            //uncheck all
            IEnumerator myEnumerator;

            myEnumerator = lbDefaultNames.CheckedIndices.GetEnumerator();
            int i;

            while (myEnumerator.MoveNext() != false)
            {
                i = (int)myEnumerator.Current;
                lbDefaultNames.SetItemChecked(i, false);
            }

            //load checks
            //bool[] resultVialChecks;
            try
            {
                /*
                 * theProtocolModel.GetResultVialChecks(idx, out resultVialChecks);
                 *              if (resultVialChecks != null)//set checks
                 *              {
                 *                      for(i=0;i<lbDefaultNames.Items.Count;++i)
                 *                      {
                 *                              lbDefaultNames.SetItemChecked(i, resultVialChecks[i]);
                 *                      }
                 *              }
                 */

                results = theProtocolModel.GetResultVialChecks(idx);
                i       = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.SampleTube));
                lbDefaultNames.SetItemChecked(i, results.sampleTube);
                i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.SeparationTube));
                lbDefaultNames.SetItemChecked(i, results.separationTube);
                i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.WasteTube));
                lbDefaultNames.SetItemChecked(i, results.wasteTube);
                i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer));
                lbDefaultNames.SetItemChecked(i, results.bufferBottle);
                i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.getLysisStringFromProtocolClass(protocolClass));
                lbDefaultNames.SetItemChecked(i, results.lysisBufferTube);

                //for rs16
                i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer34));
                lbDefaultNames.SetItemChecked(i, results.bufferBottle34);
                i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer56));
                lbDefaultNames.SetItemChecked(i, results.bufferBottle56);
            }
            catch (Exception) {}
        }