Beispiel #1
0
        public void Refresh()
        {
            try
            {
                if (mainForm.ConnectionsListView.Visible)
                {
                    mainForm.ConnectionsListView.Items.Clear();
                }

                if (mainForm.ConnectionManagerCommandsListView.Visible)
                {
                    mainForm.ConnectionManagerCommandsListView.Items.Clear();
                }

                // Make sure we add the server first
                ListViewItem serverItem = new ListViewItem();
                serverItem.Text = MOG_ControllerSystem.GetServerComputerName();
                serverItem.SubItems.Add(MOG_ControllerSystem.GetServerComputerIP());
                serverItem.SubItems.Add("1");
                serverItem.SubItems.Add("Server");
                serverItem.SubItems.Add("N/A");
                serverItem.SubItems.Add("1");
                serverItem.ForeColor  = Color.OrangeRed;
                serverItem.ImageIndex = (int)MOGImagesImages.SERVER;
                mainForm.ConnectionsListView.Items.Add(serverItem);

                mGroups.UpdateGroupItem(mainForm.ConnectionsListView, serverItem, "Type");

                MOG_ControllerSystem.RequestActiveConnections();
                MOG_ControllerSystem.RequestActiveCommands();
            }
            catch (Exception e)
            {
                MOG_Prompt.PromptMessage("Refresh Connection View", e.Message, e.StackTrace, MOG_ALERT_LEVEL.CRITICAL);
                return;
            }

            RefreshMerging();
            RefreshPosting();
            RefreshLateResolvers();
        }