コード例 #1
0
 private static async Task MergeFileIntoNote(StorageFile file, Note note)
 {
     note.DateCreated = file.DateCreated.LocalDateTime;
     BasicProperties properties = await file.GetBasicPropertiesAsync();
     note.DateModified = properties.DateModified.LocalDateTime;
     note.Name = file.Name;
     note.Text = await FileIO.ReadTextAsync(file);
     note.MarkAsClean();
 }
コード例 #2
0
 public static async Task WriteToStorageAsync(Note note)
 {
     if (note.IsDirty)
     {
         var save = StorageManager.SaveFileAsync(note.Name, note.Text);
         note.MarkAsClean();
         await save;
         note.DateModified = DateTime.Now;
     }
 }
コード例 #3
0
 public static async Task WriteToStorageAsync(Note note)
 {
     if (note.IsDirty)
     {
         var save = StorageManager.SaveFileAsync(note.Name, note.Text);
         note.MarkAsClean();
         await save;
         note.DateModified = DateTime.Now;
     }
 }
コード例 #4
0
        private static async Task MergeFileIntoNote(StorageFile file, Note note)
        {
            note.DateCreated = file.DateCreated.LocalDateTime;
            BasicProperties properties = await file.GetBasicPropertiesAsync();

            note.DateModified = properties.DateModified.LocalDateTime;
            note.Name         = file.Name;
            note.Text         = await FileIO.ReadTextAsync(file);

            note.MarkAsClean();
        }