private void OpenTankingSummary() { if (TankingWindow?.IsOpen == true) { TankingWindow.Close(); } else { #pragma warning disable CA2000 // Dispose objects before losing scope var tankingSummary = new TankingSummary(); #pragma warning restore CA2000 // Dispose objects before losing scope tankingSummary.EventsSelectionChange += TankingSummary_SelectionChanged; TankingWindow = new DocumentWindow(dockSite, "tankingSummary", "Tanking Summary", null, tankingSummary); IconToWindow[tankingSummaryIcon.Name] = TankingWindow; Helpers.OpenWindow(TankingWindow); if (DamageWindow?.IsOpen == true || HealingWindow?.IsOpen == true) { TankingWindow.MoveToPreviousContainer(); } RepositionCharts(TankingWindow); if (TankingStatsManager.Instance.GetGroupCount() > 0) { // keep chart request until resize issue is fixed. resetting the series fixes it at a minimum var tankingOptions = new GenerateStatsOptions() { RequestSummaryData = true }; Task.Run(() => TankingStatsManager.Instance.RebuildTotalStats(tankingOptions)); } } }
private void OpenHealingSummary() { if (HealingWindow?.IsOpen == true) { HealingWindow.Close(); } else { var healingSummary = new HealingSummary(); healingSummary.EventsSelectionChange += HealingSummary_SelectionChanged; HealingWindow = new DocumentWindow(dockSite, "healingSummary", "Healing Summary", null, healingSummary); IconToWindow[healingSummaryIcon.Name] = HealingWindow; Helpers.OpenWindow(HealingWindow); if (DamageWindow?.IsOpen == true || TankingWindow?.IsOpen == true) { HealingWindow.MoveToPreviousContainer(); } Helpers.RepositionCharts(HealingWindow, DamageChartWindow, TankingChartWindow, HealingChartWindow); if (HealingStatsManager.Instance.GetGroupCount() > 0) { // keep chart request until resize issue is fixed. resetting the series fixes it at a minimum var healingOptions = new GenerateStatsOptions() { RequestSummaryData = true }; Task.Run(() => HealingStatsManager.Instance.RebuildTotalStats(healingOptions)); } } }