private void OnPopulationChanged(object sender, PopulationChangedEventArgs e) { Dispatcher.Invoke(() => { TotalPopulationCount.Content = e.CurrentPopulation; LogBox.Text += WORKER_CREATED; AddWorkerToUI(e.Unit); }); }
/// <summary> /// Emet l'event de notification de changement de ressources /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void NotifyClientPopulationChanged(object sender, PopulationChangedEventArgs e) { var args = BuildNotificationEventArgs(MessageTypes.CREATION_COMPLETED, e); NotifyClient(args); }