private void GenerateWorklistImpl(string fileName, string assayName, string reactionBarcode, int transferVolume) { ExcelReader excelReader = new ExcelReader(); List <DilutionInfo> rawDilutionInfos = new List <DilutionInfo>(); var folder = Configurations.Instance.WorkingFolder; String commandLineString = System.Environment.CommandLine; if (!File.Exists(fileName)) { throw new Exception(string.Format("指定的excel文件:{0}不存在!", fileName)); } dilutionInfos = excelReader.Read(fileName, ref rawDilutionInfos); SetInfo(string.Format("加载文件:{0}成功!\r\n方法名:{1}\r\n反应板条码:{2}", fileName, assayName, reactionBarcode)); plateViewer = new PlateViewer(new Size(900, 600), new Size(30, 40)); plateViewer.SetDilutionInfos(dilutionInfos); canvas.Children.Add(plateViewer); worklist wklist = new worklist(); wklist.DoJob(assayName, reactionBarcode, dilutionInfos, rawDilutionInfos, out firstPlateBuffer, out secondPlateBuffer, transferVolume); plateViewer.SetBuffer(firstPlateBuffer, secondPlateBuffer); }
public void TestSplitVolume() { List <PipettingInfo> pipettingInfos = new List <PipettingInfo>(); pipettingInfos.Add(new PipettingInfo("src", 1, "dst", 1, 250, 1, SampleType.Norm, "1")); pipettingInfos.Add(new PipettingInfo("src", 2, "dst", 2, 360, 1, SampleType.Norm, "2")); pipettingInfos.Add(new PipettingInfo("src", 3, "dst", 3, 190, 1, SampleType.Norm, "3")); pipettingInfos.Add(new PipettingInfo("src", 4, "dst", 6, 120, 1, SampleType.Norm, "4")); pipettingInfos.Add(new PipettingInfo("src", 5, "dst", 7, 380, 1, SampleType.Norm, "5")); worklist wklist = new worklist(); pipettingInfos = wklist.SplitByVolume(pipettingInfos); Assert.AreEqual(pipettingInfos[1].vol, 70); }