public FallReportVM() { PredictionAndRealFalls = PredictionAndRealFallsVM.Instance; CurrentModel = new ManageFallReportModel(); Reports = new ObservableCollection <Report>(CurrentModel.AllFallReports()); Add = new AddReportCommand(this); Reports.CollectionChanged += FallReports_CollectionChanged; }
/// <summary> /// Constructor, creates the Model and the ICommand for the "sumit" button of the View /// </summary> public ReportViewModel() { currentModel = new MissleModel(); addReportCommand = new AddReportCommand(this); currentModel.PropertyChanged += (Property, EventArgs) => { if (EventArgs.PropertyName == "locations") { OnPropertyChanged("locations"); } }; }
public TheViewModel() { CurrentModel = new Model.Model(); TheFall = CurrentModel.CurFall; TheReportFall = CurrentModel.CurRepFall; TheUser = CurrentModel.CurUser; AddRepCom = new AddReportCommand(this); AddFallCom = new AddFallCommand(this); RepBtnCom = new ReportBtnCommand(this); FallBtnCom = new FallBtnCommand(this); loadCom = new loadImageCommand(this); AnalysisBtnCom = new GraphsCommand(this); MapsBtnCom = new MapsCommand(this); }
public ReportViewModel() { CurrentModel = new ReportModel(); addRepCom = new AddReportCommand(this); }