コード例 #1
0
 public Task SaveEntryAsync(DiaryEntry entry)
 {
     if (entry.Id == -1)
     {
         return(connection.InsertAsync(entry));
     }
     else
     {
         return(connection.InsertOrReplaceAsync(entry));
     }
 }
コード例 #2
0
        public EditorPage(Account account, DiaryEntry entry = null)
        {
            this.account = account;
            this.entry   = entry == null ? new DiaryEntry()
            {
                AccountName = account == null ? "" : account.Username
            } : entry;

            InitializeComponent();

            if (this.entry.CipherText != null)
            {
                editorEntry.Text = GetDiaryText(this.entry.CipherText);
            }

            btnSave.Clicked   += BtnSaveClicked;
            btnCancel.Clicked += BtnCancelClicked;
        }
コード例 #3
0
 public Task DeleteEntryAsync(DiaryEntry entry)
 {
     return(connection.DeleteAsync(entry));
 }