コード例 #1
0
        private void ExecuteAddSpeed()
        {
            AddSpeedWindowViewModel addSpeedWindowViewModel = new AddSpeedWindowViewModel();

            Model.Speed Speed = addSpeedWindowViewModel.GetSpeed();
            if (Speed != null)
            {
                Speeds.Speeds.Add(Speed);
            }
        }
コード例 #2
0
 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;
         }
     }
 }