예제 #1
0
 public override async Task OnNavigatedFromAsync(bool suspending)
 {
     // logic to execute when navigating from this page
     if (this.TodoItem != null)
     {
         await _todoItemRepository.UpdateTodoItem(this.TodoItem);
     }
 }
예제 #2
0
 public override async Task OnNavigatedFromAsync(IDictionary <string, object> state, bool suspending)
 {
     // logic to execute when navigating from this page
     if (this.TodoItem != null && IsItemModified)
     {
         await _todoItemRepository.UpdateTodoItem(this.TodoItem);
     }
 }
예제 #3
0
        public override async Task OnNavigatedFromAsync(IDictionary <string, object> state, bool suspending)
        {
            // Save current item on suspend
            if (suspending)
            {
                if (SelectedItem != null && SelectedItem.IsItemModified)
                {
                    await _todoItemRepository.UpdateTodoItem(SelectedItem.TodoItem);

                    SelectedItem.IsItemModified = false;
                }
            }
        }
예제 #4
0
        private async void ExecuteUpdateItemCommand(Models.TodoItem param)
        {
            try
            {
                var index = this.ItemVMs.IndexOf(this.SelectedItem);

                await _todoItemRepository.UpdateTodoItem(this.SelectedItem.TodoItem);

                this.SelectedItem = this.ItemVMs[index];
            }
            catch { this.SelectedItem = null; }
        }
예제 #5
0
        protected override async void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            base.OnNavigatingFrom(e);

            if (this._TodoItem != null)
            {
                // TODO: figure out how to resolve locked file from binding
                //if (this._TodoItem.InkUri != null)
                //    await inkNotes.Save(this._TodoItem.InkUri);
                //else
                this._TodoItem.InkUri = await inkNotes.Save();

                await _todoItemRepository.UpdateTodoItem(this._TodoItem);
            }
        }