public void SetupListBox() { //TUBE NAMES SYNC lbDefaultNames.Items.Clear(); //general items lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer)); if (SeparatorResourceManager.isPlatformRS16()) { lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer34)); lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer56)); } lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.WasteTube)); lbDefaultNames.Items.Add(SeparatorResourceManager.getLysisStringFromProtocolClass(protocolClass)); lbDefaultNames.Items.Add(SeparatorResourceManager.getVialBStringFromProtocolClass(protocolClass)); lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.VialA)); lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.VialC)); lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.SampleTube)); lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.SeparationTube)); lbDefaultNames.SelectedIndex = 0; this.SetupCustomListBox(); }
public void SetupListBox() { //TUBE NAMES SYNC lbDefaultNames.Items.Clear(); //general items lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer)); if (SeparatorResourceManager.isPlatformRS16()) { lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer34)); lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer56)); } lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.WasteTube)); lbDefaultNames.Items.Add(SeparatorResourceManager.getLysisStringFromProtocolClass(protocolClass)); /* * if ((protocolClass == ProtocolClass.Positive) || (protocolClass == ProtocolClass.HumanPositive) || * (protocolClass == ProtocolClass.MousePositive) || (protocolClass == ProtocolClass.WholeBloodPositive)) * lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.VialBpos)); * else if ((protocolClass == ProtocolClass.Negative) || (protocolClass == ProtocolClass.HumanNegative) || * (protocolClass == ProtocolClass.MouseNegative) || (protocolClass == ProtocolClass.WholeBloodNegative)) * lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.VialBneg)); * else * lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.VialB)); * * lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.VialA)); * lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.VialC)); */ lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.SampleTube)); lbDefaultNames.Items.Add(SeparatorResourceManager.GetSeparatorString(StringId.SeparationTube)); lbDefaultNames.SelectedIndex = 0; }
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) {} }
// set the default vial names as custom names - vial names vary with the type of protocol public void SetDefaultCustomNames() { customVialNames = new customNames(); customVialNames.bufferBottle = SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer); customVialNames.wasteTube = SeparatorResourceManager.GetSeparatorString(StringId.WasteTube); customVialNames.magneticParticleVial = SeparatorResourceManager.GetSeparatorString(StringId.VialA); customVialNames.antibodyCocktailVial = SeparatorResourceManager.GetSeparatorString(StringId.VialC); customVialNames.sampleTube = SeparatorResourceManager.GetSeparatorString(StringId.SampleTube); customVialNames.separationTube = SeparatorResourceManager.GetSeparatorString(StringId.SeparationTube); customVialNames.bufferBottle34 = SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer34); customVialNames.bufferBottle56 = SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer56); customVialNames.lysisBufferTube = SeparatorResourceManager.getLysisStringFromProtocolClass(protocolClass); customVialNames.selectionCocktailVial = SeparatorResourceManager.getVialBStringFromProtocolClass(protocolClass); }
private void UpdateCheckboxes(int idx) { IEnumerator myEnumerator; int i; bool[] resultVialChecks = new bool[8]; for (i = 0; i < 8; ++i) { resultVialChecks[i] = false; } myEnumerator = lbDefaultNames.CheckedIndices.GetEnumerator(); while (myEnumerator.MoveNext() != false) { i = (int)myEnumerator.Current; resultVialChecks[i] = true; } try { i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.SampleTube)); results.sampleTube = lbDefaultNames.GetItemCheckState(i) == CheckState.Checked; i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.SeparationTube)); results.separationTube = lbDefaultNames.GetItemCheckState(i) == CheckState.Checked; i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.WasteTube)); results.wasteTube = lbDefaultNames.GetItemCheckState(i) == CheckState.Checked; i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer)); results.bufferBottle = lbDefaultNames.GetItemCheckState(i) == CheckState.Checked; i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.getLysisStringFromProtocolClass(protocolClass)); results.lysisBufferTube = lbDefaultNames.GetItemCheckState(i) == CheckState.Checked; //for rs16 i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer34)); results.bufferBottle34 = lbDefaultNames.GetItemCheckState(i) == CheckState.Checked; i = lbDefaultNames.Items.IndexOf(SeparatorResourceManager.GetSeparatorString(StringId.QuadrantBuffer56)); results.bufferBottle56 = lbDefaultNames.GetItemCheckState(i) == CheckState.Checked; } catch (Exception) {} //resultVialChecks[0]=false; //lbDefaultNames.SetItemCheckState(0,CheckState.Unchecked); //theProtocolModel.UpdateResultVialChecks(idx, resultVialChecks); theProtocolModel.UpdateResultVialChecks(idx, results); }