Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     //初始化
     countryChart.Dispose();
     dockContainer.Dispose();
     dockClear();
     countryChart  = new ChartControl();
     dockContainer = new ControlContainer();
     //显示dock
     dockShow();
     dockpanel.Resize += new System.EventHandler(this.dockpanel_Resize);
     dockContainer.Controls.Add(countryChart);
     dockpanel.Controls.Add(dockContainer);
     //设置属性
     dockContainer.Location            = new System.Drawing.Point(0, 0);
     dockContainer.Name                = "country_Container";
     dockContainer.Size                = new Size(dockpanel.Size.Width, dockpanel.Size.Height - 30);
     dockContainer.TabIndex            = 0;
     countryChart.Size                 = new Size(dockpanel.Size.Width, dockpanel.Size.Height - 20);
     countryChart.RuntimeHitTesting    = true;
     countryChart.MouseUp             += CountryChart_MouseUp;
     countryChart.CustomDrawCrosshair += CountryChart_CustomDrawCrosshair;
     //填充数据
     showChart(countryChart, "country", "ARM");
 }
Exemplo n.º 2
0
        public void Dispose()
        {
            if (ControlContainer != null)
            {
                ControlContainer.Dispose();
            }

            GC.SuppressFinalize(this);
        }