public MeterViewModel(ApplicationEvents.ShowOverlay showOverlayRequest) { this.ShowPopupGraphCommand = new DelegateCommand(() => { }); this.ShowPopupRosterCommand = new DelegateCommand(() => showOverlayRequest.Publish(PageNames.RosterPopUp)); this.LevelIncreaseCommand = new DelegateCommand(() => this.Competitor.RequiredImpactLevel += 5); this.LevelDecreaseCommand = new DelegateCommand(() => this.Competitor.RequiredImpactLevel -= 5); }
public MainViewModel(IRegionManager regionManager, ApplicationEvents.ShowOverlay showOverlayRequest) { showOverlayRequest.Subscribe( viewName => { object view = regionManager.Regions[RegionNames.OverlayRegion].GetView(viewName); regionManager.Regions[RegionNames.OverlayRegion].Activate(view); this.PopupVisible = true; }, ThreadOption.UIThread, true); this.CloseCommand = new DelegateCommand(delegate { this.PopupVisible = false; }); }