예제 #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();
        }