Beispiel #1
0
        /// <summary>
        /// ÅäÖû­°æÏÔʾµÄÏà¹ØÄÚÈÝ
        /// </summary>
        public static DisplayStr confDisplay()
        {
            DisplayStr displayStr = new DisplayStr();

            displayStr.confDefaultDisplay();
            return(displayStr);
        }
Beispiel #2
0
        /// <summary>
        /// 绘制运行图的框架
        /// </summary>
        /// <param name="panel"></param>
        public void drawTable(Graphics g, int panelWidth, int panelHeight, DisplayStr displayStr)
        {
            this.displayStr = displayStr;
            initMatrix();
            Pen pen = new Pen(Color.Indigo, 4f);

            pen = PenStr.outerPen;
            GraphicsPath gPathOuter = createOuter(panelWidth, panelHeight);//生成外框

            g.DrawPath(pen, gPathOuter);

            pen = PenStr.hourPen;
            GraphicsPath gPathStationLine = createStationLine();//生成车站线

            g.DrawPath(pen, gPathStationLine);

            pen = PenStr.trackPen;
            GraphicsPath gPathDummyStation = createDummyStationLine();//生成虚拟车站线

            g.DrawPath(pen, gPathDummyStation);

            pen = PenStr.hourPen;
            GraphicsPath gPathHourLine = createHourLine();//生成小时线

            g.DrawPath(pen, gPathHourLine);

            pen = PenStr.thirtyMPen;
            GraphicsPath gPathThirtyMLine = createThirtyMLine();//生成半小时线

            g.DrawPath(pen, gPathThirtyMLine);

            if (displayStr.displayPrecision == 2 || displayStr.displayPrecision == 10)
            {
                pen = PenStr.tenMPen;
                GraphicsPath gPathTenMLine = createTenMLine();//生成十分格线
                g.DrawPath(pen, gPathTenMLine);
            }

            if (displayStr.displayPrecision == 2)
            {
                pen = PenStr.twoMPen;
                GraphicsPath gPathTwoMLine = createTwoMLine();//生成两分格线
                g.DrawPath(pen, gPathTwoMLine);
            }
        }