private void MainWindow_Closed(object sender, System.EventArgs e) { ServiceLocator.Settings.OpenedFileName = ServiceLocator.GameTreeViewModel.FileName; var serializer = new SgfParser(); ServiceLocator.Settings.CurrentGameSgf = Encoding.UTF8.GetString(serializer.Serialize(ServiceLocator.GameTreeViewModel.GameInfo)); ServiceLocator.Settings.Save(); }