private async void NewGame(object sender, RoutedEventArgs e) { DialogNewGame dialog = new DialogNewGame(); this.Hide(); await dialog.ShowAsync(); }
} // End Constructor /*Create Button*/ private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { ComboBoxItem selected = (ComboBoxItem)Hub.SelectedValue; try { AirCoon.Game.Handler.SaveGame sg = new AirCoon.Game.Handler.SaveGame(selected.Tag.ToString(), Code.Text, Name.Text ); } catch (SaveGameException e) { DialogNewGame dialog = new DialogNewGame(Name.Text, Code.Text, selected.Tag.ToString(), e.Message ); this.Hide(); await dialog.ShowAsync(); } }