Exemple #1
0
		/// <summary>
		/// Loads a new <see cref="WebServiceClientControl"/> and adds it into the document collection, and opens the document.
		/// </summary>
		/// <param name="webServiceItem"></param>
		private void LoadNewWebServiceClientControl(QSetWebServiceItem webServiceItem)
		{			
			//set up a web service control, and create a dock for it
			WebServiceClientControl webServiceClientControl = new WebServiceClientControl();			
			webServiceClientControl.QSetWebServiceItem = webServiceItem;
			_primaryControls.WebServiceClientControlCollection.Add(webServiceItem.ID.ToString(), webServiceClientControl);

            DockControl newDockControl = new TabbedDocument(_primaryControls.DocumentContainer.Manager, webServiceClientControl, webServiceItem.Name);
            newDockControl.Open();
			newDockControl.Activate();
		}
Exemple #2
0
		/// <summary>
		/// Loads anew MessageBrowser, and displays in the main document window.
		/// </summary>
		/// <param name="qsetQueueItem">QSetQueueItem to display.</param>
		/// <returns>The added DockControl hosting the MessageBrowser if successful, else false.</returns>
		private DockControl LoadNewMessageBrowser(QSetQueueItem qsetQueueItem)
		{									
			DockControl newDockControl = null;

			//set up a new message browser, and create adock for it
			MessageBrowser messageBrowser = new MessageBrowser();
			messageBrowser.UserSettings = _primaryObjects.UserSettings;
			_primaryControls.MessageBrowserCollection.Add(qsetQueueItem.ID.ToString(), messageBrowser);
            newDockControl = new TabbedDocument(_primaryControls.DocumentContainer.Manager, messageBrowser, qsetQueueItem.Name);
            newDockControl.Open();		
			messageBrowser.ImageList = _primaryControls.Images.Icon16ImageList;
			
			//pass the qsetitem to the message browser to load the queue
			try
			{
				messageBrowser.QSetQueueItem = qsetQueueItem;
				newDockControl.Activate();
			}
			catch (Exception exc)
			{
				_primaryObjects.ProcessVisualizer.SeizeCursor(Cursors.Arrow);
				MessageBox.Show(exc.Message, Locale.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
				_primaryObjects.ProcessVisualizer.ReleaseCursor();
				newDockControl.Close();
				newDockControl = null;
			}
					
			return newDockControl;
		}