예제 #1
0
        public HitViewModel()
        {
            CurrentModel = new HitModel();
            Hits         = new ObservableCollection <Hit>(CurrentModel.Hits);

            // פקודת הוספת נפילה לפי מתודה ראשונה
            AddHit = new AddHitCommand(this);
        }
예제 #2
0
 /// <summary>
 /// Constructor. create the Model and the ICommand for the View "submit" button
 /// </summary>
 public HitViewModel()
 {
     currentModel  = new MissleModel();
     addHitCommand = new AddHitCommand(this);
     currentModel.PropertyChanged += (Property, EventArgs) =>
     {
         if (EventArgs.PropertyName == "locations")
         {
             OnPropertyChanged("locations");
         }
     };
 }
 public HitViewModel()
 {
     currentModel  = new MissleModel();
     addHitCommand = new AddHitCommand(this);
     locations     = new ObservableCollection <string>(currentModel.locations);
 }