public static void Open() { if (m_Instance == null) { m_Instance = new GMacroEditorForm(); Gumps.Desktop.Children.Add(m_Instance); Gumps.Focus = m_Instance; } }
public void NotifyParent() { GMacroEditorForm parent = base.m_Parent.Parent as GMacroEditorForm; if (parent != null) { parent.UpdateKeyboard(); } }
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(); } }
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; } }
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]; } } }
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; }
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; } }
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(); } } }
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; } }
protected internal override void OnDispose() { m_Instance = null; Macros.Save(); base.OnDispose(); }