// Token: 0x0600283F RID: 10303 RVA: 0x00095608 File Offset: 0x00093808 private bool method_3(Struct21 hotkey) { if (hotkey.Key != Keys.Escape) { if (hotkey.Key == Keys.Oemplus) { if (hotkey.Modifier == Keys.Control) { goto IL_7B; } if (hotkey.Modifier == (Keys.Shift | Keys.Control)) { goto IL_7B; } } if (!Class265.RegisterHotKey(base.Handle, 49151, hotkey.NativeModifier, hotkey.Key)) { DialogBox.smethod_4("It appears the specified hotkey is already in use by another application or Windows. Please select an alternative hotkey combination.", "Hotkey in Use"); return(false); } Class265.UnregisterHotKey(base.Handle, 49151); return(true); } IL_7B: DialogBox.smethod_3("This hotkey combination cannot be used due to The ToonTown Spoofer using it for other purposes.", "Hotkey In Use"); return(false); }
// Token: 0x0600283C RID: 10300 RVA: 0x00095410 File Offset: 0x00093610 private void HotkeyListBox_DoubleClick(object sender, EventArgs e) { if (this.HotkeyListBox.SelectedItem != null) { Struct21 hotkey = (Struct21)this.HotkeyListBox.SelectedItem; this.bool_0 = true; this.HotkeyBox.Hotkey = hotkey; this.HotkeyListBox.Enabled = false; this.CancelHotkeyButton.Enabled = true; this.RemoveHotkey.Enabled = false; this.ResetHotkeys.Enabled = false; } }
// Token: 0x0600201C RID: 8220 RVA: 0x0006AA7C File Offset: 0x00068C7C public static bool smethod_0(Struct21 hotkey) { lock (Class318.object_0) { foreach (Class318.Class184 @class in Class318.dictionary_1.Values) { if (Struct21.smethod_0(@class.Hotkey, hotkey)) { return(true); } } } return(false); }
// Token: 0x06002023 RID: 8227 RVA: 0x0006AC18 File Offset: 0x00068E18 public bool method_4(Struct21 hotkey, out Class183 state) { lock (Class318.object_0) { foreach (Class318.Class184 @class in this.dictionary_0.Values) { if (Struct21.smethod_0(@class.Hotkey, hotkey)) { state = @class; return(true); } } } state = null; return(false); }
// Token: 0x06002028 RID: 8232 RVA: 0x0006ACB0 File Offset: 0x00068EB0 public Class183 method_9(Struct21 hotkey, bool allow_repeat, object state, EventHandler <EventArgs18> callback) { lock (Class318.object_0) { int num = Class318.int_0++; if (Class318.int_0 > 49151) { Class318.int_0 = 0; } Class318.Class184 @class = new Class318.Class184(this, num, hotkey, allow_repeat, state, callback); if (this.method_13(@class)) { this.dictionary_0.Add(num, @class); Class318.dictionary_1.Add(num, @class); return(@class); } } return(null); }
// Token: 0x0600283E RID: 10302 RVA: 0x00095480 File Offset: 0x00093680 private void AcceptHotkeyButton_Click(object sender, EventArgs e) { Struct21 hotkey = this.HotkeyBox.Hotkey; if (this.method_3(hotkey)) { if (this.bool_0) { Struct21 key = (Struct21)this.HotkeyListBox.SelectedItem; Class87 @class = this.class112_0.Hotkeys[key]; this.class112_0.Hotkeys.Remove(key); @class.Hotkey = hotkey; this.class112_0.Hotkeys.Add(hotkey, @class); this.HotkeyListBox.Enabled = true; this.HotkeyListBox.Items[this.HotkeyListBox.SelectedIndex] = hotkey; this.HotkeyListBox.imethod_0(this.HotkeyListBox.SelectedIndex); this.HotkeyBox.Hotkey = default(Struct21); this.CancelHotkeyButton.Enabled = false; this.RemoveHotkey.Enabled = true; this.ResetHotkeys.Enabled = true; this.bool_0 = false; return; } if (this.HotkeyListBox.Items.Contains(hotkey)) { DialogBox.smethod_3("The specified hotkey already exists. Please select an alternative hotkey combination.", "Hotkey Already Exists"); return; } Class87 class2 = new Class87(); class2.Hotkey = hotkey; this.class112_0.Hotkeys.Add(hotkey, class2); this.HotkeyListBox.Items.Add(hotkey); this.HotkeyListBox.SelectedItem = hotkey; this.HotkeyBox.Hotkey = default(Struct21); } }
internal static extern int GetOutlineTextMetrics(IntPtr A_0, int A_1, ref Struct21 A_2);
// Token: 0x06002035 RID: 8245 RVA: 0x0000D0D8 File Offset: 0x0000B2D8 public Class184(Class318 owner, int id, Struct21 hotkey, bool allow_repeat, object state, EventHandler <EventArgs18> callback) : base(owner, hotkey, allow_repeat, state) { this.ID = id; this.Callback = callback; this.LastTime = DateTime.MinValue; }
// Token: 0x0600202B RID: 8235 RVA: 0x0000D08F File Offset: 0x0000B28F public bool method_12(Struct21 hotkey) { return(this.method_11(hotkey.Key, hotkey.Modifier)); }
// Token: 0x06001A3C RID: 6716 RVA: 0x0004D28C File Offset: 0x0004B48C public void method_0(object _) { IntPtr foregroundWindow = Class265.GetForegroundWindow(); if (foregroundWindow == IntPtr.Zero) { return; } Dictionary <IntPtr, Class205.Class127> dictionary = null; Struct21 hotkey = this.eventArgs18_0.State.Hotkey; lock (this.class205_0.dictionary_0) { if (this.class205_0.dictionary_0.ContainsKey(hotkey)) { dictionary = this.class205_0.dictionary_0[hotkey]; if (dictionary.ContainsKey(foregroundWindow)) { this.class205_0.method_2(dictionary[foregroundWindow], true); return; } } Process process = null; bool flag2 = false; try { process = Class265.smethod_7(foregroundWindow); if (flag2 = (process.smethod_2().ToLower() == "toontown")) { Class87 @class = this.class205_0.class112_0.Hotkeys[hotkey]; Class205.Class206.Class207 class2 = new Class205.Class206.Class207(); class2.class206_0 = this; switch (@class.HotkeyType) { case Enum40.const_0: if (@class.StopOtherHotkeys) { List <Class205.Class127> list = new List <Class205.Class127>(); foreach (KeyValuePair <Struct21, Dictionary <IntPtr, Class205.Class127> > keyValuePair in this.class205_0.dictionary_0) { if (Struct21.smethod_1(keyValuePair.Key, hotkey) && keyValuePair.Value.ContainsKey(foregroundWindow)) { list.Add(keyValuePair.Value[foregroundWindow]); } } foreach (Class205.Class127 hotkey2 in list) { this.class205_0.method_2(hotkey2, true); } } if (dictionary == null) { this.class205_0.dictionary_0.Add(hotkey, dictionary = new Dictionary <IntPtr, Class205.Class127>()); } class2.class127_0 = new Class205.Class127(foregroundWindow, process, @class); dictionary.Add(foregroundWindow, class2.class127_0); process.EnableRaisingEvents = true; process.Exited += class2.method_0; class2.class127_0.Terminated += class2.method_1; if (process.HasExited) { this.class205_0.method_2(class2.class127_0, false); } else { class2.class127_0.method_5(); } break; case Enum40.const_1: { Process[] array = null; try { array = Class156.smethod_3("toontown"); if (array.Length > 1) { int i = 0; while (i < array.Length) { if (!(array[i].smethod_0() == foregroundWindow)) { i++; } else { IntPtr intPtr; if (i == array.Length - 1) { intPtr = array[0].smethod_0(); } else { intPtr = array[i + 1].smethod_0(); } if (intPtr != IntPtr.Zero) { Class410.smethod_8(this.class205_0, intPtr); break; } break; } } } } finally { if (array != null) { foreach (Process process2 in array) { process2.Dispose(); } } } break; } } } } finally { if (!flag2 && process != null) { process.Dispose(); } } } }