Esempio n. 1
0
 protected virtual void OnPingStarted(object sender, PingerEventArgs e)
 {
     try
     {
         if (this.PingStarted != null)
         {
             this.PingStarted(sender, e);
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex);
     }
 }
        /// <summary>
        /// Handles the ping start
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnPingStarted(object sender, PingerEventArgs e)
        {
            // clear the output window
            _textBoxOutput.Text = null;

            // state who/what we are pinging
            if (e.IsHostname)
            {
                _textBoxOutput.AppendText(string.Format("Pinging {0} [{1}] with {2} bytes of data:\n\n", e.Address, e.Destination.ToString(), 32));
            }
            else
            {
                _textBoxOutput.AppendText(string.Format("Pinging {0} with {1} bytes of data:\n\n", e.Destination.ToString(), 32));
            }
        }
Esempio n. 3
0
		protected virtual void OnPingStarted(object sender, PingerEventArgs e)
		{
			try
			{
				if (this.PingStarted != null)
					this.PingStarted(sender, e);
			}
			catch(Exception ex)
			{
				Debug.WriteLine(ex);
			}
		}
		/// <summary>
		/// Handles the ping start
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void OnPingStarted(object sender, PingerEventArgs e)
		{	
			// clear the output window
			_textBoxOutput.Text = null;

			// state who/what we are pinging
			if (e.IsHostname)
				_textBoxOutput.AppendText(string.Format("Pinging {0} [{1}] with {2} bytes of data:\n\n", e.Address, e.Destination.ToString(), 32));
			else
				_textBoxOutput.AppendText(string.Format("Pinging {0} with {1} bytes of data:\n\n", e.Destination.ToString(), 32));
		}