예제 #1
0
        public void NewFile()
        {
            var doc = new OutlineDocumentViewModel()
            {
                Text = "NewOutline"
            };

            doc.Add();
            OpenDocument(doc);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public void OpenDocument(OutlineDocumentViewModel document)
 {
     OpenedDocuments.Add(document);
     CurrentDocument = document;
 }
예제 #4
0
        private void OnDocumentRequestClose(object sender, EventArgs e)
        {
            OutlineDocumentViewModel doc = sender as OutlineDocumentViewModel;

            CloseDocument(doc);
        }
예제 #5
0
 public void CloseDocument(OutlineDocumentViewModel document)
 {
     OpenedDocuments.Remove(document);
     //TODO: if(CurrentDocument == document)
 }