public MonitorViewModel( Control view, IComponentViewModel viewModel, IRaceViewModel parent) { this.View = view ?? throw new ArgumentNullException(); this.Parent = parent ?? throw new ArgumentNullException(); this.ViewModel = viewModel ?? throw new ArgumentNullException(); this.View.DataContext = viewModel; }
public RaceListViewModel(IRaceViewModel parent) { this.Parent = parent ?? throw new ArgumentNullException(); this.NewCommandViewModel = new CommandViewModel( "New", "Create a new race", () => this.Parent.NewAsync()); this.StopRaceCommandViewModel = new CommandViewModel( "Stop race", "Stop race", () => this.Parent.StopRaceAsync(), () => this.Parent.CanStopRaceAsync(), withStyle: ButtonStyle.Flat); }
public RaceDetailViewModel(IRaceViewModel parent) { this.Parent = parent; this.UpdateNavigationTabs(); }