Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 private void OnDisconnectClick(object sender, EventArgs e)
 {
     _connectToolStripButton.Enabled = true;
     _controller.DisconnectFromServer();
     _connectionStatusToolStripLabel.Text = "DISCONNECTED";
 }