private static bool Open_OnAction(string args)
        {
            if (args != null && args.Length > 0)
            {
                switch (args.ToLower())
                {
                case "help":
                    Engine.OpenHelp();
                    break;

                case "options":
                    Engine.OpenOptions();
                    break;

                case "journal":
                    Engine.OpenJournal();
                    break;

                case "skills":
                    Engine.OpenSkills();
                    break;

                case "status":
                    Engine.OpenStatus();
                    break;

                case "spellbook":
                    Engine.OpenSpellbook(1);
                    break;

                case "necrospellbook":
                    Engine.OpenSpellbook(2);
                    break;

                case "paladinspellbook":
                    Engine.OpenSpellbook(3);
                    break;

                case "paperdoll":
                    Engine.OpenPaperdoll();
                    break;

                case "backpack":
                    Engine.OpenBackpack();
                    break;

                case "radar":
                    GRadar.Open();
                    break;

                case "abilities":
                    GCombatGump.Open();
                    break;

                case "macros":
                    GMacroEditorForm.Open();
                    break;
                }
            }
            return(true);
        }
Exemple #2
0
        protected internal override void OnMouseUp(int X, int Y, MouseButtons mb)
        {
            if (mb != MouseButtons.Left)
            {
                return;
            }
            if (this.Parent.Parent is GEditorPanel)
            {
                ((GEditorPanel)this.Parent.Parent).Reset();
            }
            if (this.m_Entry.Property.PropertyType == typeof(Volume))
            {
                return;
            }
            object obj = this.m_Entry.Property.GetValue(this.m_Object, (object[])null);

            if (obj is bool)
            {
                this.SetValue((object)!(bool)obj);
            }
            else if (obj is Item || this.m_Entry.Property.PropertyType == typeof(Item))
            {
                TargetManager.Client = (ClientTargetHandler) new SetItemPropertyTarget(this);
            }
            else if (obj is Enum)
            {
                Array values = Enum.GetValues(obj.GetType());
                for (int index = 0; index < values.Length; ++index)
                {
                    if (values.GetValue(index).Equals(obj))
                    {
                        this.SetValue(values.GetValue((index + 1) % values.Length));
                        break;
                    }
                }
            }
            else if (this.m_Entry.Hue != null)
            {
                if (this.m_Picker != null)
                {
                    return;
                }
                GPropertyHuePicker gpropertyHuePicker = this.m_Picker = new GPropertyHuePicker(this);
                gpropertyHuePicker.X = this.Width - 1;
                gpropertyHuePicker.Y = 0;
                this.m_Children.Add((Gump)gpropertyHuePicker);
            }
            else if (this.m_Entry.Property.IsDefined(typeof(MacroEditorAttribute), true))
            {
                Gumps.Destroy(this.Parent.Parent.Parent.Parent);
                GMacroEditorForm.Open();
            }
            else
            {
                if (!this.m_Entry.Property.IsDefined(typeof(RenderSettingEditor), true))
                {
                    return;
                }
                Gumps.Destroy(this.Parent.Parent.Parent.Parent);
                GRenderSettingEditorForm.Open();
            }
        }