public AdminUI() { // Required for Windows Form Designer support. InitializeComponent(); service = new SimpleServiceController(ReflectorMgr.ReflectorServiceName); serviceBtns.HelpUrl = helpUrlReflector; serviceBtns.AboutClicked += new EventHandler(ShowAboutMsg); }
/// <summary> /// Connects to the Reflector service using the App.Config setting and sets the /// status of the service start/stop buttons as necessary. /// </summary> /// <returns> /// True if connected ok; false if can't find service /// </returns> public bool ConnectToService() { try { if (serviceName != null) { service = new SimpleServiceController(serviceName); } SetServiceStatus(); } catch { this.service = null; return(false); } return(true); }
/// <summary> /// Connects to the Reflector service using the App.Config setting and sets the /// status of the service start/stop buttons as necessary. /// </summary> /// <returns> /// True if connected ok; false if can't find service /// </returns> public bool ConnectToService() { try { if( serviceName != null ) { service = new SimpleServiceController(serviceName); } SetServiceStatus(); } catch { this.service = null; return false; } return true; }