Ejemplo n.º 1
0
        public override void DrawPoints(Graphics g)
        {
            //base.DrawPoints(g);

            GraphicsPath path = new GraphicsPath();

            path.AddEllipse(rect);
            SolidBrush brush = new SolidBrush(FillColor1);

            if (bShowText)
            {
                string sVar = "AV" + ShowText.PadLeft(3, '0');
                CVar   nVar = frmMain.staComm.GetVarByStaNameVarName("NJ301", sVar);

                if (nVar != null)
                {
                    bValue = nVar.GetBoolValue();
                }
            }
            if (bValue)
            {
                brush.Color = FillColor0;
            }
            g.FillPath(brush, path);
            g.DrawEllipse(new Pen(LineColor, iLineWidth), rect);
            if (bShowText)
            {
                g.DrawString(ShowText, DrawFont, FontBrush, TextRect, TextFormat);
            }
        }
Ejemplo n.º 2
0
 public void CalcUseWeight()
 {
     try
     {
         if (nVarThrough.GetBoolValue())
         {
             double n_MO = (nVarMFC.GetDoubleValue() * PMO) / (22414 * (nVarP.GetDoubleValue() - PMO));
             UseWeight += n_MO * MW / 60;
         }
     }
     catch (Exception ex)
     {
     }
 }