コード例 #1
0
 public MasterTargetListViewModel()
 {
     TargetProfiles = new ObservableCollection <PersonModel>();
     AlohomoraServices.RegisterService("MasterTargetListViewModel", this);
     DeleteItemCommand    = new ButtonCommand(CanDeleteItem, DeleteItemExecuted);
     TargetDetailsCommand = new ButtonCommand(CanDisplayTargetDetails, DisplayTargetDetails);
     GetPersonModels();
 }
コード例 #2
0
        public TargetProfileViewModel(PersonModel targetModel)
        {
            if (targetModel == null)
            {
                throw new Exception("Target Profile cannot be null");
            }
            else
            {
                TargetProfile = targetModel;
                OnPropertyChanged("TargetProfile");
            }

            AddNoteCommand    = new ButtonCommand(CanExecuteAddNoteText, AddNoteTextExecuted);
            DeleteNoteCommand = new ButtonCommand(CanExecuteDeleteNoteText, DeleteNoteTextExecuted);

            AlohomoraServices.RegisterService("TargetProfileViewModel", this);
        }