private void AttachPokemonParty(ref PokemonParty f)
 {
     if (f != null)
     {
         f.Location = new Point(this.Location.X - f.Width, this.Location.Y);
         f.BringToFront();
     }
 }
 private void AttachPokemonParty(ref PokemonParty f)
 {
     if (f != null)
     {
         f.Location = new Point(this.Location.X - f.Width, this.Location.Y);
         f.BringToFront();
     }
 }
        private void LogForm_Shown(object sender, EventArgs e)
        {
            this.Location = new Point(400, 100);
            // Load Modules
            //// PokemonParty
            module_party = new PokemonParty(_defaultSaveDirectory);
            module_party.Show();
            AttachPokemonParty(ref module_party);

            Initialize_vJoy(); // Create Virtual Joystick

            // Defaults
            voteBox.Items.Clear();
            chatBox.Items.Clear();
            double _maxdelay;

            if (double.TryParse(txtMaxDelay.Text, out _maxdelay))
            {
                Program.MaxDelay = _maxdelay;
            }
            this.LagNoticeEnabled   = false;
            this.InputEnabled       = true;
            this.lblVoteResult.Text = "";

            // Timespan
            Thread clock_thread = new Thread(() => Tick());

            clock_thread.IsBackground = true;
            clock_thread.Start();

            Thread mode_thread = new Thread(() => CheckModeVotes());

            mode_thread.IsBackground = true;
            mode_thread.Start();

            Thread nominee_thread = new Thread(() => SortNominees());

            nominee_thread.IsBackground = true;
            nominee_thread.Start();

            // Cache Timer
            Thread cache_thread = new Thread(() => CacheTick());

            cache_thread.IsBackground = true;
            cache_thread.Start();

            // Vote listener
            Thread thread = new Thread(() => TwitchPlays.Program.ConnectIRC(this));

            thread.IsBackground = true;
            thread.Start();
        }
        private void LogForm_Shown(object sender, EventArgs e)
        {
            this.Location = new Point(400, 100);
            // Load Modules
            //// PokemonParty
            module_party = new PokemonParty(_defaultSaveDirectory);
            module_party.Show();
            AttachPokemonParty(ref module_party);

            Initialize_vJoy(); // Create Virtual Joystick

            // Defaults
            voteBox.Items.Clear();
            chatBox.Items.Clear();
            double _maxdelay;
            if (double.TryParse(txtMaxDelay.Text, out _maxdelay)) Program.MaxDelay = _maxdelay;
            this.LagNoticeEnabled = false;
            this.InputEnabled = true;
            this.lblVoteResult.Text = "";

            // Timespan
            Thread clock_thread = new Thread(() => Tick());
            clock_thread.IsBackground = true;
            clock_thread.Start();

            Thread mode_thread = new Thread(() => CheckModeVotes());
            mode_thread.IsBackground = true;
            mode_thread.Start();

            Thread nominee_thread = new Thread(() => SortNominees());
            nominee_thread.IsBackground = true;
            nominee_thread.Start();

            // Cache Timer
            Thread cache_thread = new Thread(() => CacheTick());
            cache_thread.IsBackground = true;
            cache_thread.Start();

            // Vote listener
            Thread thread = new Thread(() => TwitchPlays.Program.ConnectIRC(this));
            thread.IsBackground = true;
            thread.Start();
        }