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

                this.RefreshList();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 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;
        }
Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 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();
            }
        }