Example #1
0
        private void Form2_Load(object sender, EventArgs e)
        {
            SomeSettings.UserHotkey = HKMDB.deserialize();
            this.DoubleBuffered     = true;
            this.TopMost            = true;
            if (Settings.Default.consolesavelocation == true && SomeSettings.bot_firstuse == false && Settings.Default.consolesize != null)
            {
                this.Size     = Settings.Default.consolesize;
                this.Location = Settings.Default.consolelocation;
            }
            else
            {
                this.Location = new Point(SystemInformation.PrimaryMonitorSize.Width - this.Size.Width, 0);
            }
            SomeSettings.consoleHiden = !Settings.Default.showconsole;
            SomeSettings.showballon   = Settings.Default.showballoon;
            this.BackColor            = Settings.Default.consolebackgroundcolor;
            textBox1.BackColor        = Settings.Default.consolebackgroundcolor;
            richTextBox1.BackColor    = Settings.Default.consolebackgroundcolor;
            textBox1.Font             = Settings.Default.consolefont;
            richTextBox1.Font         = Settings.Default.consolefont;
            label1.Font            = Settings.Default.consolefont;
            label1.ForeColor       = Settings.Default.consolefontcolor;
            textBox1.ForeColor     = Settings.Default.consolefontcolor;
            richTextBox1.ForeColor = Settings.Default.consolefontcolor;
            textBox1.Size          = new Size(textBox1.Size.Width, (int)Math.Truncate(label1.Font.Size) + 3);
            textBox1.Location      = new Point(label1.Location.X + label1.Size.Width, textBox1.Location.Y);

            //appstart.InterceptKeys.Launch();
            //appstart.InterceptKeys.appuyé += new KeyTransfertEventHandler(InterceptKeys_appuyé);
            SomeSettings.hkm = new HotKeyManager();
            if (SomeSettings.working == false)
            {
                this.Dispose();
                Application.Exit();
                Application.ExitThread();
            }
            else
            {
                analyzencour = 0;
                analyzfini   = false;
                botnumber    = SomeSettings.botnumber;

                if (botnumber == 0)
                {
                    this.Dispose();
                }
                debug = Settings.Default.debug_mode;
                sendtext("     XBot By Um3w  ");
                // richTextBox1.ap
                sendtext("     Version: " + SomeSettings.ProductVersion);
                sendtext("");
                sendtext("User settings saved");
                sendtext("XBot mode: " + SomeSettings.getBotModstring(SomeSettings.BotMod));
                sendtext("->Bots number: " + SomeSettings.botnumber.ToString());
                launchingthread();
            }
        }
Example #2
0
        public hotkeymanager()
        {
            InitializeComponent();
            Firstuse = false;
            HKMDB lol = new HKMDB(new KeyEventArgs(Keys.Control | Keys.Enter), 1);

            nombreditems = HKMLIST.NOMBREDEHOTKEYS;
            if (Settings.Default.first_use == true)
            {
                Firstuse               = true;
                listOfHotkeys          = new System.Collections.ArrayList();
                listOfHotkeys.Capacity = nombreditems;
                for (int arg = 0; arg < nombreditems; arg++)
                {
                    listOfHotkeys.Add(HKMLIST.HKMLISTDEF[arg]);
                }
            }
            else
            {
                listOfHotkeys = HKMDB.deserialize();
                if (listOfHotkeys.Count != nombreditems)
                {
                    int anciennombreditems = listOfHotkeys.Capacity;
                    listOfHotkeys.Capacity = nombreditems;
                    for (int arg = anciennombreditems; arg < listOfHotkeys.Capacity; arg++)
                    {
                        listOfHotkeys.Add(HKMLIST.HKMLISTDEF[arg]);
                    }
                }
            }


            foreach (HKMDB h in HKMLIST.HKMLISTDEF)
            {
                listBox1.Items.Add(h.DonnemoiladéfinitionConnard());
            }
            listBox1.SelectedIndex = 0;
        }