Ejemplo n.º 1
0
        /// <summary>
        /// Prepare data to send via net to controller
        /// </summary>
        /// <returns></returns>
        private RequestControllerConfigure PrepareData()
        {
            var register = new RequestControllerConfigure()
            {
                Ip             = IPAddress.Parse(ipTextBox.Text),
                Port           = _numValuePort,
                Mask           = IPAddress.Parse(maskTextBox.Text),
                Gateway        = IPAddress.Parse(gatewayTextBox.Text),
                HolidayControl = _numValue,
                PcIPAddr       = pcIpTextBox.Text,
                SN             = int.Parse(SN.Text)
            };

            return(register);
        }
Ejemplo n.º 2
0
        public void Register(RequestControllerConfigure controller)
        {
            IControllerConfigure client = null;

            try
            {
                client = myChannelFactory.CreateChannel();
                client.ConnectToController(controller);
                ((ICommunicationObject)client).Close();
            }
            catch
            {
                if (client != null)
                {
                    ((ICommunicationObject)client).Abort();
                }
            }
        }
Ejemplo n.º 3
0
 public void Register(RequestControllerConfigure conf)
 {
     _model.Register(conf);
 }