Beispiel #1
0
        public Form1()
        {
            InitializeComponent();
            ActiveHomeController.Instance.RecvAction += (sender, e) =>
            {
                String strMsg = "";
                ActiveHomeRecvResult result = e.Result;
                string strAction            = result.ResultActionType;


                if (strAction.ToUpper() == "RECVPLC")
                {
                    strMsg += "Recieved Powerline Command:";
                }

                strMsg += " " + result.Address.ToUpper();
                strMsg += " " + result.Command.ToUpper();

                if (result.Reserved1.Length > 0)
                {
                    strMsg += " " + result.Reserved1.ToUpper();
                }

                if (result.Reserved2.Length > 0)
                {
                    strMsg += " " + result.Reserved2.ToUpper();
                }

                if (result.Reserved3.Length > 0)
                {
                    strMsg += " " + result.Reserved3.ToUpper();
                }


                StatusTextBox.AppendText(strMsg + "\r\n");
            };
        }
Beispiel #2
0
 public ActiveHomeRecvArgs(string action_type, string address, string command, string reserved1, string reserved2, string reserved3, string reserved4, string description)
 {
     mResult             = new ActiveHomeRecvResult(action_type, address, command, reserved1, reserved2, reserved3, reserved4);
     mResult.Description = description;
 }