public static void SaveAllUnclosedFilesToStorageLocation(NotepadWindow window)
        {
            NotepadViewModel model = window.Notepad;

            foreach (NotepadItemViewModel item in model.NotepadItems)
            {
                TextDocumentViewModel doc = item.Notepad;

                if (!doc.Document.Text.IsEmpty() && doc.HasMadeChanges)
                {
                    if (CheckUnclosedStorageDirectoryExistsElseCreateIt())
                    {
                        WriteFileToUnclosedStorageLocation(doc.Document.FileName, doc.Document.Text);
                    }
                }
            }
        }
 public FileRenameContainer(string from, string to, TextDocumentViewModel doc)
 {
     From         = from;
     To           = to;
     TextDocument = doc;
 }
Exemple #3
0
        private static void EnableIntelliSense(TextDocumentViewModel viewModel)
        {
            var intelliSense = SelectIntelliSense(viewModel.Document.DocumentType);

            intelliSense.ConfigureTextEditor(viewModel.TextEditor);
        }
 public static void DoingDragDrop(TextDocumentViewModel doc)
 {
     DroppingDocument = doc;
 }