private void SaveDataToFile(DataViewModel data)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("{0};\t{1};\t{2}", data.Year, data.Population, BornInfosToString(data.BornInfos));
            sb.AppendLine();

            File.AppendAllText(FileName, sb.ToString());
        }
        private async void Simulation_SimulationEvent(object sender, SimulationEventArgs e)
        {
            var data = new DataViewModel
            {
                Year       = e.CurrentYear,
                Population = ((Simulator)sender).CurrentPopuation,
                BornInfos  = e.BornInfos.Values.OrderBy(x => x.Order)
            };

            SaveDataToFile(data);

            await Dispatcher.InvokeAsync(() =>
            {
                _items.Add(data);
                DataGrid.ScrollIntoView(data);
            });
        }