static void Main() { // instantiate the controller Controller controller = new Controller(); // publish the controller to the remoting system TcpChannel channel = new TcpChannel(1172); ChannelServices.RegisterChannel(channel, false); RemotingServices.Marshal(controller, "controller.rem"); // hand over to the controller controller.Start(); // the application is finishing - close down the remoting channel RemotingServices.Disconnect(controller); ChannelServices.UnregisterChannel(channel); }
public void UpdateUIState(Controller.SHCUIControlState state) { switch (state) { case Controller.SHCUIControlState.OFF: setLED(remoteControlLED, false); setTabEnable(shcTabs, true); break; case Controller.SHCUIControlState.LOCAL: setLED(remoteControlLED, false); setTabEnable(shcTabs, true); break; case Controller.SHCUIControlState.REMOTE: setLED(remoteControlLED, true); setTabEnable(shcTabs, false) ; break; } }