/// <summary> /// Handles the Click event of the createMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param> private void createMenuItem_Click(object sender, RoutedEventArgs e) { window = new CreateGameWindow(); var result = window.ShowDialog(); if (result.HasValue && result.Value) { mapViewer.Map = window.CreatedMap; this.players = new List <IPlayer>(window.Players); Log.Instance.Write("Chargement de la carte..."); Log.Instance.Write("Chargement des joueurs..."); Log.Instance.Write("Début de la partie."); InitGame(); Log.Instance.Write("Le joueur [" + players[currentPlayerIndex].Name + "] commence son tour."); } }
/// <summary> /// Called when [remaining point changed]. /// </summary> /// <param name="d">The UserControl d.</param> /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs" /> instance containing the event data.</param> private static void OnRemainingPointChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { CreateGameWindow window = (CreateGameWindow)d; window.UpdateSliders(); }
/// <summary> /// Handles the Click event of the createMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param> private void createMenuItem_Click(object sender, RoutedEventArgs e) { window = new CreateGameWindow(); var result = window.ShowDialog(); if (result.HasValue && result.Value) { mapViewer.Map = window.CreatedMap; this.players = new List<IPlayer>(window.Players); Log.Instance.Write("Chargement de la carte..."); Log.Instance.Write("Chargement des joueurs..."); Log.Instance.Write("Début de la partie."); InitGame(); Log.Instance.Write("Le joueur [" + players[currentPlayerIndex].Name + "] commence son tour."); } }