Redudant for the moment, more use in Toolkit Editor. Just a test really for now.
Inheritance: WeifenLuo.WinFormsUI.Docking.DockContent
Ejemplo n.º 1
0
        private void ProjectExplorer_NodeRename(object sender, NodeLabelRenameEventArgs e)
        {
            if (editorDictionary.ContainsKey(e.OldFile.ToLower()))
            {
                EditorForm editorForm = new EditorForm();
                editorDictionary.TryGetValue(e.OldFile.ToLower(), out editorForm);

                CodeEditor codeEditor = (CodeEditor)editorForm;
                codeEditor.EditorFile = e.NewFile;

                if (codeEditor.IsUpdated)
                {
                    codeEditor.TabText = Path.GetFileName(e.NewFile);
                }
                else
                {
                    codeEditor.TabText = Path.GetFileName(e.NewFile + "*");
                }

                editorDictionary.Remove(e.OldFile.ToLower());
                editorDictionary.Add(e.NewFile.ToLower(), editorForm);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Focuses on a code editor. 
 /// </summary>
 /// <param name="file">The file attached to the editor.</param>
 private void FocusCodeEditor(string file)
 {
     EditorForm editorForm = new EditorForm();
     editorDictionary.TryGetValue(file, out editorForm);
     editorForm.Focus();
 }