private async void ShowNote(SNItem noteItem) { if (noteItem.N_crypted == 1) { PasswordRequestContentDialog dialog = new PasswordRequestContentDialog(noteItem); await dialog.ShowAsync(); if (dialog.Return == PasswordRequestContentDialogReturn.BtnOk) { AddEditeNotePageDataHelper.Clear(); AddEditeNotePageDataHelper.NoteText = Cipher.Decrypt(noteItem.N_text, TmpPassword.NewPassword, noteItem.N_shadow); } else { return; } } Frame.Navigate(typeof(AddEditNotePage), noteItem); }
private async void fltShareNoteViaEmail_Click(object sender, RoutedEventArgs e) { MenuFlyoutItem fi = sender as MenuFlyoutItem; SNItem noteItem = fi.DataContext as SNItem; string messageBody = string.Empty; if (noteItem.N_crypted == 1) { PasswordRequestContentDialog dialog = new PasswordRequestContentDialog(noteItem); await dialog.ShowAsync(); if (dialog.Return == PasswordRequestContentDialogReturn.BtnOk) { messageBody = noteItem.N_caption + ":\n" + Cipher.Decrypt(noteItem.N_text, TmpPassword.NewPassword, noteItem.N_shadow); TmpPassword.Clear(); } else { return; } } else { messageBody = noteItem.N_caption + ":\n" + noteItem.N_text; } EmailMessage emailMessage = new EmailMessage(); emailMessage.Subject = AppConstants.AppMessages[AppConstants.UsedLanguage]["txtAppName"]; emailMessage.Body = messageBody; await EmailManager.ShowComposeNewEmailAsync(emailMessage); }
private async void fltShareNoteViaApps_Click(object sender, RoutedEventArgs e) { MenuFlyoutItem fi = sender as MenuFlyoutItem; SNItem noteItem = fi.DataContext as SNItem; string messageBody = string.Empty; if (noteItem.N_crypted == 1) { PasswordRequestContentDialog dialog = new PasswordRequestContentDialog(noteItem); await dialog.ShowAsync(); if (dialog.Return == PasswordRequestContentDialogReturn.BtnOk) { messageBody = noteItem.N_caption + ":\n" + Cipher.Decrypt(noteItem.N_text, TmpPassword.NewPassword, noteItem.N_shadow); TmpPassword.Clear(); } else { return; } } else { messageBody = noteItem.N_caption + ":\n" + noteItem.N_text; } _dataTransferBody = messageBody; DataTransferManager.ShowShareUI(); }
private async void fltShareNoteViaSMS_Click(object sender, RoutedEventArgs e) { MenuFlyoutItem fi = sender as MenuFlyoutItem; SNItem noteItem = fi.DataContext as SNItem; string messageBody = string.Empty; if (noteItem.N_crypted == 1) { PasswordRequestContentDialog dialog = new PasswordRequestContentDialog(noteItem); await dialog.ShowAsync(); if (dialog.Return == PasswordRequestContentDialogReturn.BtnOk) { messageBody = noteItem.N_caption + ":\n" + Cipher.Decrypt(noteItem.N_text, TmpPassword.NewPassword, noteItem.N_shadow); TmpPassword.Clear(); } else { return; } } else { messageBody = noteItem.N_caption + ":\n" + noteItem.N_text; } var chatMessage = new Windows.ApplicationModel.Chat.ChatMessage(); chatMessage.Body = messageBody; await Windows.ApplicationModel.Chat.ChatMessageManager.ShowComposeSmsMessageAsync(chatMessage); }