public static bool CheckForPi()
        {
            Finding?.Invoke(null, EventArgs.Empty);
            var found = PingHost(piIP.ToString(), Port);

            if (PiFound && !found)
            {
                Offline?.Invoke(null, EventArgs.Empty);
            }
            if (!PiFound && found)
            {
                Online?.Invoke(null, EventArgs.Empty);
            }

            PiFound = found;

            return(PiFound);
        }
示例#2
0
 //---------------------------------------------------------------------
 protected void OnFindingRaise()
 {
     Finding?.Invoke(this, EventArgs.Empty);
 }