public bool ConnectToServer(ReportController controller) { controller.DisconnectFromServer(); controller.Model.ServerConnection = new ImageProcessingRouterSubscriber(controller.Log, controller.Model.Settings.Subscription); controller.Model.ServerConnection.ServerMessage += controller.Model.ServerMessageReceived; controller.Model.SubscriberThread = new Thread(controller.Model.ServerConnection.Start); controller.Model.SubscriberThread.Start(); return(true); }
private void OnDisconnectClick(object sender, EventArgs e) { _connectToolStripButton.Enabled = true; _controller.DisconnectFromServer(); _connectionStatusToolStripLabel.Text = "DISCONNECTED"; }