예제 #1
0
 protected internal override void OnMouseUp(int X, int Y, MouseButtons mb)
 {
     if (mb == MouseButtons.Left)
     {
         ((GEditorPanel)base.Parent.Parent).Reset();
         object obj2 = this.m_Entry.Property.GetValue(this.m_Object, null);
         if (obj2 is bool)
         {
             this.SetValue(!((bool)obj2));
         }
         else if ((obj2 is Item) || (this.m_Entry.Property.PropertyType == typeof(Item)))
         {
             Engine.TargetHandler = new SetItemPropertyTarget(this);
         }
         else if (obj2 is Enum)
         {
             Array values = Enum.GetValues(obj2.GetType());
             for (int i = 0; i < values.Length; i++)
             {
                 if (values.GetValue(i).Equals(obj2))
                 {
                     this.SetValue(values.GetValue((int)((i + 1) % values.Length)));
                     break;
                 }
             }
         }
         else if (this.m_Entry.Hue != null)
         {
             if (this.m_Picker == null)
             {
                 GPropertyHuePicker toAdd = this.m_Picker = new GPropertyHuePicker(this);
                 toAdd.X = this.Width - 1;
                 toAdd.Y = 0;
                 base.m_Children.Add(toAdd);
             }
         }
         else if (this.m_Entry.Property.IsDefined(typeof(MacroEditorAttribute), true))
         {
             Gumps.Destroy(base.Parent.Parent.Parent.Parent);
             GMacroEditorForm.Open();
         }
     }
 }
예제 #2
0
파일: Exposer.cs 프로젝트: uotools/PlayUO
        public void Open(string What)
        {
            switch (What)
            {
            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 "NetStats":
                GNetwork.Open();
                break;

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

            case "Macros":
                GMacroEditorForm.Open();
                break;

            case "InfoBrowser":
                GInfoForm.Open();
                break;
            }
        }