public DocumentChangedEventArgs(Editor editor)
 {
     this.Editor = editor;
 }
Exemple #2
0
        /// <summary>
        /// Open a file.
        /// </summary>
        /// <param name="fileName">Path of the file which need to be opened.</param>
        /// <param name="isInProject">If this is <c>true</c> it will mark file as a project file.</param>
        /// <returns>Returns an instance object of the <see cref="Editor"/> class or null if the file already exist.</returns>
        public static Editor OpenFile(string fileName, bool isInProject)
        {
            if (editors.ContainsKey(fileName) == true) // Is file already opened? Yes, let's stop execution.
            {
                return null;
            }

            Editor editor = new Editor();

            editor.Open(fileName);
            editor.HasProject = Project != null ? Project.Files.Contains(fileName) : false;

            editors.Add(fileName, editor);
            editor.Show(mainForm.dockPanel, DockState.Document);

            return editor;
        }
 public CompilationEventArgs(Editor editor, string fileName)
 {
     this.Editor = editor;
     this.FileName = fileName;
 }