public bool?SetGamesCategories(IEnumerable <IGame> games) { var window = new CategoryConfigWindow() { AutoUpdateGame = true, Games = games, Owner = Application.Current.MainWindow }; window.ShowDialog(); return(window.DialogResult); }
private void ButtonPickCat_Click(object sender, RoutedEventArgs e) { var converter = new ListToStringConverter(); var dummyGame = new Game() { Categories = (ComparableList <string>)converter.ConvertBack(TextCategories.Text, typeof(ComparableList <string>), null, CultureInfo.InvariantCulture) }; var window = new CategoryConfigWindow() { AutoUpdateGame = false, Game = dummyGame, Owner = this }; window.ShowDialog(); if (window.DialogResult == true) { TextCategories.Text = (string)converter.Convert(dummyGame.Categories, typeof(string), null, CultureInfo.InvariantCulture); } }