Пример #1
0
        public static void DrawWorkers(float[][] wm, float[][] mas, float w)
        {
            GraphPane     pane = Workers.GraphPane;
            PointPairList list = new PointPairList();
            LineItem      myCurve;

            pane.CurveList.Clear();

            list.Add(0, Math.Round(w, 3));
            list.Add(mas[MDIParent.p - 1][MDIParent.z], Math.Round(w, 3));
            myCurve              = pane.AddCurve("Среднее число рабочих", list, Color.Red, SymbolType.None);
            myCurve.Line.Style   = System.Drawing.Drawing2D.DashStyle.Custom;
            myCurve.Line.DashOff = 2;
            myCurve.Line.DashOn  = 3;
            myCurve.Line.Width   = 2f;

            list = new PointPairList();
            for (int i = 0; i < MDIParent.p * 2 - 1; i++)
            {
                if (wm[0][i] != wm[0][i + 1])
                {
                    list.Add(wm[0][i], wm[1][i]);
                    list.Add(wm[0][i + 1], wm[1][i]);
                }
            }
            myCurve           = pane.AddCurve("Рабочие", list, Color.Blue, SymbolType.None);
            myCurve.Line.Fill = new Fill(Color.LimeGreen);

            Workers.AxisChange();
            Workers.Invalidate();
        }