Beispiel #1
0
        public async void AddMemo()
        {
            var memo = new Memo
            {
                Title   = null,
                Content = null
            };
            var viewModel = new AddMemoViewModel(_pageService, _sqlite, memo);

            viewModel.MemoAdded += (source, args) =>
            {
                PopulateList(args);
            };

            await _pageService.PushAsync(new AddMemo(viewModel));
        }
Beispiel #2
0
        public async void MemoSelected()
        {
            var memo = SelectedMemo;

            if (memo != null)
            {
                var viewModel = new AddMemoViewModel(_pageService, _sqlite, memo);

                viewModel.MemoUpdated += (source, updatedMemo) =>
                {
                    memo.Id      = updatedMemo.Id;
                    memo.Title   = updatedMemo.Title;
                    memo.Content = updatedMemo.Content;

                    var list = MemoList;
                    // LoadDataCommand.Execute(null);
                    var foo = SelectedMemo;
                };


                await _pageService.PushAsync(new AddMemo(viewModel));
            }
        }