コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: gyssels/Merovingie
 private void OnPopulationChanged(object sender, PopulationChangedEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         TotalPopulationCount.Content = e.CurrentPopulation;
         LogBox.Text += WORKER_CREATED;
         AddWorkerToUI(e.Unit);
     });
 }
コード例 #2
0
        /// <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);
        }