예제 #1
0
        private void DeleteManagedEndpoint_Click(object sender, EventArgs e)
        {
            if (current != null)
            {
                this.endpoints.Remove(current);
                current = null;

                this.RefreshList();
            }
        }
예제 #2
0
        private void DoUpdate()
        {
            current = ManagedEndpointList.SelectedItem as ManagedEndpoint;
            if (current != null)
            {
                current.Name = ManagedEndpointName.Text;
                current.Queue = ManagedEndpointQueue.Text;

                Manager.StoreManagedEndpoints(this.endpoints);

                this.RefreshList();
            }
        }
예제 #3
0
        private void RefreshList()
        {
            this.ManagedEndpointList.SuspendLayout();

            object selected = this.ManagedEndpointList.SelectedItem;

            this.ManagedEndpointList.DataSource = null;
            this.ManagedEndpointList.DataSource = endpoints;

            this.ManagedEndpointList.SelectedItem = selected;

            this.ManagedEndpointList.ResumeLayout(true);

            current = this.ManagedEndpointList.SelectedItem as ManagedEndpoint;
        }
예제 #4
0
        private void DoAdd()
        {
            ManagedEndpoint endpoint = new ManagedEndpoint();
            endpoint.Name = ManagedEndpointName.Text;
            endpoint.Queue = ManagedEndpointQueue.Text;

            endpoints.Add(endpoint);
            
            Manager.StoreManagedEndpoints(this.endpoints);
            
            this.RefreshList();

            this.ManagedEndpointList.SelectedItem = endpoint;

            this.PrepareForUpdate();
        }
예제 #5
0
        private void PrepareForAdd()
        {
            this.ManagedEndpointButton.Text = "Add";
            this.ManagedEndpointName.Text = string.Empty;
            this.ManagedEndpointQueue.Text = string.Empty;

            this.MessagesInEndpoint.Text = "?";
            this.AgeOfOldestMessage.Text = "?";
            current = null;
            this.DeleteManagedEndpoint.Enabled = false;
            this.RefreshWorkerList();
        }
예제 #6
0
        private void PrepareForUpdate()
        {
            current = ManagedEndpointList.SelectedItem as ManagedEndpoint;
            if (current != null)
            {
                this.ManagedEndpointButton.Text = "Update";
                this.ManagedEndpointName.Text = current.Name;
                this.ManagedEndpointQueue.Text = current.Queue;

                this.UpdateManagedEndpoint();

                this.DeleteManagedEndpoint.Enabled = true;
                this.RefreshWorkerList();
            }
        }