public MainWindowTabPageAdapter(UI.Presenters.MainForm.IPresenter mainFormPresenter) : this()
 {
     mainFormPresenter.AddCustomTab(this.View, "Postprocessing", this);
     mainFormPresenter.TabChanging += (sender, e) =>
     {
         if (e.CustomTabTag == this)
         {
             eventsHandler.OnTabPageSelected();
         }
     };
 }
 void LoadTabExtensions()
 {
     foreach (PluginBase plugin in plugins)
     {
         foreach (IMainFormTabExtension ext in plugin.MainFormTabExtensions)
         {
             mainFormPresenter.AddCustomTab(
                 ext.PageControl,
                 ext.Caption,
                 ext
                 );
         }
     }
 }
Exemple #3
0
        public TabPage(UI.Presenters.MainForm.IPresenter mainFormPresenter)
        {
            InitializeComponent();
            this.SetStyle(ControlStyles.Selectable, true);
            this.Dock = DockStyle.Fill;

            postprocessorsControls[ViewControlId.StateInspector] = new PostprocessorControls(stateInspectorLinkLabel, stateInspectorLinkLabel, stateInspectorProgressBar);
            postprocessorsControls[ViewControlId.Sequence]       = new PostprocessorControls(sequenceDiagramLinkLabel, sequenceDiagramLinkLabel, sequenceDiagramProgressBar);
            postprocessorsControls[ViewControlId.TimeSeries]     = new PostprocessorControls(timeSeriesLinkLabel, timeSeriesLinkLabel, timeSeriesProgressBar);
            postprocessorsControls[ViewControlId.Timeline]       = new PostprocessorControls(timelineLinkLabel, timelineLinkLabel, timelineProgressBar);
            postprocessorsControls[ViewControlId.Correlate]      = new PostprocessorControls(null, correlationAction1LinkLabel, correlationProgressBar);

            postprocessorsControls[ViewControlId.LogsCollectionControl1] = new PostprocessorControls(null, logsCollectionControlLinkLabel1, logsCollectionControlProgressBar1);
            postprocessorsControls[ViewControlId.LogsCollectionControl2] = new PostprocessorControls(null, logsCollectionControlLinkLabel2, logsCollectionControlProgressBar2);
            postprocessorsControls[ViewControlId.LogsCollectionControl3] = new PostprocessorControls(null, logsCollectionControlLinkLabel3, null);

            postprocessorsControls[ViewControlId.AllPostprocessors] = new PostprocessorControls(runAllPostprocessorsLinkLabel, runAllPostprocessorsLinkLabel, allPostprocessorsProgressBar);

            foreach (var x in postprocessorsControls)
            {
                x.Value.link.LinkClicked += (s, e) =>
                {
                    if (!string.IsNullOrEmpty(e.Link.LinkData as string))
                    {
                        eventsHandler.OnActionClick((string)e.Link.LinkData, x.Key, GetClickFlags());
                    }
                };
            }

            // todo: create when there a least one postprocessor exists. Postprocessors may come from plugings or it can be internal trace.

            mainFormPresenter.AddCustomTab(this, "Postprocessing", this);
            mainFormPresenter.TabChanging += (sender, e) =>
            {
                if (e.CustomTabTag == this)
                {
                    eventsHandler.OnTabPageSelected();
                }
            };
        }