Пример #1
0
        public ServiceQueue(string queuePath, Service service, ServiceQueueType queueType = ServiceQueueType.Input, ServiceQueue parentQueue = null)
        {
            ParentQueue = parentQueue;
            QueueType = queueType;
            Path = queuePath;
            Service = service;
            Name = GetQueueName(queuePath);
            _queueLengthCounter = new PerformanceCounter("MSMQ Queue", "Messages in Queue", Path, true);

            TestIfQueueIsValid();
        }
Пример #2
0
        public void ShowQueue(ServiceQueue serviceQueue)
        {
            _serviceQueue = serviceQueue;

            Enabled = (_serviceQueue != null) && !_serviceQueue.Invalid;

            bool isErrorQueue = (serviceQueue != null) && serviceQueue.QueueType == ServiceQueueType.Error;

            colSourceQueue.Visible = isErrorQueue;
            returnAllToSourceButton.Visible = isErrorQueue;
            returnToSourceButton.Visible = isErrorQueue;
            createMessageButton.Visible = _serviceQueue != null && serviceQueue.QueueType == ServiceQueueType.Input;
            chkShowAll.Visible = isErrorQueue;

            ReloadMessages();
        }
Пример #3
0
 private void serviceTree_QueueSelected(ServiceQueue serviceQueue)
 {
     queueOverviewControl1.ShowQueue(serviceQueue);
 }
Пример #4
0
            public QueueNode(ServiceQueue serviceQueue)
            {
                ServiceQueue = serviceQueue;
                ImageIndex = SelectedImageIndex = ServiceQueue.QueueType == ServiceQueueType.Error ? 2 : 1;

                if (ServiceQueue.UseJournal)
                    Nodes.Add(new QueueNode(ServiceQueue.GetJournalQueue()) { ImageIndex = 3, SelectedImageIndex = 3});

                UpdateData();
                UpdateNodeText();
            }
Пример #5
0
 private void OnQueueSelected(ServiceQueue serviceQueue)
 {
     var ev = QueueSelected;
     if (ev != null)
         ev(serviceQueue);
 }
Пример #6
0
 public ServiceMessage(Message message, ServiceQueue serviceQueue)
 {
     ServiceQueue = serviceQueue;
     _message = message;
 }