private void shadowduelrequest_Click(object sender, RoutedEventArgs e) { if (FormExecution.ClientConfig.FirstTimeShadowDuel) { FormExecution.Client_PopMessageBoxShowDialog(StartDisclaimer.ShadowDuelText, "Premier duel des ombres !"); FormExecution.ClientConfig.FirstTimeShadowDuel = false; FormExecution.ClientConfig.Save(); } if (lvUserlist.SelectedIndex == -1) { return; } PlayerInfo target = lvUserlist.SelectedItem as PlayerInfo; #if !DEBUG if (target != null && target.Username != FormExecution.Username) { #endif ShadowDuel sd = new ShadowDuel(_admin.Client.DuelRequestAdmin, target.UserId); sd.Show(); Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => sd.Activate())); #if !DEBUG } #endif }
private void btn_playranked_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (FormExecution.ClientConfig.FirstTimeRanked) { FormExecution.Client_PopMessageBoxShowDialog(StartDisclaimer.RankedText, "Premièr duel classé !"); FormExecution.ClientConfig.FirstTimeRanked = false; FormExecution.ClientConfig.Save(); } if (RankedTimer.IsEnabled) { _admin.SendStopPlayRanked(); StopTimer(); } else { ChoicePopBox cpb = new ChoicePopBox(FormExecution.PlayerInfos, new RoomConfig(), ChoiceBoxType.DeckChoiceRanked, "", YgoproConfig.GetDefaultDeck()); cpb.Choice += Cpb_Choice; cpb.Show(); Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => cpb.Activate())); } }