コード例 #1
0
        /// <summary>
        /// 创建窗体
        /// </summary>
        public MainForm()
        {
            instance = this;
            InitializeComponent();
            indexDiv      = new IndexDiv();
            indexDiv.Dock = DockStyle.Fill;
            panel1.Controls.Add(indexDiv);
            indexDiv.MouseDown += new MouseEventHandler(indexDiv_MouseDown);

            latestDiv      = new LatestDiv();
            latestDiv.Dock = DockStyle.Fill;
            panel5.Controls.Add(latestDiv);

            gridExtend      = new GridExtend();
            gridExtend.Dock = DockStyle.Fill;
            panel4.Controls.Add(gridExtend);
            SecurityService.Start();

            chartExtend      = new ChartExtend();
            chartExtend.Dock = DockStyle.Fill;
            panel6.Controls.Add(chartExtend);
            latestDiv.SecurityCode = "600000.SH";
            chartExtend.ChangeSecurity("600000.SH");

            ////浮动层
            //FloatDiv floatDiv = new FloatDiv();
            //floatDiv.GridLineColor = Color.Red;
            //floatDiv.Width = 60;
            //floatDiv.Dock = DockStyle.Right;
            //Controls.Add(floatDiv);

            //floatDiv.HeaderHeight = 0;
            //floatDiv.AddColumn(new GridColumn("1"));
            //floatDiv.UpdateGrid();

            //String[] strs = new String[] { "功能1", "功能2", "功能3", "功能4", "功能5", "功能6", "功能7", "功能8", "功能9", "功能10" };
            //for (int i = 0; i < strs.Length; i++)
            //{
            //    GridRow gridRow = new GridRow();
            //    gridRow.Height = 60;
            //    floatDiv.AddRow(gridRow);
            //    GridStringCell cell = new GridStringCell(strs[i]);
            //    cell.Style = new GridCellStyle();
            //    cell.Style.Font = new Font("微软雅黑", 12, FontStyle.Regular);
            //    gridRow.AddCell(0, cell);
            //}
            //floatDiv.UpdateGrid();
            //floatDiv.Invalidate();
            //floatDiv.CellClick += new GridCellMouseEvent(floatDiv_CellClick);
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: yl365/owchart1
        /// <summary>
        /// 创建窗体
        /// </summary>
        public MainForm()
        {
            instance = this;
            InitializeComponent();
            indexDiv      = new IndexDiv();
            indexDiv.Dock = DockStyle.Fill;
            panel1.Controls.Add(indexDiv);
            indexDiv.MouseDown += new MouseEventHandler(indexDiv_MouseDown);

            latestDiv      = new LatestDiv();
            latestDiv.Dock = DockStyle.Fill;
            panel5.Controls.Add(latestDiv);

            gridExtend      = new GridExtend();
            gridExtend.Dock = DockStyle.Fill;
            panel4.Controls.Add(gridExtend);
            SecurityService.Start();

            chartExtend      = new ChartExtend();
            chartExtend.Dock = DockStyle.Fill;
            panel6.Controls.Add(chartExtend);
            latestDiv.SecurityCode = "600000.SH";
            chartExtend.ChangeSecurity("600000.SH");
        }