public void OpenEditor() { if (Owner is SceneViewModel) { SceneViewModel vm = Owner as SceneViewModel; FlowDocumentEditorWindow.ShowEditorWindow(vm.Model.FlowDocumentId, vm.Model.Connection, vm.ChapterVm.StoryVm.UniverseVm.SpellcheckDictionary, string.Format("Scene: {0}", vm.Model.Name), SnippetResult); } }
public void EditCopyrightPage() { if (!Model.FlowDocumentId.HasValue) { FlowDocument doc = new FlowDocument(Model.Connection); doc.UniverseId = Model.UniverseId; doc.IsEncrypted = false; doc.WordCount = 0; doc.PlainText = ""; doc.Xml = FlowDocumentViewModel.GetEmptyFlowDocXml(); doc.Create(); Model.FlowDocumentId = doc.id; Model.Save(); } if (Model.FlowDocumentId.HasValue) { FlowDocumentEditorWindow.ShowEditorWindow(Model.FlowDocumentId.Value, Model.Connection, UniverseVm.SpellcheckDictionary, string.Format("Copyright Page: {0}", Model.Name)); } }
public void OpenEditor() { SceneViewModel vm = SelectedTreeViewItem as SceneViewModel; FlowDocumentEditorWindow.ShowEditorWindow(vm.Model.FlowDocumentId, vm.Model.Connection, SpellcheckDictionary, string.Format("Scene: {0}", vm.Model.Name)); }