private void ShowReportsImplementation() { if (_currentReportsViewModel == null) { try { _currentReportsViewModel = new ReportsViewModel( _synchronizationReportRepository, _optionsDataAccess.Load().ToDictionary(o => o.Id, o => o.Name), this); _currentReportsViewModel.ReportsClosed += delegate { _currentReportsViewModel = null; }; _uiService.Show(_currentReportsViewModel); } catch { _currentReportsViewModel = null; throw; } } else { _currentReportsViewModel.RequireBringToFront(); } }
public void SetVisible() { if (_viewModelOrNull == null) { var viewModel = new TransientProfileStatusesViewModel(_commands, OnOptionsRequesting()); _viewModelOrNull = viewModel; _viewModelOrNull.Closing += _viewModelOrNull_Closing; _uiService.Show(viewModel); } else { _viewModelOrNull.BringToFront(); } }
public void SetVisible() { if (_viewModelOrNull == null) { var viewModel = new TransientProfileStatusesViewModel(_commands, OnOptionsRequesting()); foreach (var kv in _summaryChache.SummaryByProfileId) { if (kv.Value.HasValue) { viewModel.Update(kv.Key, kv.Value.Value); } } _viewModelOrNull = viewModel; _viewModelOrNull.Closing += _viewModelOrNull_Closing; _uiService.Show(viewModel); } else { _viewModelOrNull.BringToFront(); } }