Example #1
0
 public void ShowCharting(int Type, DataSet ds)
 {
     switch (Type)
     {
         case 0:
             ZendChart chart = new ZendChart();
             chart.Dock = DockStyle.Fill;
             this.panel_charting.Controls.Clear();
             this.panel_charting.Controls.Add(chart);
             chart.ShowCharting(ds);
             break;
         case 1:
             UC_DataGridCharting gridCharting = new UC_DataGridCharting();
             gridCharting.Dock = DockStyle.Fill;
             this.panel_charting.Controls.Clear();
             this.panel_charting.Controls.Add(gridCharting);
             gridCharting.ShowCharting(ds);
             break;
         case 2:
             ZendChart chartOneTime = new ZendChart();
             chartOneTime.groupBox4.Enabled = false;
             chartOneTime.Dock = DockStyle.Fill;
             this.panel_charting.Controls.Clear();
             this.panel_charting.Controls.Add(chartOneTime);
             chartOneTime.ShowChartingForOneTime(ds);
             break;
         case 3: //启动时默认显示方式
             UC_DataGridCharting gridChartingDefault = new UC_DataGridCharting();
             gridChartingDefault.Dock = DockStyle.Fill;
             this.panel_charting.Controls.Clear();
             this.panel_charting.Controls.Add(gridChartingDefault);
             this.MainControl = gridChartingDefault;
             break;
     }
 }
Example #2
0
 public DataTree(UserControl grid)
 {
     this.grid = grid as UC_DataGridCharting;
     InitializeComponent();
 }