示例#1
0
        /// <summary>
        /// 创建窗体
        /// </summary>
        /// <param name="native">方法库</param>
        public LevelWindow(INativeBase native)
        {
            Load(native, "LevelWindow", "levelWindow");
            RegisterEvents(m_window);
            m_chartLevels                 = GetChart("chartLevels");
            m_chartLevels.HScalePixel     = 20;
            m_chartLevels.HScaleFieldText = "日期";
            CTable dataSource = m_chartLevels.DataSource;

            dataSource.AddColumn(0);
            dataSource.AddColumn(1);
            dataSource.AddColumn(2);
            dataSource.AddColumn(3);
            dataSource.AddColumn(4);
            CDiv div = m_chartLevels.AddDiv();

            div.BackColor             = COLOR.ARGB(255, 255, 255);
            div.LeftVScale.ScaleColor = COLOR.ARGB(50, 105, 217);
            div.HScale.ScaleColor     = COLOR.ARGB(50, 105, 217);
            div.HGrid.GridColor       = COLOR.ARGB(50, 105, 217);
            div.HGrid.LineStyle       = 2;
            PolylineShape ps = new PolylineShape();

            ps.FieldName = 0;
            ps.FieldText = "开发";
            ps.FillColor = COLOR.ARGB(100, 50, 105, 217);
            ps.Color     = COLOR.ARGB(50, 105, 217);
            div.AddShape(ps);
            PolylineShape ps2 = new PolylineShape();

            ps2.FieldName = 3;
            ps2.FieldText = "研发";
            ps2.FillColor = COLOR.ARGB(100, 255, 80, 80);
            ps2.Color     = COLOR.ARGB(255, 80, 80);
            div.AddShape(ps2);
            PolylineShape ps3 = new PolylineShape();

            ps3.FieldName = 4;
            ps3.FieldText = "规范";
            ps3.FillColor = COLOR.ARGB(100, 80, 255, 80);
            ps3.Color     = COLOR.ARGB(80, 255, 80);
            div.AddShape(ps3);
            PolylineShape psTop = new PolylineShape();

            psTop.FieldName = 1;
            div.AddShape(psTop);
            PolylineShape psBottom = new PolylineShape();

            psBottom.FieldName = 2;
            div.AddShape(psBottom);
            m_gridLevels = GetGrid("gridLevels");
            m_gridLevels.RegisterEvent(new GridCellEvent(GridCellEditEnd), EVENTID.GRIDCELLEDITEND);
            BindLevels();
            BindChart();
        }
示例#2
0
        /// <summary>
        /// 创建窗体
        /// </summary>
        /// <param name="native">方法库</param>
        public DialogWindow(INativeBase native)
        {
            Load(native, "DialogWindow", "dialogWindow");
            RegisterEvents(m_window);
            m_divDialogs = GetDiv("divDialogs");
            m_divDialogs.RegisterEvent(new ControlPaintEvent(PaintDiv), EVENTID.PAINT);
            m_gridDialogs = GetGrid("gridDialogs");
            m_gridDialogs.RegisterEvent(new GridCellEvent(GridCellEditEnd), EVENTID.GRIDCELLEDITEND);
            BindDialogs();

            m_chartLevels                 = GetChart("chartLevels");
            m_chartLevels.HScalePixel     = 20;
            m_chartLevels.HScaleFieldText = "日期";
            CTable dataSource = m_chartLevels.DataSource;

            dataSource.AddColumn(0);
            dataSource.AddColumn(1);
            CDiv div = m_chartLevels.AddDiv();

            div.BackColor             = COLOR.ARGB(255, 255, 255);
            div.LeftVScale.ScaleColor = COLOR.ARGB(50, 105, 217);
            div.HScale.ScaleColor     = COLOR.ARGB(50, 105, 217);
            div.HGrid.GridColor       = COLOR.ARGB(50, 105, 217);
            div.HGrid.LineStyle       = 2;
            PolylineShape ps = new PolylineShape();

            ps.FieldName = 0;
            ps.FieldText = "接待量";
            ps.FillColor = COLOR.ARGB(100, 50, 105, 217);
            ps.Color     = COLOR.ARGB(50, 105, 217);
            div.AddShape(ps);
            PolylineShape psBottom = new PolylineShape();

            psBottom.FieldName = 1;
            div.AddShape(psBottom);
            BindChart();
        }