Exemplo n.º 1
0
        void cmd_cmbExtra_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox box = (ComboBox)sender;

            if (commandItems.SupressEvents)
            {
                return;
            }
            int idx = box.SelectedIndex;

            if (idx == -1)
            {
                return;
            }

            int boxIdx             = Array.IndexOf <ComboBox>(commandExtraBoxes, box);
            CommandExtraPerms orig = extraPermsList[boxIdx];
            CommandExtraPerms copy = LookupExtraPerms(orig.CmdName, orig.Num);

            if (copy == null)
            {
                copy = orig.Copy();
                commandExtraPermsChanged.Add(copy);
            }
            copy.MinRank = GuiPerms.RankPerms[idx];
        }