//Updates the static data and displays in console static void updateStatic(object sender, StaticDataEventArgs e) { Console.WriteLine("Static Data:"); Console.WriteLine("Track: " + e.StaticData.Track); Console.WriteLine("Car: " + e.StaticData.CarModel); Console.WriteLine("Player: " + e.StaticData.PlayerName); }
/// <summary> /// Event triggers that notifies the subscribers and passes the data as "e" /// </summary> /// <param name="e">The collected data</param> public virtual void OnStaticDataUpdated(StaticDataEventArgs e) { //Check if there are any subscribers to the event if (StaticDataUpdated != null) { //Pass on the dataobject in "e" to subscribers. StaticDataUpdated(this, e); } }
private void updateForm(object sender, StaticDataEventArgs e) { //track_label.Invoke }