Esempio n. 1
0
        private void mainTab_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (mCurrentPanel != null)
            {
                mCurrentPanel.Active = false;
                mCurrentPanel        = null;
            }

            if (mainTab.SelectedTab == graphsTab)
            {
                //mCore.Tick -= mTickListener;
                updateTimer.Enabled = false;

                foreach (var series in mCurrentSeries.Values)
                {
                    series.Points.Clear();
                }
                foreach (var series in mMeanSeries.Values)
                {
                    series.Points.Clear();
                }

                mStart = DateTime.UtcNow;

                //mCore.Tick += mTickListener;
                updateTimer.Enabled = true;
            }
            else if (mainTab.SelectedTab == individualTab && mCurrentPanel != null)
            {
                mCurrentPanel.Active = true;
            }
        }
        public OverlayPluginPanel(OverlayPlugin overlayPlugin)
            : this()
        {
            mOverlayPlugin = overlayPlugin;

            if (overlayPlugin.CurrentState != null)
                stateList.SelectedItem = overlayPlugin.CurrentState;

            mOverlayPlugin.StateChanged += new Action<State>(mOverlayPlugin_StateChanged);

            foreach (var state in mOverlayPlugin.States)
                stateList.Items.Add(state);

            stateSelector.Init(overlayPlugin.States);
            triggerSelector.Init(overlayPlugin.Triggers);
            imageTransitionSelector.Init(overlayPlugin.ImageTransitions);
            transitionStyleSelector.Init(overlayPlugin.Transitions);
            featureSelector.Init(overlayPlugin.Features);
            selectionRendererSelector.Init(overlayPlugin.Renderers);

            foreach (var factory in overlayPlugin.GetFactories<State>())
                stateFactoriesList.Items.Add(factory);
            foreach (var factory in overlayPlugin.GetFactories<ITrigger>())
                triggerFactoriesList.Items.Add(factory);
            foreach (var factory in overlayPlugin.GetFactories<IFeatureTransition>())
                imageTransitionFactoriesList.Items.Add(factory);
            foreach (var factory in overlayPlugin.GetFactories<ITransitionStyle>())
                transitionStyleFactoriesList.Items.Add(factory);
            foreach (var factory in overlayPlugin.GetFactories<IFeature>())
                featuresFactoryList.Items.Add(factory);
            foreach (var factory in overlayPlugin.GetFactories<ISelectionRenderer>())
                selectionRendererFactoriesList.Items.Add(factory);

            #if DEBUG
            foreach (var frameManager in mOverlayPlugin.OverlayManagers) {
                StatisticsPanel p = new StatisticsPanel(frameManager.Statistics, mOverlayPlugin.Core);
                p.Dock = DockStyle.Fill;
                mStatsPanels.Add(frameManager.Name, p);

                TabPage page = new TabPage();
                page.Text = frameManager.Name;
                page.Name = frameManager.Name;
                page.Controls.Add(p);

                statsTabs.Controls.Add(page);
            }
            #endif
        }
Esempio n. 3
0
        private void namesList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (mCurrentPanel != null)
            {
                mCurrentPanel.Visible = false;
                mCurrentPanel.Active  = false;
                mCurrentPanel         = null;
            }
            if (namesList.SelectedItem != null)
            {
                string name = namesList.SelectedItem as String;
                if (!mPanels.ContainsKey(name))
                {
                    StatisticsPanel panel = new StatisticsPanel(mCollection[name], mCore);
                    mPanels.Add(name, panel);
                    panel.Dock = DockStyle.Fill;
                    individualSplit.Panel2.Controls.Add(panel);
                }

                mCurrentPanel         = mPanels[name];
                mCurrentPanel.Active  = true;
                mCurrentPanel.Visible = true;
            }
        }
        private void namesList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (mCurrentPanel != null) {
                mCurrentPanel.Visible = false;
                mCurrentPanel.Active = false;
                mCurrentPanel = null;
            }
            if (namesList.SelectedItem != null) {
                string name = namesList.SelectedItem as String;
                if (!mPanels.ContainsKey(name)) {
                    StatisticsPanel panel = new StatisticsPanel(mCollection[name], mCore);
                    mPanels.Add(name, panel);
                    panel.Dock = DockStyle.Fill;
                    individualSplit.Panel2.Controls.Add(panel);
                }

                mCurrentPanel = mPanels[name];
                mCurrentPanel.Active = true;
                mCurrentPanel.Visible = true;
            }
        }
        private void mainTab_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (mCurrentPanel != null) {
                mCurrentPanel.Active = false;
                mCurrentPanel = null;
            }

            if (mainTab.SelectedTab == graphsTab) {
                //mCore.Tick -= mTickListener;
                updateTimer.Enabled = false;

                foreach (var series in mCurrentSeries.Values)
                    series.Points.Clear();
                foreach (var series in mMeanSeries.Values)
                    series.Points.Clear();

                mStart = DateTime.UtcNow;

                //mCore.Tick += mTickListener;
                updateTimer.Enabled = true;
            } else if (mainTab.SelectedTab == individualTab && mCurrentPanel != null)
                mCurrentPanel.Active = true;
        }
        private void statsTabs_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (mCurrentPanel != null)
                mCurrentPanel.Active = false;

            if (mainTab.SelectedTab == statsTab) {
                mCurrentPanel = mStatsPanels[statsTabs.SelectedTab.Name];
                mCurrentPanel.Active = true;
            }
        }