private void ExecuteAddSpeed() { AddSpeedWindowViewModel addSpeedWindowViewModel = new AddSpeedWindowViewModel(); Model.Speed Speed = addSpeedWindowViewModel.GetSpeed(); if (Speed != null) { Speeds.Speeds.Add(Speed); } }
private void ExecuteEditSpeed() { if (SelectedSpeed < Speeds.Speeds.Count && SelectedSpeed >= 0) { AddSpeedWindowViewModel addSpeedWindowViewModel = new AddSpeedWindowViewModel(Speeds.Speeds[SelectedSpeed]); Model.Speed Speed = addSpeedWindowViewModel.GetSpeed(); if (Speed != null) { Speeds.Speeds[SelectedSpeed] = Speed; } } }