private void DrawDilution(int wellID, int xStart, int yStart, DrawingContext drawingContext) { double width = GetWellWidth(); double height = GetWellHeight(); PipettingInfo pipettingInfo = null; var plateBuffer = plate2Show == Plate2Show.dilution1 ? firstPlateBuffer : secondPlateBuffer; if (plateBuffer == null || !plateBuffer.Exists(x => x.dstWellID == wellID)) { return; } DrawColor(wellID, xStart, yStart, drawingContext); var sameDstWellIDBuffers = plateBuffer.Where(x => x.dstWellID == wellID).ToList(); pipettingInfo = sameDstWellIDBuffers.First(); bool firstBuffer = pipettingInfo.srcLabware == Configurations.Instance.Buffer1LabwareName; if (firstBuffer) { drawingContext.DrawEllipse(null, new Pen(Brushes.Red, 2), new Point(xStart + width / 2, yStart + height / 2), width / 8, height / 8); } int xOffset = 10; string txt = pipettingInfo.analysisNo; string lowerTxt = pipettingInfo.dilutionTimes.ToString(); DrawText(txt, new Point(xStart + xOffset / 3, yStart + height / 10), drawingContext, 16); DrawText(lowerTxt, new Point(xStart + xOffset, yStart + height / 3), drawingContext); }
private static string GetCorrespondingVal(int index, PipettingInfo pipettingInfo) { switch (index) { case 0: return(pipettingInfo.analysisNo); case 1: return(pipettingInfo.srcLabware); case 2: return(pipettingInfo.srcWellID.ToString()); case 3: return(pipettingInfo.vol.ToString()); case 4: return(pipettingInfo.dstLabware); case 5: return(pipettingInfo.dstWellID.ToString()); default: throw new Exception("Invalid column index!"); } }
private void AddScript(PipettingInfo pipettingInfo, List<string> strs) { strs.Add(GetAspirate(pipettingInfo.srcLabware, pipettingInfo.srcWellID, pipettingInfo.volume)); strs.Add(GetDispense(pipettingInfo.dstLabware, pipettingInfo.dstWellID, pipettingInfo.volume)); strs.Add("W;"); }