Esempio n. 1
0
        public void ShowPane()
        {
            RemovePane();
            UserControl userCtrl;
            string      title;

            switch (CurrentMode)
            {
            case Mode.AnalysisPerSheet:
                userCtrl = new UCtrlPerSheetAnalysis();
                title    = UCtrlPerSheetAnalysis.TaskPaneTitle;
                break;

            case Mode.AnalysisPerRow:
                userCtrl = new UCtrlPerRowAnalysis();
                title    = UCtrlPerRowAnalysis.TaskPaneTitle;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            var customPane = CustomTaskPanes.Add(userCtrl, title);

            customPane.Width   = userCtrl.Width + 300;
            customPane.Visible = true;
        }
        public void ShowPane()
        {
            RemovePane();
            UserControl userCtrl = null;
            string      title    = string.Empty;

            switch (CurrentMode)
            {
            case Mode.ANALYSIS_PERSHEET:
                userCtrl = new UCtrlPerSheetAnalysis();
                title    = UCtrlPerSheetAnalysis.TaskPaneTitle;
                break;

            case Mode.ANALYSIS_PERROW:
                userCtrl = new UCtrlPerRowAnalysis();
                title    = UCtrlPerRowAnalysis.TaskPaneTitle;
                break;

            default: break;
            }
            var customPane = CustomTaskPanes.Add(userCtrl, title);

            customPane.Width   = userCtrl.Width + 300;
            customPane.Visible = true;
        }