コード例 #1
0
        private void OpenTankingSummary()
        {
            if (TankingWindow?.IsOpen == true)
            {
                TankingWindow.Close();
            }
            else
            {
                var tankingSummary = new TankingSummary();
                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();
                }

                Helpers.RepositionCharts(TankingWindow, DamageChartWindow, TankingChartWindow, HealingChartWindow);;

                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, DamageType = tankingSummary.DamageType
                    };
                    Task.Run(() => TankingStatsManager.Instance.RebuildTotalStats(tankingOptions));
                }
            }
        }