Пример #1
0
		public EditorManager()
		{
			this.editors = new Dictionary<EditorKey, EditorWindow>();
			this.activeEditor = (EditorWindow)null;
			this.controls = new Dictionary<EditorAction, ToolStripItem[]>();
			Global.DockManager.DockControlAdded += new DockControlEventHandler(this.DockManager_DockControlAdded);
			Global.DockManager.DockControlRemoved += new DockControlEventHandler(this.DockManager_DockControlRemoved);
			Global.DockManager.DockControlActivated += new DockControlEventHandler(this.DockManager_DockControlActivated);
		}
Пример #2
0
		private void SetActiveEditor(EditorWindow editor)
		{
			if (this.activeEditor != null)
			{
				this.activeEditor.FileChanged -= new EventHandler(this.activeEditor_FileChanged);
				this.activeEditor.FileSaved -= new EventHandler(this.activeEditor_FileSaved);
				this.activeEditor.SourceStateChanged -= new EventHandler(this.activeEditor_SourceStateChanged);
			}
			this.activeEditor = editor;
			if (this.activeEditor != null)
			{
				this.activeEditor.FileChanged += new EventHandler(this.activeEditor_FileChanged);
				this.activeEditor.FileSaved += new EventHandler(this.activeEditor_FileSaved);
				this.activeEditor.SourceStateChanged += new EventHandler(this.activeEditor_SourceStateChanged);
			}
			this.UpdateControls();
		}