private NoteContentEditorContext(StatusControlContext statusContext) { StatusContext = statusContext ?? new StatusControlContext(); SaveCommand = StatusContext.RunBlockingTaskCommand(async() => await SaveAndGenerateHtml(false)); SaveAndCloseCommand = StatusContext.RunBlockingTaskCommand(async() => await SaveAndGenerateHtml(true)); ViewOnSiteCommand = StatusContext.RunBlockingTaskCommand(ViewOnSite); ExtractNewLinksCommand = StatusContext.RunBlockingTaskCommand(() => LinkExtraction.ExtractNewAndShowLinkContentEditors(BodyContent.BodyContent, StatusContext.ProgressTracker())); }
private PostContentEditorContext(StatusControlContext statusContext) { StatusContext = statusContext ?? new StatusControlContext(); HelpContext = new HelpDisplayContext(CommonFields.TitleSlugFolderSummary + BracketCodeHelpMarkdown.HelpBlock); SaveCommand = StatusContext.RunBlockingTaskCommand(async() => await SaveAndGenerateHtml(false)); SaveAndCloseCommand = StatusContext.RunBlockingTaskCommand(async() => await SaveAndGenerateHtml(true)); ViewOnSiteCommand = StatusContext.RunBlockingTaskCommand(ViewOnSite); ExtractNewLinksCommand = StatusContext.RunBlockingTaskCommand(() => LinkExtraction.ExtractNewAndShowLinkContentEditors( $"{BodyContent.BodyContent} {UpdateNotes.UpdateNotes}", StatusContext.ProgressTracker())); }
private GeoJsonContentEditorContext(StatusControlContext statusContext) { StatusContext = statusContext ?? new StatusControlContext(); HelpContext = new HelpDisplayContext(CommonFields.TitleSlugFolderSummary + BracketCodeHelpMarkdown.HelpBlock); SaveCommand = StatusContext.RunBlockingTaskCommand(async () => await SaveAndGenerateHtml(false)); SaveAndCloseCommand = StatusContext.RunBlockingTaskCommand(async () => await SaveAndGenerateHtml(true)); ViewOnSiteCommand = StatusContext.RunBlockingTaskCommand(ViewOnSite); ExtractNewLinksCommand = StatusContext.RunBlockingTaskCommand(() => LinkExtraction.ExtractNewAndShowLinkContentEditors( $"{BodyContent.BodyContent} {UpdateNotes.UpdateNotes}", StatusContext.ProgressTracker())); ImportGeoJsonFileCommand = StatusContext.RunBlockingTaskCommand(ImportGeoJsonFile); RefreshMapPreviewCommand = StatusContext.RunBlockingTaskCommand(RefreshMapPreview); PreviewHtml = WpfHtmlDocument.ToHtmlLeafletGeoJsonDocument("GeoJson", UserSettingsSingleton.CurrentSettings().LatitudeDefault, UserSettingsSingleton.CurrentSettings().LongitudeDefault, string.Empty); }
public NoteContentEditorContext(StatusControlContext statusContext, NoteContent noteContent) { StatusContext = statusContext ?? new StatusControlContext(); SaveAndCreateLocalCommand = new Command(() => StatusContext.RunBlockingTask(SaveAndCreateLocal)); SaveUpdateDatabaseCommand = new Command(() => StatusContext.RunBlockingTask(SaveToDbWithValidation)); ViewOnSiteCommand = new Command(() => StatusContext.RunBlockingTask(ViewOnSite)); ExtractNewLinksCommand = new Command(() => StatusContext.RunBlockingTask(() => LinkExtraction.ExtractNewAndShowLinkStreamEditors(BodyContent.BodyContent, StatusContext.ProgressTracker()))); StatusContext.RunFireAndForgetTaskWithUiToastErrorReturn(async() => await LoadData(noteContent)); }
public PostContentEditorContext(StatusControlContext statusContext, PostContent postContent) { StatusContext = statusContext ?? new StatusControlContext(); HelpContext = new HelpDisplayContext(CommonFields.TitleSlugFolderSummary + BracketCodeHelpMarkdown.HelpBlock); SaveAndCreateLocalCommand = new Command(() => StatusContext.RunBlockingTask(SaveAndCreateLocal)); SaveUpdateDatabaseCommand = new Command(() => StatusContext.RunBlockingTask(SaveToDbWithValidation)); ViewOnSiteCommand = new Command(() => StatusContext.RunBlockingTask(ViewOnSite)); ExtractNewLinksCommand = new Command(() => StatusContext.RunBlockingTask(() => LinkExtraction.ExtractNewAndShowLinkStreamEditors( $"{BodyContent.BodyContent} {UpdateNotes.UpdateNotes}", StatusContext.ProgressTracker()))); StatusContext.RunFireAndForgetTaskWithUiToastErrorReturn(async() => await LoadData(postContent)); }