コード例 #1
0
        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
ファイル: FindData.cs プロジェクト: zveruger/csharp_tools
 //---------------------------------------------------------------------
 protected void OnFindingRaise()
 {
     Finding?.Invoke(this, EventArgs.Empty);
 }