private void Drone_OnPingChange(object sender, PingChangedEventArgs e) { if (pingLabel.InvokeRequired) { pingLabel.Invoke(new EventHandler <PingChangedEventArgs>(Drone_OnPingChange), sender, e); } else { UpdatePing(e.IsConnected, e.Ping); } }
private void PingExecuter_PingChanged(object sender, PingChangedEventArgs e) { var location = new LocationPingChanged(); location.Icon = Icon; location.LocationName = Name; location.Server = e.NewPing.Server; location.Ping = e.NewPing.Ping; var args = new LocationPingChangedEventArgs(); args.NewLocationPing = location; LocationPingChanged?.Invoke(this, args); }
private void Drone_OnPingChange(object sender, PingChangedEventArgs e) { dataDirty = true; }