Example #1
0
        public Form1()
        {
            InitializeComponent();
            AppDomain currentDomain = AppDomain.CurrentDomain;

            currentDomain.UnhandledException += currentDomain_UnhandledException;

            timeLabels  = new Label[] { claimtime1, claimtime2, claimtime3, claimtime4, claimtime5, claimtime6, claimtime7, claimtime8, claimtime9 };
            enableBoxes = new List <CheckBox> {
                DQCalcBox, freeChestBox, autoPvPCheckbox, autoWBCheckbox
            };
            wbSettingsCounts = new List <NumericUpDown> {
                LOCHARequirementCount, LOCHAAttacksCount, superLOCHAReqCount, superLOCHAAtkCount,
                LOCNHRequirementCount, LOCNHAttacksCount, superLOCNHReqCount, superLOCNHAtkCount,
                MOAKHARequirementCount, MOAKHAAttacksCount, superMOAKHAReqCount, superMOAKHAAtkCount,
                MOAKNHRequirementCount, MOAKNHAttacksCount, superMOAKNHReqCount, superMOAKNHAtkCount,
                KrytonHAReqCount, KrytonHAAttacksCount, SuperKrytonHAReqCount, SuperKrytonHAAttacksCount,
                KrytonNHReqCount, KrytonNHAttacksCount, SuperKrytonNHReqCount, SuperKrytonNHAttacksCount,
                DoyHAReqCount, DoyHAAttacksCount, SuperDoyHAReqCount, SuperDoyHAAttacksCount,
                DoyNHReqCount, DoyNHAttacksCount, SuperDoyNHReqCount, SuperDoyNHAttacksCount
            };
            auctionCountdowns = new List <Label> {
                ahCountdown1, ahCountdown2, ahCountdown3
            };
            toolTip1.SetToolTip(safeModeWB, "Asks for confirmation before attacking. Won't ask again for the same boss");
            safeModeWB.Enabled = false;
            WBlineups          = new List <List <ComboBox> > {
                new List <ComboBox> {
                    LOCHA1, LOCHA2, LOCHA3, LOCHA4, LOCHA5, LOCHA6
                },
                new List <ComboBox> {
                    MOAKHA1, MOAKHA2, MOAKHA3, MOAKHA4, MOAKHA5, MOAKHA6
                },
                new List <ComboBox> {
                    DQLineup1, DQLineup2, DQLineup3, DQLineup4, DQLineup5, DQLineup6
                },
                new List <ComboBox> {
                    KrytonHA1, KrytonHA2, KrytonHA3, KrytonHA4, KrytonHA5, KrytonHA6
                },
                new List <ComboBox> {
                    DOYHA1, DOYHA2, DOYHA3, DOYHA4, DOYHA5, DOYHA6
                }
            };
            auctionComboBoxes = new List <ComboBox> {
                auctionHero1Combo, auctionHero2Combo, auctionHero3Combo,
            };
            AutoCompleteStringCollection acsc = new AutoCompleteStringCollection();

            foreach (List <ComboBox> l in WBlineups)
            {
                foreach (ComboBox c in l)
                {
                    foreach (string n in Constants.names.ToList().OrderBy(s => s))
                    {
                        c.Items.Add(n);
                    }
                }
            }

            init();

            if (pf != null)
            {
                auctionHouse = new AuctionHouse(this);
                autoLevel    = new AutoLevel(this);
                autoChests   = new AutoChests(this);
                autoDQ       = new AutoDQ(this);
                autopvp      = new AutoPvP(this);
                autoWB       = new AutoWB(this);
                PFStuff.getUsername(KongregateId);
                startTimers();
                countdownsTimer.Interval = 1000;
                countdownsTimer.Elapsed += countdownsTimer_Elapsed;
                countdownsTimer.Start();
                logoutTimer.Interval = 24 * 3600 * 1000;
                logoutTimer.Elapsed += logoutTimer_Elapsed;
                logoutTimer.Start();
            }
        }