public void SetCommonCheck(CheckViewModel checkVM) { var friendVM = new FriendViewModel(new Friend() { Name = PageTitles.COMMON_CHECK, Image = ImageSource.FromResource(ImagePaths.Checks) }); Checks.Add(new FriendCheckViewModel(friendVM, checkVM.Check)); }
public CheckEditorViewModel(CheckViewModel checkVM) { checksListsVM = App.Container.Get <ChecksListsViewModel>(); Checks = new ObservableCollection <FriendCheckViewModel>(); SelectedFriendVM = new FriendViewModel(); SetCommonCheck(checkVM); friendCheckVM = GetFriendCheckVM(); InfoCommand = new AsyncCommand(ShowInfo); SelectFriendCommand = new AsyncCommand(SelectFriend); MarkProductCommand = new AsyncCommand <CheckItemViewModel>(MarkProduct); CreateCheckCommand = new AsyncCommand(CreateCheck); AddToMyChecksCommand = new AsyncCommand(AddToMyChecks); SendCheckCommand = new AsyncCommand <FriendCheckViewModel>(SendCheck); RemoveCheckCommand = new AsyncCommand <FriendCheckViewModel>(RemoveCheck); }