Exemple #1
0
 private void gridscript_ComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (gridscript_ComboBox.Focused)
     {
         UpdateGridItem();
         SpellGrid.Open();
     }
 }
Exemple #2
0
 private void gridspell_ComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (gridspell_ComboBox.Focused)
     {
         gridborder_ComboBox.SelectedIndex = 0;
         UpdateGridItem();
         SpellGrid.Open();
     }
 }
Exemple #3
0
        private void gridslot_ComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            int index = gridslot_ComboBox.SelectedIndex;

            SpellGrid.SpellGridItem item = Settings.SpellGrid.ReadSelectedItem(index);
            gridgroup_ComboBox.SelectedIndex = gridgroup_ComboBox.Items.IndexOf(item.Group);
            if (item.Group != "Empty")
            {
                gridborder_ComboBox.Enabled = true;

                gridborder_ComboBox.SelectedIndex = gridborder_ComboBox.Items.IndexOf(item.Color.Name);
                if (item.Group != "Script")
                {
                    gridspell_ComboBox.SelectedIndex  = gridspell_ComboBox.Items.IndexOf(item.Spell);
                    gridspell_ComboBox.Enabled        = true;
                    gridscript_ComboBox.Enabled       = false;
                    gridscript_ComboBox.SelectedIndex = -1;
                }
                else
                {
                    gridscript_ComboBox.Enabled       = true;
                    gridscript_ComboBox.SelectedIndex = gridscript_ComboBox.Items.IndexOf(item.Spell);
                    gridspell_ComboBox.Enabled        = false;
                    gridspell_ComboBox.SelectedIndex  = -1;
                }
            }
            else
            {
                Settings.SpellGrid.UpdateItem(gridslot_ComboBox.SelectedIndex, gridgroup_ComboBox.Text, gridspell_ComboBox.Text, System.Drawing.Color.Transparent);
                gridspell_ComboBox.SelectedIndex  = -1;
                gridborder_ComboBox.SelectedIndex = -1;
                gridspell_ComboBox.Enabled        = false;
                gridborder_ComboBox.Enabled       = false;
            }

            if (gridslot_ComboBox.Focused)
            {
                SpellGrid.Open();
            }
        }
Exemple #4
0
        private void gridgroup_ComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (gridgroup_ComboBox.Text)
            {
            case "Empty":
            {
                gridspell_ComboBox.DataSource    = null;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = false;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = -1;
                gridscript_ComboBox.Enabled      = false;
                if (gridgroup_ComboBox.Focused)
                {
                    SpellGrid.Close();
                }
                break;
            }

            case "Magery":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconMagery.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Abilities":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconAbilities.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Mastery":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconMastery.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Bushido":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconBushido.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Chivalry":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconChivalry.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Necromancy":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconNecromancy.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Ninjitsu":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconNinjitsu.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Mysticism":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconMysticism.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Spellweaving":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SpellIconSpellweaving.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Skills":
            {
                gridspell_ComboBox.DataSource    = SpellGrid.SkillsIcon.Keys.ToList();
                gridscript_ComboBox.Enabled      = false;
                gridspell_ComboBox.Enabled       = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0;
                break;
            }

            case "Script":
            {
                gridscript_ComboBox.Enabled      = gridborder_ComboBox.Enabled = true;
                gridspell_ComboBox.Enabled       = false;
                gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = -1;
                break;
            }

            default:
                break;
            }
            if (gridgroup_ComboBox.Focused)
            {
                UpdateGridItem();
                SpellGrid.Open();
            }
        }