示例#1
0
        private void ClientTabControl_Selected(object sender, TabControlEventArgs e)
        {
            switch (ClientTabControl.SelectedTab.Name)
            {
                case "FlooderTabPage":
                    RestoreClientControlsColorWhenSwitchingTabs();
                    break;

                case "AnalysisTabPage":
                    GrayOutClientControlsWhenSwitchingTabs();
                    if (!AnalysisMainPanel.Controls.Contains(_AnalysisControl))
                    {
                        _AnalysisControl = new AnalysisControl();
                        _AnalysisControl.Dock = DockStyle.Fill;
                        //_AnalysisControl.HistogramBinSize = HistogramBinSizeTextBox.Text;
                        AnalysisMainPanel.Controls.Add(_AnalysisControl);
                        _AnalysisControl.BringToFront();
                    }
                    break;
            }
        }
 private void ClientTabControl_Selected(object sender, TabControlEventArgs e)
 {
     switch (ClientTabControl.SelectedTab.Name)
     {
         case "FlooderTabPage":
             break;
         case "AnalysisTabPage":
             if (AnalysisMainPanel.Controls.Contains(_AnalysisControl))
             {
                 //_AnalysisControl.RefreshData();
                 _AnalysisControl.BringToFront();
             }
             else
             {
                 _AnalysisControl = new AnalysisControl();
                 _AnalysisControl.Dock = DockStyle.Fill;
                 AnalysisMainPanel.Controls.Add(_AnalysisControl);
                 _AnalysisControl.BringToFront();
             }
             break;
     }
 }