/// <summary> /// Forwards the messages selected in the active message browser. /// </summary> /// <param name="delete">Set to true to delete the messages after they have been forwarded.</param> public void ForwardSelectedMessagesFromQueue(bool delete) { //check we have the correct control selected to work with if (_primaryControls.DocumentContainer.Manager.ActiveTabbedDocument != null) { MessageBrowser messageBrowser = _primaryControls.DocumentContainer.Manager.ActiveTabbedDocument.Controls[0] as MessageBrowser; if (messageBrowser != null && messageBrowser.SelectedItems.Count > 0) { //get an array of all the messages we want to forward Message[] messages = new Message[messageBrowser.SelectedItems.Count]; for (int i = 0; i < messageBrowser.SelectedItems.Count; i ++) { messages[i] = ((MessageListViewItem)messageBrowser.SelectedItems[i]).Message; } NewMessageForm form = new NewMessageForm(_primaryObjects.License, this, messages, messageBrowser.QSetQueueItem); form.SmallImageList = _primaryControls.Images.Icon16ImageList; if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (delete) DoDeleteSelectedMessagesFromQueue(messageBrowser); } } } }
/// <summary> /// Forwards the messages selected in the active message browser. /// </summary> /// <param name="delete">Set to true to delete the messages after they have been forwarded.</param> public void ForwardSelectedMessagesFromQueue(bool delete) { // Check we have the correct control selected to work with if (_primaryControls.HasActiveDocument) { MessageBrowser messageBrowser = _primaryControls.GetActiveMessageBrowser(); if (messageBrowser != null && messageBrowser.SelectedItems.Count > 0) { //get an array of all the messages we want to forward Message[] messages = new Message[messageBrowser.SelectedItems.Count]; for (int i = 0; i < messageBrowser.SelectedItems.Count; i++) { messages[i] = ((MessageListViewItem)messageBrowser.SelectedItems[i]).Message; } NewMessageForm form = new NewMessageForm(_primaryObjects.License, this, messages, messageBrowser.QSetQueueItem); form.SmallImageList = _primaryControls.GetSize16Icons(); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (delete) { DoDeleteSelectedMessagesFromQueue(messageBrowser); } } } } }
/// <summary> /// Displays the new message form to send a message. /// </summary> /// <param name="queue">Initial queue to show in the recipients list.</param> public void SendNewMessage(QSetQueueItem queue) { NewMessageForm form = new NewMessageForm(_primaryObjects.License, this, queue); form.SmallImageList = _primaryControls.GetSize16Icons(); form.Show(); }
/// <summary> /// Displays the new message form to send a message. /// </summary> /// <param name="queue">Initial queue to show in the recipients list.</param> public void SendNewMessage(QSetQueueItem queue) { NewMessageForm form = new NewMessageForm(_primaryObjects.License, this, queue); form.SmallImageList = _primaryControls.Images.Icon16ImageList; form.Show(); }