internal void AddSession(ProfileSession profileSession) { _surfaceProfileChartController.SetSession(profileSession); SurfaceProfileChart surfaceProfileChart = _surfaceProfileChartController.CreateProfileChart(); View.AddNewTab(surfaceProfileChart, profileSession.SessionName); }
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); }
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(); }
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(); }
internal void SetChart(SurfaceProfileChart currentChart) { _surfaceProfileChartController = _surfaceProfileChartController.GetCurrentController(currentChart, this); }
internal void ClearProfileSelection(SurfaceProfileChart chart) { SetChart(chart); _surfaceProfileChartController.InvokeSelectedProfile(-1); }
internal void ChangeChart(SurfaceProfileChart currentChart) { _surfaceProfileChartController.SetCurrentChart(currentChart, this); }