コード例 #1
0
ファイル: ReadViewModel.cs プロジェクト: Ryanor/Notes3.0
        public async void DeleteNote()
        {

            DialogService dialog = new DialogService();
            await dialog.ShowMessage("Do you really want to delete the selected note?", "Delete selected note!", "YES, delete", "NO, let me return",
                async confirmed =>
                {
                    if (confirmed)
                    {
                        await dataService.DeleteNote(SelectedNote);
                    }

                });
        }
コード例 #2
0
ファイル: EditViewModel.cs プロジェクト: Ryanor/Notes3.0
 public void SaveEditedNote()
 {
     if (HasNoteChanged)
     {
         DialogService dialog = new DialogService();
         dialog.ShowMessage("Save changes to note?", "Save changes", "YES, save", "NO, let me return",
             async confirmed =>
             {
                 if (confirmed)
                 {
                     await dataService.SaveNote(Note);
                     navigationService.GoBack();
                 }
             });
     }
 }
コード例 #3
0
ファイル: CreateViewModel.cs プロジェクト: Ryanor/Notes3.0
        public void CancelNewNote()
        {
            if (String.IsNullOrEmpty(NewTextTitle))
            {

                _navigationService.GoBack();
            }
            else
            {
                DialogService dialog = new DialogService();
                dialog.ShowMessage("Your note is not saved, Cancel without saving?", "Note not saved!", "Quit anyway", "Let me return",
                    confirmed =>
                    {
                        if (confirmed)
                        {
                            NewTextTitle = String.Empty;
                            NewTextNote = String.Empty;
                            _navigationService.GoBack();
                        }

                    });
            }
        }
コード例 #4
0
 private async void ReceiveMessage(ShowMessageDialog action)
 {
     DialogService dialogService= new DialogService();
     await dialogService.ShowMessage(action.Message, "Sample Universal App");
 }
コード例 #5
0
ファイル: EditViewModel.cs プロジェクト: Ryanor/Notes3.0
 public void NavigateBack()
 {
     if (HasNoteChanged)
     {
         DialogService dialog = new DialogService();
         dialog.ShowMessage("Cancel without saving changes?", "Cancel edit mode!", "YES, cancel", "NO, let me return",
             confirmed =>
             {
                 if (confirmed)
                 {
                     navigationService.GoBack();
                 }
             });
     }
     else
     {
         navigationService.GoBack();
     }
    
 }
コード例 #6
0
ファイル: SearchViewModel.cs プロジェクト: Ryanor/Notes3.0
        public void DeleteNote()
        {

            DialogService dialog = new DialogService();
            dialog.ShowMessage("Do you really want to delete the selected note?", "Delete selected note!", "YES, delete", "NO, let me return",
                confirmed =>
                {
                    if (confirmed)
                    {
                        dataService.DeleteNote(SelectedNote);
                        RaisePropertyChanged(() => ReadList);
                    }

                });
        }