Beispiel #1
0
        private void SetState(bool serviceRunning)
        {
            refreshBtn.Enabled    = serviceRunning;
            forceLeaveBtn.Enabled = serviceRunning;

            if (serviceRunning)
            {
                // Create an instance of the remote object
                if (remoteAdmin == null)
                {
                    remoteAdmin = (AdminRemoting)Activator.GetObject(typeof(AdminRemoting),
                                                                     "tcp://localhost:" + ConfigurationManager.AppSettings.Get(AppConfig.AdminPort) +
                                                                     "/ReflectorAdminEndpoint");
                }

                RefreshClientTable();
            }
            else
            {
                remoteAdmin             = null;
                tableListBox.DataSource = null;
                tableListBox.Items.Clear();
                //lblDynamicPort.Text = string.Empty;
            }
        }
Beispiel #2
0
        private void SetState(bool serviceRunning)
        {
            refreshBtn.Enabled = serviceRunning;
            forceLeaveBtn.Enabled = serviceRunning;

            if (serviceRunning)
            {
                // Create an instance of the remote object
                if (remoteAdmin == null)
                {
                    remoteAdmin = (AdminRemoting)Activator.GetObject(typeof(AdminRemoting),
                        "tcp://localhost:" + ConfigurationManager.AppSettings.Get(AppConfig.AdminPort) +
                        "/ReflectorAdminEndpoint");
                }

                RefreshClientTable();
            }
            else
            {
                remoteAdmin = null;
                tableListBox.DataSource = null;
                tableListBox.Items.Clear();
                //lblDynamicPort.Text = string.Empty;
            }
        }