コード例 #1
0
 public DocumentChangedEventArgs(Editor editor)
 {
     this.Editor = editor;
 }
コード例 #2
0
ファイル: Workspace.cs プロジェクト: 123marvin123/PawnPlus
        /// <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;
        }
コード例 #3
0
 public CompilationEventArgs(Editor editor, string fileName)
 {
     this.Editor = editor;
     this.FileName = fileName;
 }