public void SwitchPlayer(PlayerController player) { player.RunAutomation(); this.currentPlayer = player; if (!this.viewpoints.ContainsKey(player.PlayerIndex)) { viewpoints[player.PlayerIndex] = new PlayerViewpoint(this.currentPlayer.Stars.Select(star => convert(star.Position)), StarMinClickRadius); } this.updateSelection(); this.setupPerspective(); this.setupFuelInfo(); var filter = new FilterRepotVisitor(); if (this.currentPlayer.Reports.Any(filter.ShowItem)) { this.reportsButton.ForgroundImage = GalaxyTextures.Get.NewReports; this.showReports(); } else { this.reportsButton.ForgroundImage = GalaxyTextures.Get.Reports; } }
private void fillList() { reportList.Controls.Clear(); var filter = new FilterRepotVisitor(); foreach (var report in reports) { report.Accept(filter); if (!filter.ShowItem) { continue; } var reportItem = new ReportItem(); reportItem.Data = report; reportList.Controls.Add(reportItem); } }
private void fillList() { this.reportList.Controls.Clear(); var filter = new FilterRepotVisitor(); foreach (var report in this.reports.Where(filter.ShowItem)) { this.reportList.Controls.Add(new ReportItem { Data = report }); } if (!this.reports.Any()) { this.reportList.Controls.Add(new Label { AutoSize = true, Text = LocalizationManifest.Get.CurrentLanguage["FormReports"]["noReports"].Text() }); this.openButton.Enabled = false; this.filterButton.Enabled = false; } }