コード例 #1
0
        private Color GetWellColorPipetting(int thisID)
        {
            EVOPipettingInfo pipettingInfo = EVOPipettingInfoGlobal.Value;

            if (pipettingInfo.bFinished)
            {
                return(Colors.Green);
            }

            int startID = EVOPipettingInfoGlobal.GetStartID(wellsPerLabware);
            int endID   = startID + EVOPipettingInfoGlobal.Value.tipsCount - 1;

            if (thisID < startID)
            {
                return(Colors.Green);
            }
            else if (thisID > endID)
            {
                return(Colors.Gray);
            }
            else
            {
                return(frame % 2 == 0 ? Colors.Green : Colors.Yellow);
            }
        }
コード例 #2
0
        protected override void OnRender(DrawingContext drawingContext)
        {
            frame++;
            base.OnRender(drawingContext);
            double usableWidth, usableHeight;

            CalcuUsable(out usableWidth, out usableHeight);
            int        startID = EVOPipettingInfoGlobal.GetStartID(wellsPerLabware);
            int        endID   = startID + EVOPipettingInfoGlobal.Value.tipsCount - 1;
            List <int> thisBatchPlasmaSlices = GetThisBatchInfo(startID, endID);
            double     unit = usableWidth / layoutInfo.xTotalUnits;

            double xStart = unit * layoutInfo.xLeftMargin;
            double yStart = unit * layoutInfo.yTopMargin;

            for (int i = 0; i < thisBatchPlasmaSlices.Count; i++)
            {
                double xPos = xStart + i * (layoutInfo.cellX + layoutInfo.cellXGap) * unit;
                DrawSample(thisBatchPlasmaSlices[i], unit, xPos, yStart, drawingContext);
            }
        }