private void OpenAutoSavedDocuments() { OpenDocuments.AddRange(LoadAutoSavedDocuments(DocumentRoot.Path)); if (HasNoOpenDocuments) { CreateNewDocument(); } else { CurrentOpenDocument = OpenDocuments[0]; } }
private async Task OpenAutoSavedDocuments() { var documents = await Task.Run(() => LoadAutoSavedDocuments(DocumentRoot.Path)).ConfigureAwait(true); OpenDocuments.AddRange(documents); if (OpenDocuments.Count == 0) { CreateNewDocument(); } else { CurrentOpenDocument = OpenDocuments[0]; } }
private void OpenAutoSavedDocuments() { OpenDocuments.AddRange(LoadAutoSavedDocuments(DocumentRoot.Path)); _dispatcher.InvokeAsync(() => { if (HasNoOpenDocuments) { CreateNewDocument(); } else { CurrentOpenDocument = OpenDocuments[0]; } }); }