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 UpdateConfig()
        {
            AttackModel attackModel = new AttackModel
            {
                Boss        = (bool)BossBattle.IsChecked,
                Friend      = (bool)FriendBattle.IsChecked,
                Guild       = (bool)GuildBattle.IsChecked,
                Brave       = (bool)BraveBattle.IsChecked,
                DoS         = (bool)DoSBattle.IsChecked,
                Expedition  = (bool)ExpeditionBattle.IsChecked,
                PlanetTrial = (bool)PlanetTrialBattle.IsChecked,

                PlanetTrialRetryAmount = Convert.ToInt32(PlanetTrialRetry.Text),
                PlanetTrialAutoRetry   = (bool)PlanetTrialAutoRetry.IsChecked,

                BraveMaxTickets = Convert.ToInt32(BraveMaxTickets.Text),
                BraveMaxCE      = Convert.ToInt32(BraveMaxCE.Text),
                BraveAutoRetry  = (bool)BraveAttackMore.IsChecked,

                GuildRetryAmount = Convert.ToInt32(GuildMax.Text),

                FriendRetryAmount = Convert.ToInt32(FriendRetry.Text),
                FriendMaxOnly     = (bool)FriendMax.IsChecked
            };

            GlobalVariables.attackSettings = attackModel;

            DailyModel dailyModel = new DailyModel
            {
                Alchemy      = (bool)Alchemy.IsChecked,
                SendHearts   = (bool)SendHearts.IsChecked,
                SpinWheel    = (bool)SpinWheel.IsChecked,
                DailyTavern  = (bool)CompleteTavern.IsChecked,
                CombineEquip = (bool)CombineEquip.IsChecked,
                CommonSummon = (bool)PerformCommon.IsChecked,
                GrandSummon  = (bool)PerformGrand.IsChecked,
                DailyBrave   = (bool)CompleteBrave.IsChecked,

                SendFriendReq     = (bool)SendFriend.IsChecked,
                AcceptFreindReq   = (bool)AcceptFriends.IsChecked,
                DeclineFriendReq  = (bool)DeclineFriends.IsChecked,
                DailyBag          = (bool)DailyBag.IsChecked,
                PurchaseDoSTicket = (bool)PurchaseDoS.IsChecked,
                DeleteMail        = (bool)DeleteMail.IsChecked
            };

            WriteIni.UpdateConfig(attackModel, dailyModel);
        }
Example #3
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;
        }
Example #4
0
        private void Snackboxx_Load(object sender, EventArgs e)
        {
            _iniObj     = new IniObj();
            _userrights = new List <UserRight>();
            _wrini      = new WriteIni();

            try
            {
                FileInfo fi = new FileInfo(IniFilePath);
                if (!fi.Exists)
                {
                    fi.Create();
                }
                else
                {
                    _ini    = new ReadIni(IniFilePath);
                    _iniObj = _ini.GetIni();
                }
                logfilename         = DateTime.Now.Year + "" + DateTime.Now.Month + "" + DateTime.Now.Day;
                _iniObj.LogFilename = logfilename;
                if (string.IsNullOrEmpty(_iniObj.ScanLogPath))
                {
                    _iniObj.ScanLogPath = Environment.CurrentDirectory + "\\ScanLog\\";
                }
                Config           = new Config(_iniObj, this, _dbConn);
                _dbConn          = Config.DBConn;
                tssinfoFOUR.Text = _dbConn.GetState.ToString();

                //after correct connection...
                _input = new Input(_iniObj, this, _dbConn, _userrights);

                this.ShowControl(_input);

                new UnknownCodeSchemaUpdater(_dbConn, _input.WriteInfoLog);
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
                userToolStripMenuItem.Enabled  = false;
                inputToolStripMenuItem.Enabled = false;
            }
        }
Example #5
0
 public Worker()
 {
     _writeini = new WriteIni();
 }