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); }
//--------------------------------------------------------------------- protected void OnFindingRaise() { Finding?.Invoke(this, EventArgs.Empty); }