예제 #1
0
        /// <summary>
        /// Generates a PDF report.
        /// </summary>
        /// <returns>The actions to generate the report.</returns>
        public IEnumerable <IResult> GenerateReport()
        {
            var reportVm = new ReportSettingsViewModel(MatchManager, _reportGenerationQueueManager, Events);

            reportVm.GenerateReport();
            foreach (var res in reportVm.SaveGeneratedReport())
            {
                yield return(res);
            }
            reportVm.DiscardViewModel(true);
        }
예제 #2
0
        public void Handle(MatchOpenedEvent message)
        {
            //DeactivateItem(ActiveItem, true);
            // We must reconsider, whether we can generate a report now.
            NotifyOfPropertyChange(() => this.CanGenerateReport);
            NotifyOfPropertyChange(() => this.CanSaveMatch);
            NotifyOfPropertyChange(() => this.CanSaveMatchAs);
            NotifyOfPropertyChange(() => this.CanExportExcel);
            NotifyOfPropertyChange(() => this.CanShowPlayer);
            NotifyOfPropertyChange(() => this.CanShowCompetition);
            this.ActivateItem(new MatchViewModel(Events, IoC.GetAll <IResultViewTabItem>().OrderBy(i => i.GetOrderInResultView()), MatchManager, DialogCoordinator));

            var reportVm = new ReportSettingsViewModel(MatchManager, _reportGenerationQueueManager, Events);

            reportVm.GenerateReport();
            reportVm.DiscardViewModel(true);
        }