public HitViewModel() { CurrentModel = new HitModel(); Hits = new ObservableCollection <Hit>(CurrentModel.Hits); // פקודת הוספת נפילה לפי מתודה ראשונה AddHit = new AddHitCommand(this); }
/// <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); }