private void RefreshCharactersToolStripMenuItemClick(object sender, System.EventArgs e)
        {
            var data = Process.GetProcessesByName("pol");
            var node = EliteMMO_PROC.SelectedIndex;

            if (data.Count() <= EliteMMO_PROC.Items.Count && data.Count() >= EliteMMO_PROC.Items.Count)
            {
                return;
            }

            var count = data.Count();

            if (count != 0)
            {
                //EliteMMO_PROC.Items.Clear();
                foreach (var dats in data.Where(dats => EliteMMO_PROC.Contains(new Control(dats.MainWindowTitle)) == false))
                {
                    EliteMMO_PROC.Items.Add(dats.MainWindowTitle);
                }
                EliteMMO_PROC.SelectedIndex = node;
            }
            else
            {
                if (EliteMMO_PROC.Items.Count != 0)
                {
                    EliteMMO_PROC.Items.Clear();
                }
            }
        }
        private void FarmDncToolStripMenuItemClick(object sender, System.EventArgs e)
        {
            if (xStatusLabel.Text == @":: Final Fantasy Not Found ::")
            {
                return;
            }

            //if (InventoryItems.items.Count == 0)
            //    InventoryItems.PopulateItems();

            #region show/hide objects
            xpic.Hide();
            header1.Hide();
            header2.Hide();
            label1.Hide();
            button1.Hide();
            EliteMMO_PROC.Hide();

            x4.Hide();
            x2.Hide();
            x1.Show();
            #endregion

            refreshCharactersToolStripMenuItem.Enabled = false;

            x1.Dock = DockStyle.Fill;
            Controls.Add(x1);
            Size = new Size(734, 468);
        }
        private void HealingSupportToolStripMenuItemClick(object sender, System.EventArgs e)
        {
            if (xStatusLabel.Text == @":: Final Fantasy Not Found ::")
            {
                return;
            }

            #region show/hide objects
            xpic.Hide();
            header1.Hide();
            header2.Hide();
            label1.Hide();
            button1.Hide();
            EliteMMO_PROC.Hide();

            x4.Hide();
            x1.Hide();
            x2.Show();
            #endregion

            refreshCharactersToolStripMenuItem.Enabled = false;

            x1.Dock = DockStyle.Fill;
            Controls.Add(x2);
            Size = new Size(650, 442);
        }
        private void navigationToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            if (xStatusLabel.Text.Contains(@":: Final Fantasy Not Found ::") && !TESTMODE)
            {
                return;
            }

            if (farmbot.botRunning)
            {
                string       message = "The FarmBot is currently running\nare you sure you want to swith\nto the NavBot?\n\nThis will stop the farmbot.";
                string       caption = "Switching to FarmBot";
                DialogResult result  = MessageBox.Show(message, caption, MessageBoxButtons.YesNo);
                if (result == DialogResult.Yes)
                {
                    farmbot.stopScriptToolStripMenuItem.PerformClick();
                }
                else
                {
                    return;
                }
            }
            #region show/hide objects
            xpic.Hide();
            header1.Hide();
            header2.Hide();
            header3.Hide();
            header4.Hide();
            header5.Hide();
            label1.Hide();
            //button1.Hide();
            EliteMMO_PROC.Hide();

            x2.Hide();
            x1.Hide();
            x4.Hide();
            x5.Hide();
            x3.Show();
            loadSettingsToolStripMenuItem.Enabled = false;
            saveSettingsToolStripMenuItem.Enabled = false;
            #endregion

            TopMostDisplay     = "NavBot";
            farmbot.currentbot = "NavBot";
            refreshCharactersToolStripMenuItem.Enabled = false;

            x3.AutoSize     = true;
            x3.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            x3.Dock         = DockStyle.Fill;
            Controls.Add(x3);
            AutoSize     = true;
            AutoSizeMode = AutoSizeMode.GrowAndShrink;
            if (farmbot.botRunning)
            {
                farmbot.stopScriptToolStripMenuItem.PerformClick();
            }
            //if (farmbot.bgw_script_disp.IsBusy) farmbot.bgw_script_disp.CancelAsync();

            /*api.ThirdParty.SetText("ScriptedHUD", "Scripted:NavBot");
             * api.ThirdParty.FlushCommands();*/
        }
        private void AboutToolStripMenuItemClick(object sender, System.EventArgs e)
        {
            #region show/hide objects
            xpic.Show();
            header1.Show();
            header2.Show();
            label1.Show();
            button1.Show();
            EliteMMO_PROC.Show();

            x4.Hide();
            x1.Hide();
            #endregion

            refreshCharactersToolStripMenuItem.Enabled = true;

            Size = new Size(372, 237);
        }
        private void skillupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (xStatusLabel.Text == @":: Final Fantasy Not Found ::")
            {
                return;
            }

            #region show/hide objects
            xpic.Hide();
            header1.Hide();
            header2.Hide();
            header3.Hide();
            header4.Hide();
            header5.Hide();
            label1.Hide();
            //button1.Hide();
            EliteMMO_PROC.Hide();

            x2.Hide();
            x1.Hide();
            x3.Hide();
            x4.Hide();
            x5.Show();
            loadSettingsToolStripMenuItem.Enabled = false;
            saveSettingsToolStripMenuItem.Enabled = false;
            #endregion

            TopMostDisplay     = "SkillUp";
            farmbot.currentbot = "SkillUp";
            refreshCharactersToolStripMenuItem.Enabled = false;

            x5.AutoSize     = true;
            x5.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            x5.Dock         = DockStyle.Fill;
            Controls.Add(x5);
            AutoSize     = true;
            AutoSizeMode = AutoSizeMode.GrowAndShrink;

            /*api.ThirdParty.SetText("ScriptedHUD", "Scripted:SkillUpBot");
             * api.ThirdParty.FlushCommands();*/
        }
        private void FarmDncToolStripMenuItemClick(object sender, System.EventArgs e)
        {
            if (xStatusLabel.Text.Contains(@":: Final Fantasy Not Found ::"))
            {
                return;
            }


            if (navbot.isRunning)
            {
                string       message = "The NavBot is currently running are\nyou sure you want to swith to the\nFarmBot?\n\nThis will stop your nav from runnind.";
                string       caption = "Switching to NavBot";
                DialogResult result  = MessageBox.Show(message, caption, MessageBoxButtons.YesNo);
                if (result == DialogResult.Yes)
                {
                    navbot.StopToolStripMenuItem.PerformClick();
                }
                else
                {
                    return;
                }
            }

            //if (InventoryItems.items.Count == 0)
            //    InventoryItems.PopulateItems();

            #region show/hide objects
            xpic.Hide();
            header1.Hide();
            header2.Hide();
            header3.Hide();
            header4.Hide();
            header5.Hide();
            label1.Hide();
            //button1.Hide();
            EliteMMO_PROC.Hide();

            x4.Hide();
            x3.Hide();
            x2.Hide();
            x5.Hide();
            x1.Show();
            loadSettingsToolStripMenuItem.Enabled = true;
            saveSettingsToolStripMenuItem.Enabled = true;
            #endregion

            TopMostDisplay     = "FarmBot";;
            farmbot.currentbot = "FarmBot";
            refreshCharactersToolStripMenuItem.Enabled = false;

            x1.AutoSize     = true;
            x1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            x1.Dock         = DockStyle.Fill;
            Controls.Add(x1);
            AutoSize     = true;
            AutoSizeMode = AutoSizeMode.GrowAndShrink;
            Dock         = DockStyle.Fill;
            if (!farmbot.bgw_script_disp.IsBusy)
            {
                farmbot.bgw_script_disp.RunWorkerAsync();
            }
            if (windowername == "Ashita")
            {
                api.ThirdParty.SendString("/addon load ScriptedExtender");
                extenderactive = true;
            }
            else if (windowername == "Windower")
            {
                api.ThirdParty.SendString("//lua load ScriptedExtender");
                extenderactive = true;
            }

            /*api.ThirdParty.SetText("ScriptedHUD", "Scripted:FarmBot");
             * api.ThirdParty.FlushCommands();*/
        }