private void InitWorkTableUI() { //package setting int smpCount = Helper.ReadSampleCount(); txtSampleCount.Text = smpCount.ToString(); PipettingSettings pipettingSettings = Utility.LoadPipettingSettings(); txtPlasmaCount.Text = pipettingSettings.dstPlasmaSlice.ToString();//pipettingSettings.dstPlasmaSlice.ToString(); txtBuffyCount.Text = pipettingSettings.dstbuffySlice.ToString(); PackageInfo packageInfo = new PackageInfo(smpCount, runResult.plasmaTotalSlice, runResult.buffySlice); prgController = new ProgressController(txtThisStageUsed, txtThisStageRemaining, txtTotalUsed, txtTotalRemaining, prgThisStage, prgTotal, packageInfo); int wellsPerLabware = 16; int srcSmpGrids = labwareSettings.sourceLabwareGrids; owenerDrawGrid.RowDefinitions[0].Height = new GridLength(this.ActualHeight * 0.8); workTableUI = new WorkTableUI(workTableGrid.ActualWidth, workTableGrid.ActualHeight, srcSmpGrids, wellsPerLabware, prgController); workTableGrid.Children.Add(workTableUI); stageInfo.curStage = Stage.Measure; stageInfo.farthestStage = Stage.Measure; lstSteps.SelectedIndex = 0; }
public PipettingUI(double w, double h, int wellsPerLabware, ProgressController prgController) : base(w, h) { this.prgController = prgController; this.wellsPerLabware = wellsPerLabware; runResult = RunResultReader.Read(); //smpInfos = RunResultReader.Read(); pipettingSettings = Utility.LoadPipettingSettings(); layoutInfo = new LayoutInfo(pipettingSettings); }
public static PipettingSettings LoadPipettingSettings() { PipettingSettings pipettingSettings = new PipettingSettings(); string sFile = GetExeFolder() + "\\pipettingSettings.XML"; if (!File.Exists(sFile)) { throw new Exception("Failed to load pipettingSetting from xml, file doesnot exist!"); } string sPipettingXMLContent = File.ReadAllText(sFile); pipettingSettings = Utility.Deserialize <PipettingSettings>(sPipettingXMLContent); return(pipettingSettings); }
public LayoutInfo(PipettingSettings pipettingSettings) { cellX = 3; cellY = 0.8; cellXGap = 0.6; cellYGap = 0.2; yTopMargin = 1; yBottomMargin = 2.6; xLeftMargin = 2; xRightMargin = xLeftMargin; xTotalUnits = xLeftMargin + xRightMargin; int tipCount = EVOPipettingInfoGlobal.Value.tipsCount; xTotalUnits += tipCount * cellX; xTotalUnits += (tipCount - 1) * cellXGap; yTotalUnits = yTopMargin + yBottomMargin; int totalSlice = pipettingSettings.dstbuffySlice + pipettingSettings.dstPlasmaSlice; yTotalUnits += totalSlice * cellY; yTotalUnits += (totalSlice - 1) * cellYGap; }