コード例 #1
0
        internal void AddSession(ProfileSession profileSession)
        {
            _surfaceProfileChartController.SetSession(profileSession);
            SurfaceProfileChart surfaceProfileChart = _surfaceProfileChartController.CreateProfileChart();

            View.AddNewTab(surfaceProfileChart, profileSession.SessionName);
        }
コード例 #2
0
        internal void AddSession(ProfileSession profileSession)
        {
            _surfaceProfileChartController = new SurfaceProfileChartController();

            _surfaceProfileChartController.OnProfileGraphClicked    += OnProfileGraphClicked;
            _surfaceProfileChartController.InvisibleZonesChanged    += InvokeInvisibleZonesChanged;
            _surfaceProfileChartController.ProfileRemoved           += InvokeProfileRemoved;
            _surfaceProfileChartController.SelectedProfileChanged   += InvokeSelectedProfileChanged;
            _surfaceProfileChartController.IntersectionLinesDrawing += InvokeIntersectionLinesDrawing;

            _surfaceProfileChartController.SetSession(profileSession);
            SurfaceProfileChart surfaceProfileChart = _surfaceProfileChartController.CreateProfileChart(profileSession.ObserverHeight);

            View.AddNewTab(surfaceProfileChart, profileSession.SessionId);
        }
コード例 #3
0
        internal void AddNewTab(SurfaceProfileChart surfaceProfileChart, int sessionId)
        {
            if (profilesTabControl.TabPages.Count > 0)
            {
                var chart = (SurfaceProfileChart)profilesTabControl.SelectedTab.Controls["profileChart"];
                controller.ClearProfileSelection(chart);
            }

            TabPage tabPage = null;

            if (CheckTabExistance(sessionId.ToString(), out tabPage))
            {
                profilesTabControl.SelectedTab = tabPage;
                return;
            }

            string sHeaderTab = $"ֳנאפ³ך";
            string title      = sHeaderTab + $" {profilesTabControl.TabPages.Count + 1}";
            int    i          = 1;

            while (profilesTabControl.TabPages.ContainsKey(title))
            {
                title = sHeaderTab + $" {i + 1}";
                i++;
            }

            tabPage         = new TabPage(title);
            tabPage.Name    = title;
            tabPage.Tag     = sessionId;
            tabPage.Padding = new Padding(0);

            profilesTabControl.TabPages.Add(tabPage);

            var curTab = profilesTabControl.TabPages[profilesTabControl.TabCount - 1];

            surfaceProfileChart.Width  = curTab.Width;
            surfaceProfileChart.Height = curTab.Height;
            surfaceProfileChart.Name   = "profileChart";
            curTab.Controls.Add(surfaceProfileChart);

            profilesTabControl.SelectTab(profilesTabControl.TabCount - 1);
            controller.SetChart(surfaceProfileChart);

            surfaceProfileChart.SetControlSize();
        }
コード例 #4
0
        internal void AddNewTab(SurfaceProfileChart surfaceProfileChart, string sessionName)
        {
            string  title   = $"Graph {profilesTabControl.TabPages.Count + 1}";
            TabPage tabPage = new TabPage(title);

            tabPage.Name = $"Graph {profilesTabControl.TabPages.Count + 1}";
            profilesTabControl.TabPages.Add(tabPage);

            var curTab = profilesTabControl.TabPages[profilesTabControl.TabCount - 1];

            surfaceProfileChart.Width  = curTab.Width;
            surfaceProfileChart.Height = curTab.Height;
            surfaceProfileChart.Name   = "profileChart";
            curTab.Controls.Add(surfaceProfileChart);

            profilesTabControl.SelectTab(profilesTabControl.TabCount - 1);

            surfaceProfileChart.SetControlSize();
        }
コード例 #5
0
 internal void SetChart(SurfaceProfileChart currentChart)
 {
     _surfaceProfileChartController = _surfaceProfileChartController.GetCurrentController(currentChart, this);
 }
コード例 #6
0
 internal void ClearProfileSelection(SurfaceProfileChart chart)
 {
     SetChart(chart);
     _surfaceProfileChartController.InvokeSelectedProfile(-1);
 }
コード例 #7
0
 internal void ChangeChart(SurfaceProfileChart currentChart)
 {
     _surfaceProfileChartController.SetCurrentChart(currentChart, this);
 }