//private void ViewModel_Pause(Object sender, EventArgs e) //{ // if (_model.TogglePlay()) // { // _timer.Stop(); // } //} private async void ViewModel_LoadConfiguration(Object sender, EventArgs e) { try { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title = "Load Configuration"; openFileDialog.Filter = "Life files|*.lif"; if (openFileDialog.ShowDialog() == true) { await _model.LoadConfiguration(openFileDialog.FileName); } } catch (Exception) { MessageBox.Show("Error while loading the configuration file!", "Game of Life", MessageBoxButton.OK, MessageBoxImage.Error); } }