Esempio n. 1
0
        /// <summary>
        /// Opens the dialog for creating a new message queue.
        /// </summary>
        void addQueueButton_Click(object sender, EventArgs e)
        {
            using (var dialog = new FormMessageQueue())
            {
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    var queue = new MessageQueue(dialog.ID);

                    queuesListBox.Items.Add(queue);

                    Program.MessageQueues.Add(queue);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Opens the dialog to edit the selected queue.
        /// </summary>
        void editQueueButton_Click(object sender, EventArgs e)
        {
            if (queuesListBox.SelectedItem is MessageQueue queue)
            {
                using (var form = new FormMessageQueue(queue.Guid.ToString()))
                {
                    if (form.ShowDialog(this) == DialogResult.OK)
                    {
                        queuesListBox.Invalidate();

                        queue.Load();
                    }
                }
            }
        }