Esempio n. 1
0
 void gw_MessageReceived(object sender, OpenWebNetDataEventArgs e)
 {
     if (e.Data.Contains("*#13**15*"))
     {
         return;
     }
 }
Esempio n. 2
0
        private void openGW_DataReceived(object sender, OpenWebNetDataEventArgs e)
        {
            try
            {
                if (e.Data == null || !e.Data.Contains("*#13**15*"))
                {
                    return;
                }

                if (CheckGatewayConnectionCompleted != null)
                {
                    CheckGatewayConnectionCompleted(this, new CheckGatewayConnectionEventArgs()
                    {
                        Gateway = gw, Result = CheckGatewayConnectionResult.Successful
                    });
                }
            }
            catch (Exception)
            {
                if (CheckGatewayConnectionCompleted != null)
                {
                    CheckGatewayConnectionCompleted(this, new CheckGatewayConnectionEventArgs()
                    {
                        Gateway = gw, Result = CheckGatewayConnectionResult.Failed
                    });
                }
            }
        }