Beispiel #1
0
        internal static void ConstrainTipInfo_back(Layout layout)
        {
            var ditiInfos = layout.DitiInfo.DitiBoxInfos;
            List<DitiBoxInfo> constrainedDitiInfos = new List<DitiBoxInfo>();
            if (ditiInfos == null)
                return;
            //add value for the diti labware without this information
            foreach (var labwareTrait in layout._labwareTraits)
            {
                if (!ditiInfos.Exists( x=>x.label ==  labwareTrait.Label))
                {
                    DitiType ditiType = DitiBox.Parse(labwareTrait.TypeName);
                    constrainedDitiInfos.Add(new DitiBoxInfo(ditiType,labwareTrait.Label, 96));
                }
            }
            foreach (var tipInfo in ditiInfos)
            {
                LabwareTrait labwareTrait = layout._labwareTraits.Find(x => x.Label == tipInfo.label);
                if (Labware.IsDiti(labwareTrait.TypeName))
                {
                    constrainedDitiInfos.Add(tipInfo);
                }
            }

            layout.DitiInfo.DitiBoxInfos = constrainedDitiInfos;
            if (layout.DitiInfo.DitiBoxInfos.Count == 0)
            {
                foreach(var ditiInfo in constrainedDitiInfos)
                {
                    if (layout.DitiInfo.GetCurrentLabel(ditiInfo.type) != "")
                        layout.DitiInfo.DitiBoxInfos.Add(new DitiBoxInfo(ditiInfo.type, ditiInfo.label,96));
                }
            }

        }
Beispiel #2
0
        static public Labware CreateFromTrait(LabwareTrait labwareTraitItem, Carrier parentCarrier = null)
        {
            // TODO: Complete member initialization
            List <Labware> labwares    = new List <Labware>(PipettorElementManager.Instance.Labwares);
            var            baseLabware = labwares.Find(x => x.TypeName == labwareTraitItem.TypeName);

            if (baseLabware == null)
            {
                return(null);
            }
            //throw new Exception(string.Format("Cannot find the specified labware: ", labwareTraitItem.TypeName));
            var newLabware = (Labware)baseLabware.Clone();

            newLabware.Label         = labwareTraitItem.Label;
            newLabware.SiteID        = labwareTraitItem.SiteID;
            newLabware.ParentCarrier = parentCarrier;
            return(newLabware);
        }
Beispiel #3
0
 public NoEngouhDitiException(LabwareTrait labwareTrait, int needTipCnt)
 {
     LabwareTrait = labwareTrait;
     NeedTipCount = needTipCnt;
 }