Example #1
0
        private void ResetConfig_Click(object sender, RoutedEventArgs e)
        {
            var iniFile = "BotConfig.ini";

            File.Delete(iniFile);
            WriteIni.WriteConfig();
            ReadIni.ReadFile();
            UpdateUI();
        }
Example #2
0
        private void UpdateUI()
        {
            ConsoleLogBox.Text = $"[{DateTime.Now.ToString("h:mm:ss tt")}] Trying to Connect to server...";
            Main.LogConsole("Successfully Connected to Server. Enjoy!");
            WriteIni.WriteConfig();
            ReadIni.ReadFile();

            BossBattle.IsChecked        = GlobalVariables.attackSettings.Boss;
            FriendBattle.IsChecked      = GlobalVariables.attackSettings.Friend;
            GuildBattle.IsChecked       = GlobalVariables.attackSettings.Guild;
            BraveBattle.IsChecked       = GlobalVariables.attackSettings.Brave;
            DoSBattle.IsChecked         = GlobalVariables.attackSettings.DoS;
            ExpeditionBattle.IsChecked  = GlobalVariables.attackSettings.Expedition;
            PlanetTrialBattle.IsChecked = GlobalVariables.attackSettings.PlanetTrial;

            PlanetTrialRetry.Text          = GlobalVariables.attackSettings.PlanetTrialRetryAmount.ToString();
            PlanetTrialAutoRetry.IsChecked = GlobalVariables.attackSettings.PlanetTrialAutoRetry;
            BraveMaxTickets.Text           = GlobalVariables.attackSettings.BraveMaxTickets.ToString();
            BraveMaxCE.Text           = GlobalVariables.attackSettings.BraveMaxCE.ToString();
            BraveAttackMore.IsChecked = GlobalVariables.attackSettings.BraveAutoRetry;
            GuildMax.Text             = GlobalVariables.attackSettings.GuildRetryAmount.ToString();
            FriendRetry.Text          = GlobalVariables.attackSettings.FriendRetryAmount.ToString();
            FriendMax.IsChecked       = GlobalVariables.attackSettings.FriendMaxOnly;

            Alchemy.IsChecked        = GlobalVariables.dailySettings.Alchemy;
            SendHearts.IsChecked     = GlobalVariables.dailySettings.SendHearts;
            SpinWheel.IsChecked      = GlobalVariables.dailySettings.SpinWheel;
            CompleteTavern.IsChecked = GlobalVariables.dailySettings.DailyTavern;
            CombineEquip.IsChecked   = GlobalVariables.dailySettings.CombineEquip;
            PerformCommon.IsChecked  = GlobalVariables.dailySettings.CommonSummon;
            PerformGrand.IsChecked   = GlobalVariables.dailySettings.GrandSummon;
            CompleteBrave.IsChecked  = GlobalVariables.dailySettings.DailyBrave;

            SendFriend.IsChecked     = GlobalVariables.dailySettings.DailyBrave;
            AcceptFriends.IsChecked  = GlobalVariables.dailySettings.DailyBrave;
            DeclineFriends.IsChecked = GlobalVariables.dailySettings.DailyBrave;

            if (AcceptFriends.IsChecked == true && DeclineFriends.IsChecked == true)
            {
                AcceptFriends.IsChecked = false;
            }

            //DailyBag.IsChecked = GlobalVariables.dailySettings.DailyBrave;
            PurchaseDoS.IsChecked = GlobalVariables.dailySettings.DailyBrave;
            DeleteMail.IsChecked  = GlobalVariables.dailySettings.DailyBrave;
        }