public void NewFile() { var doc = new OutlineDocumentViewModel() { Text = "NewOutline" }; doc.Add(); OpenDocument(doc); }
public ViewModelLocator() { _document = new OutlineDocumentViewModel() { Text = "test" }; var o1 = _document.Add("Outline 1"); _document.Add("Outline 2"); _document.Add("Outline 3"); o1.Add("Outline 1.1"); o1.Add("Outline 1.2"); o1.Add("Outline 1.3"); _mainWindow = new MainWindowViewModel(new FileDialogService()); _mainWindow.OpenDocument(_document); }
public void OpenDocument(OutlineDocumentViewModel document) { OpenedDocuments.Add(document); CurrentDocument = document; }
private void OnDocumentRequestClose(object sender, EventArgs e) { OutlineDocumentViewModel doc = sender as OutlineDocumentViewModel; CloseDocument(doc); }
public void CloseDocument(OutlineDocumentViewModel document) { OpenedDocuments.Remove(document); //TODO: if(CurrentDocument == document) }