public bool Closing() { if (Documents.IsEdited) { MessageDialog.ShowWarning(Locale.Get(nameof(DocumentListView), "Some data not saved!")); return(false); } var editor = GetPreviewEditor(CurrentDocument?.GetType(), false); if (editor != null) { this.GetParent <DockBox>().ClosePage(editor); } return(true); }
private void Preview() { if (!AllowPreview || !toolPreview.Checked || CurrentDocument == null) { return; } var editor = GetPreviewEditor(CurrentDocument.GetType(), true); if (editor != null && editor.EditorState != DocumentEditorState.Send) { editor.SetList(GetSelected()); editor.Document = CurrentDocument; } }