Пример #1
0
		/// <summary>
		/// Constructs QueueTaskManager.
		/// </summary>
		public QueueTaskManager(
			TaskManager taskManager,
			PrimaryControls primaryControls,
			PrimaryObjects primaryObjects,
			PrimaryForms primaryForms)
		{
			_taskManager = taskManager;
			_primaryObjects = primaryObjects;
			_primaryControls = primaryControls;						
			_primaryForms = primaryForms;
		}
		/// <summary>
		/// Constructs the object with the minumum requirements.
		/// </summary>
		/// <param name="primaryControls"></param>
		/// <param name="taskManager"></param>
		/// <param name="primaryObjects"></param>
		/// <param name="primaryForms"></param>
		/// <param name="primaryMenus"></param>
		protected PrimaryControlListenerBase
			(			
			TaskManager taskManager,			
			PrimaryObjects primaryObjects,
			PrimaryForms primaryForms,
			PrimaryControls primaryControls,
			PrimaryMenus primaryMenus
			)
		{			
			_taskManager = taskManager;
			_primaryObjects = primaryObjects;
			_primaryForms = primaryForms;
			_primaryControls = primaryControls;
			_primaryMenus = primaryMenus;
		}
Пример #3
0
		/// <summary>
		/// Constructs the coordinator.
		/// </summary>
		/// <param name="qSetEnvironmentForm">Environment form.</param>
		/// <param name="primaryControls">Primary controls.</param>
		/// <param name="primaryMenus">Primary menus.</param>
		/// <param name="primaryForms">Primary forms.</param>
		/// <param name="primaryObjects">Primary objects.</param>
		public EnvironmentCoordinator(
			QSetEnvironmentForm qSetEnvironmentForm, 
			PrimaryMenus primaryMenus, 
			PrimaryControls primaryControls,
			PrimaryForms primaryForms,
			PrimaryObjects primaryObjects)
		{						
			_primaryForms = primaryForms;
			_primaryObjects = primaryObjects;
			_primaryControls = primaryControls;

			_taskManager = new TaskManager(primaryMenus, primaryControls, primaryForms, primaryObjects);	
			_primaryMenuListener = new PrimaryMenuListener(_taskManager, _primaryObjects, _primaryForms, _primaryControls, primaryMenus);
			_primaryControlListener = new PrimaryControlListener(_taskManager, _primaryObjects, _primaryForms, _primaryControls, primaryMenus);
			_primaryFormListener = new PrimaryFormsListener(_taskManager, _primaryObjects, _primaryForms, _primaryControls, primaryMenus);
		}
		/// <summary>
		/// Constructs the listener.
		/// </summary>
		/// <param name="taskManager">Task manager.</param>
		/// <param name="primaryObjects">Environments PrimaryObjects object.</param>		
		/// <param name="primaryForms">Environments PrimaryForms object.</param>
		/// <param name="primaryControls">Environments PrimaryControls object.</param>
		/// <param name="primaryMenus">Environments PrimaryMenus object.</param>
		public PrimaryFormsListener
			(
			TaskManager taskManager,			
			PrimaryObjects primaryObjects,
			PrimaryForms primaryForms,
			PrimaryControls primaryControls,
			PrimaryMenus primaryMenus
			)
			: base(taskManager, primaryObjects, primaryForms, primaryControls, primaryMenus) 
		{			
			base.PrimaryForms.QueueSearchForm.OKClicked += new QueueSearchForm.OKClickedEvent(QueueSearchForm_OKClicked);
			base.PrimaryForms.EnvironmentForm.Load += new EventHandler(EnvironmentForm_Load);
		}
		/// <summary>
		/// Constructs the listener.
		/// </summary>
		/// <param name="taskManager">Task manager.</param>
		/// <param name="primaryObjects">Environments PrimaryObjects object.</param>		
		/// <param name="primaryForms">Environments PrimaryForms object.</param>
		/// <param name="primaryControls">Environments PrimaryControls object.</param>
		/// <param name="primaryMenus">Environments PrimaryMenus object.</param>
		public PrimaryControlListener
			(
			TaskManager taskManager,			
			PrimaryObjects primaryObjects,
			PrimaryForms primaryForms,
			PrimaryControls primaryControls,
			PrimaryMenus primaryMenus
			) 
			: base(taskManager, primaryObjects, primaryForms, primaryControls, primaryMenus) 
		{					
			//wire up all event handlers
			base.PrimaryControls.QSetExplorer.QSetItemDoubleClick += new QSetItemDoubleClickEvent(QSetExplorer_QSetItemDoubleClick);
			base.PrimaryControls.QSetExplorer.QSetActivated += new QSetActivatedEvent(QSetExplorer_QSetActivated);
			base.PrimaryControls.QSetExplorer.QSetDeactivated += new QSetDeactivatedEvent(QSetExplorer_QSetDeactivated);
			base.PrimaryControls.QSetExplorer.BeforeQSetItemActivated += new VisualizableProcessItemAffectedEvent(QSetExplorer_BeforeQSetItemActivated);
			base.PrimaryControls.QSetExplorer.AfterQSetItemActivated += new VisualizableProcessItemAffectedEvent(QSetExplorer_AfterQSetItemActivated);
			base.PrimaryControls.QSetExplorer.MessagesDragDrop += new MessagesDragDropEvent(QSetExplorer_MessagesDragDrop);

            
            base.PrimaryControls.DocumentContainer.Manager.ActiveTabbedDocumentChanged += DocumentContainer_ActiveDocumentChanged;
			//TODO JW handle close
            //base.PrimaryControls.DocumentContainer.DocumentClosing += new TD.SandDock.DocumentClosingEventHandler(DocumentContainer_DocumentClosing);
			base.PrimaryControls.DocumentContainer.MouseDown += new MouseEventHandler(DocumentContainer_MouseDown);
			
			base.PrimaryControls.MessageBrowserCollection.ItemAdded += new MessageBrowserCollection.ItemAddedEvent(MessageBrowserCollection_ItemAdded);
			base.PrimaryControls.MessageBrowserCollection.ItemRemoved += new MessageBrowserCollection.ItemRemovedEvent(MessageBrowserCollection_ItemRemoved);			
			
			base.PrimaryControls.WebServiceClientControlCollection.ItemAdded += new WebServiceClientControlCollection.ItemAddedEvent(WebServiceClientControlCollection_ItemAdded);
			base.PrimaryControls.WebServiceClientControlCollection.ItemRemoved += new WebServiceClientControlCollection.ItemRemovedEvent(WebServiceClientControlCollection_ItemRemoved);

			base.PrimaryControls.PropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(PropertyGrid_PropertyValueChanged);

			((DockControl)base.PrimaryControls.QSetExplorer.Parent).Closed += new EventHandler(DockControl_Closed);
			((DockControl)base.PrimaryControls.PropertyGrid.Parent).Closed += new EventHandler(DockControl_Closed);
			((DockControl)base.PrimaryControls.MessageViewer.Parent).Closed += new EventHandler(DockControl_Closed);
			((DockControl)base.PrimaryControls.QSetMonitor.Parent).Closed += new EventHandler(DockControl_Closed);
		}
		/// <summary>
		/// Constructs the listener.
		/// </summary>		
		/// <param name="taskManager">Task manager.</param>
		/// <param name="primaryObjects">Environments PrimaryObjects object.</param>		
		/// <param name="primaryForms">Environments PrimaryForms object.</param>
		/// <param name="primaryControls">Environments PrimaryControls object.</param>
		/// <param name="primaryMenus">Environments PrimaryMenus object.</param>
		public PrimaryMenuListener
			(
			TaskManager taskManager,			
			PrimaryObjects primaryObjects,
			PrimaryForms primaryForms,
			PrimaryControls primaryControls,
			PrimaryMenus primaryMenus
			) 
			: base(taskManager, primaryObjects, primaryForms, primaryControls, primaryMenus) 
		{
			//wire up all event handlers

			foreach (MenuItemBase menuItem in base.PrimaryMenus.FileMenu.Items)			
				if (menuItem != MenuItemBag.FileRecentFileList)
					menuItem.Activate += new EventHandler(FileMenuItem_Activate);				

			foreach (MenuItemBase menuItem in base.PrimaryMenus.ViewMenu.Items)
				menuItem.Activate += new EventHandler(ViewMenuItem_Activate);

			foreach (MenuItemBase menuItem in base.PrimaryMenus.QSetMenu.Items)
				menuItem.Activate += new EventHandler(QSetMenuItem_Activate);

			foreach (MenuItemBase menuItem in base.PrimaryMenus.QueueMenu.Items)
				menuItem.Activate += new EventHandler(QueueMenuItem_Activate);

			foreach (MenuItemBase menuItem in base.PrimaryMenus.MessageMenu.Items)
				menuItem.Activate += new EventHandler(MessageMenuItem_Activate);

			foreach (MenuItemBase menuItem in base.PrimaryMenus.ToolsMenu.Items)
				menuItem.Activate += new EventHandler(ToolsMenuItem_Activate);

			foreach (MenuItemBase menuItem in base.PrimaryMenus.HelpMenu.Items)
				menuItem.Activate += new EventHandler(HelpMenuItem_Activate);

			foreach (MenuItemBase menuItem in base.PrimaryMenus.MessageBrowserContextMenu.Items)
				menuItem.Activate += new EventHandler(MessageBrowserContextMenuItem_Activate);

			foreach (MenuItemBase menuItem in base.PrimaryMenus.QSetContextMenu.Items)
				menuItem.Activate += new EventHandler(QSetContextMenuItem_Activate);


			base.PrimaryMenus.RecentFileListChanged += new Mulholland.QSet.Application.PrimaryMenus.MenuItemsChangedEvent(PrimaryMenus_RecentFileListChanged);
		}