public ShadowDuel(DuelRequestAdministrator admin, int id) { InitializeComponent(); _admin = admin; _id = id; this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight; this.MouseDown += Window_MouseDown; rb_BP.IsChecked = true; _bettype = BetType.BPs; rb_BP.Checked += Rb_BP_Checked; rb_ban.Checked += Rb_ban_Checked; rb_mute.Checked += Rb_mute_Checked; cb_dueltype.Items.Add(RoomType.Single); cb_dueltype.Items.Add(RoomType.Match); cb_masterrules.Items.Add("MR5 (Avril 2020)"); cb_masterrules.Items.Add("MR4 (Link)"); cb_masterrules.Items.Add("MR3 (Pendules)"); cb_masterrules.Items.Add("MR2 (Synchro/XYZ)"); cb_masterrules.Items.Add("MR1 (Basique)"); cb_banlist.ItemsSource = FormExecution.GetBanlists().Keys.ToArray(); cb_banlist.SelectedIndex = 0; cb_dueltype.SelectedIndex = 0; tb_handcard.Text = "5"; tb_lpstartduel.Text = "8000"; cb_masterrules.SelectedIndex = 0; tb_drawcount.Text = "1"; chb_shuffledeck.IsChecked = false; btnChoose.MouseLeftButtonDown += BtnChoose_MouseLeftButtonDown; btnSend.MouseLeftButtonDown += BtnSend_MouseLeftButtonDown; LoadStyle(); }
public DuelRequest(DuelRequestAdministrator admin, int id) { InitializeComponent(); this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight; _admin = admin; cb_dueltype.ItemsSource = Enum.GetValues(typeof(RoomType)).Cast <RoomType>(); cb_masterrules.Items.Add("MR5 (Avril 2020)"); cb_masterrules.Items.Add("MR4 (Link)"); cb_masterrules.Items.Add("MR3 (Pendules)"); cb_masterrules.Items.Add("MR2 (XYZ)"); cb_masterrules.Items.Add("MR1 (Synchro)"); cb_masterrules.Items.Add("MR0 (Fusion)"); cb_masterrules.Items.Add("Turbo Duel BCA"); _id = id; this.MouseDown += Window_MouseDown; tb_captiontext.GotFocus += Tb_captiontext_GotFocus; chb_password.Unchecked += chb_password_Checked; }
public ShadowDuelRequest(PlayerInfo player, RoomConfig config, Bet bet, DuelRequestAdministrator admin) { InitializeComponent(); this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight; this.MouseDown += Window_MouseDown; LoadStyle(); _bet = bet; _admin = admin; btnChoose.Visibility = Visibility.Hidden; btnAgree.Visibility = Visibility.Visible; lbPanel.Visibility = Visibility.Hidden; tb_popup_banlist.Foreground = new SolidColorBrush(Colors.White); tb_popup_lp.Foreground = new SolidColorBrush(Colors.White); tb_popup_MR.Foreground = new SolidColorBrush(Colors.White); tb_popup_starthand.Foreground = new SolidColorBrush(Colors.White); tb_shuffledeck.Foreground = new SolidColorBrush(Colors.White); tb_drawcount.Foreground = new SolidColorBrush(Colors.White); if (config.Banlist != 0) { tb_popup_banlist.Foreground = new SolidColorBrush(FormExecution.AppDesignConfig.GetGameColor("CustomRoomColor")); } tb_popup_banlist.Text = FormExecution.GetBanlistValue(config.Banlist); if ((config.StartDuelLP != 8000 && config.Type != RoomType.Tag) || (config.StartDuelLP != 16000 && config.Type == RoomType.Tag)) { tb_popup_lp.Foreground = new SolidColorBrush(FormExecution.AppDesignConfig.GetGameColor("CustomRoomColor")); } tb_popup_lp.Text = config.StartDuelLP.ToString(); if (config.MasterRules != 5) { tb_popup_MR.Foreground = new SolidColorBrush(FormExecution.AppDesignConfig.GetGameColor("CustomRoomColor")); } tb_popup_MR.Text = config.MasterRules.ToString(); if (config.CardByHand != 5) { tb_popup_starthand.Foreground = new SolidColorBrush(FormExecution.AppDesignConfig.GetGameColor("CustomRoomColor")); } tb_popup_starthand.Text = config.CardByHand.ToString(); if (config.DrawCount != 1) { tb_drawcount.Foreground = new SolidColorBrush(FormExecution.AppDesignConfig.GetGameColor("CustomRoomColor")); } tb_drawcount.Text = config.DrawCount.ToString(); if (config.NoShuffleDeck) { tb_shuffledeck.Foreground = new SolidColorBrush(FormExecution.AppDesignConfig.GetGameColor("CustomRoomColor")); tb_shuffledeck.Text = "Deck non mélangé"; } tb_popup_type.Text = config.Type.ToString(); tb_captiontext.Text = config.CaptionText; tb_title.Text = string.Format("Vous avez été invité en duel des ombres par {0}", player.Username); switch (bet.BType) { case BetType.BPs: tb_mise.Text = string.Format("{0}", ((BPsBet)bet).Amount + "BPs"); break; case BetType.Ban: tb_mise.Text = string.Format("{0}", "Ban - " + ((SanctionBet)bet).Time + "H"); break; case BetType.Mute: tb_mise.Text = string.Format("{0}", "Mute - " + ((SanctionBet)bet).Time + "H"); break; } btnAgree.MouseLeftButtonDown += (sender, e) => RequestResult(sender, e, true); btnDisagree.MouseLeftButtonDown += (sender, e) => RequestResult(sender, e, false); }