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; } }
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; } }