Ejemplo n.º 1
0
 private void AlertProgressDetail(ScanProgressDetail scanDetail)
 {
     if (ProgressDetailUpdate != null)
     {
         ProgressDetailUpdate(this, new ScanProgressDetailEventArgs {
             Item = scanDetail
         });
     }
 }
Ejemplo n.º 2
0
        void PingCompleted(object sender, NetworkTestResultEventArgs e)
        {
            var pingRequest = e.Request;

            pingRequest.Success = e.Success;
            pingRequest.State   = PingRequestState.Complete;

            if (pingRequest.Success)
            {
                PingLog("Reply from {0}", pingRequest.NetworkAddress);
                var scanDetail = new ScanProgressDetail(pingRequest.NetworkAddress, _scanVerb, e.Message);
                scanDetail.Tag = pingRequest;
                AlertProgressDetail(scanDetail);
            }
            else
            {
                pingRequest.Error = e.Message;
                PingLog(LogLevel.Trace, "Fail from {0} with {1}", pingRequest.NetworkAddress, pingRequest.Error);
                AlertProgressDetail(new ScanProgressDetail(pingRequest.NetworkAddress, _scanVerb, pingRequest.Error, true));
            }

            StartNewPing();
        }
        public override bool Equals(object obj)
        {
            ScanProgressDetail otherObject = obj as ScanProgressDetail;

            return(otherObject != null && otherObject.Device == Device);
        }