예제 #1
0
 public static void Open()
 {
     if (m_Instance == null)
     {
         m_Instance = new GMacroEditorForm();
         Gumps.Desktop.Children.Add(m_Instance);
         Gumps.Focus = m_Instance;
     }
 }
예제 #2
0
        public void NotifyParent()
        {
            GMacroEditorForm parent = base.m_Parent.Parent as GMacroEditorForm;

            if (parent != null)
            {
                parent.UpdateKeyboard();
            }
        }
예제 #3
0
        private void Delete_OnClick(Gump g)
        {
            Macros.List.Remove(this.m_Macro);
            GMacroEditorForm parent = base.m_Parent.Parent as GMacroEditorForm;

            if (parent != null)
            {
                parent.Current = null;
                parent.UpdateKeyboard();
            }
        }
예제 #4
0
        public override void OnClick()
        {
            ArrayList list = new ArrayList(this.m_Macro.Actions);

            list.Add(new Action(string.Format("{0} {1}", this.m_Action.Action, this.FindFirst(this.m_Action.Params))));
            this.m_Macro.Actions = (Action[])list.ToArray(typeof(Action));
            GMacroEditorForm parent = this.m_Panel.Parent.Parent as GMacroEditorForm;

            if (parent != null)
            {
                parent.Current = parent.Current;
            }
        }
예제 #5
0
        private void Clicked(Gump g)
        {
            GMacroEditorForm parent = base.m_Parent.Parent as GMacroEditorForm;

            if (parent != null)
            {
                if (this.m_Macro == null)
                {
                    Keys           none = Keys.None;
                    MacroModifiers all  = MacroModifiers.All;
                    if (parent.Keyboard != null)
                    {
                        all = parent.Keyboard.Mods;
                    }
                    if (all == MacroModifiers.All)
                    {
                        none = Control.ModifierKeys;
                    }
                    else
                    {
                        if ((all & MacroModifiers.Alt) != MacroModifiers.None)
                        {
                            none |= Keys.Alt;
                        }
                        if ((all & MacroModifiers.Shift) != MacroModifiers.None)
                        {
                            none |= Keys.Shift;
                        }
                        if ((all & MacroModifiers.Ctrl) != MacroModifiers.None)
                        {
                            none |= Keys.Control;
                        }
                    }
                    Client.Macro macro = new Client.Macro(this.m_Key, none, new Action[0]);
                    Macros.List.Add(macro);
                    parent.Current = macro;
                    parent.UpdateKeyboard();
                }
                else if (this.m_Macro is Client.Macro)
                {
                    parent.Current = (Client.Macro) this.m_Macro;
                }
                else if (this.m_Macro is Client.Macro[])
                {
                    Client.Macro[] array = (Client.Macro[]) this.m_Macro;
                    int            index = Array.IndexOf(array, parent.Current);
                    parent.Current = array[(index + 1) % array.Length];
                }
            }
        }
예제 #6
0
        private void Delete_OnClick(Gump g)
        {
            ArrayList list = new ArrayList(this.m_Macro.Actions);

            list.Remove(this.m_Action);
            this.m_Macro.Actions = (Action[])list.ToArray(typeof(Action));
            GMacroEditorForm parent = this.m_Panel.Parent.Parent as GMacroEditorForm;

            if (parent != null)
            {
                parent.Current = parent.Current;
            }
            Gumps.Destroy(this);
            Gumps.Focus = parent;
        }
예제 #7
0
        private void Down_OnClick(Gump g)
        {
            ArrayList list  = new ArrayList(this.m_Macro.Actions);
            int       index = list.IndexOf(this.m_Action);

            if (index < (list.Count - 1))
            {
                list.RemoveAt(index);
                list.Insert(index + 1, this.m_Action);
            }
            this.m_Macro.Actions = (Action[])list.ToArray(typeof(Action));
            GMacroEditorForm parent = this.m_Panel.Parent.Parent as GMacroEditorForm;

            if (parent != null)
            {
                parent.Current = parent.Current;
            }
        }
예제 #8
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();
         }
     }
 }
예제 #9
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;
            }
        }
예제 #10
0
 protected internal override void OnDispose()
 {
     m_Instance = null;
     Macros.Save();
     base.OnDispose();
 }
예제 #11
0
 protected internal override void OnDispose()
 {
     m_Instance = null;
     Macros.Save();
     base.OnDispose();
 }
예제 #12
0
 public static void Open()
 {
     if (m_Instance == null)
     {
         m_Instance = new GMacroEditorForm();
         Gumps.Desktop.Children.Add(m_Instance);
         Gumps.Focus = m_Instance;
     }
 }