Пример #1
0
        private void btn_save_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            client_config.Greet                       = (bool)cb_greet.IsChecked;
            client_config.IgnoreDuelRequest           = (bool)cb_duelrequest.IsChecked;
            client_config.IgnoreCustomDuelRequest     = (bool)cb_customduelrequest.IsChecked;
            client_config.IgnoreShadowDuelRequest     = (bool)cb_shadowduelrequest.IsChecked;
            client_config.IgnoreTradeRequest          = (bool)cb_traderequest.IsChecked;
            client_config.Connexion_Message           = (bool)cb_connectionmsg.IsChecked;
            client_config.Autoscroll                  = (bool)cb_autoscroll.IsChecked;
            client_config.PMPopup                     = (bool)cb_popuppm.IsChecked;
            client_config.AllowDeckShare              = (bool)!cb_allowsharedeck.IsChecked;
            client_config.AllowReplayShare            = (bool)!cb_allowsharereplay.IsChecked;
            client_config.PMEndDuel                   = (bool)cb_popupduelend.IsChecked;
            client_config.ShowChatScrollbar           = (bool)cb_showchatscrollbar.IsChecked;
            client_config.UserlistScrollbar           = (bool)cb_showuserlistscrollbar.IsChecked;
            client_config.ChatBackgroundIsPic         = (bool)cb_backgroundchatpic.IsChecked;
            client_config.ShowArenaWaitingRoomMessage = (bool)cb_showarenamessage.IsChecked;
            client_config.TradeScrollBar              = (bool)cb_scrollbartrade.IsChecked;
            client_config.AlternativePurchaseWindow   = (bool)cb_alternativeshopwindow.IsChecked;
            client_config.DisplayTagTeam              = (bool)cb_tagteam.IsChecked;

            style.Font = (FontFamily)cb_fontFamily.SelectedItem;
            if (style.Font == null)
            {
                style.Font = new FontFamily("Arial");
            }
            style.FontSize = Convert.ToInt32(tb_fontsize.Text);

            style.Save();
            client_config.Save();

            FormExecution.RefreshChatStyle();

            FormExecution.Client.OpenPopBox("Configurations mises à jour.", "Configurations");
            Close();
        }