// Token: 0x0600284D RID: 10317 RVA: 0x00095DA4 File Offset: 0x00093FA4 private void KeyToPressBox_TextChanged(object sender, EventArgs e) { if (this.KeyToPressBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; if (this.KeyToPressBox.Modifiers == Keys.None) { @class.KeyToPress = this.KeyToPressBox.Key; } else if (this.KeyToPressBox.Modifiers.HasFlag(Keys.Control)) { @class.KeyToPress = Keys.Control; } else if (this.KeyToPressBox.Modifiers.HasFlag(Keys.Alt)) { @class.KeyToPress = Keys.Alt; } else if (this.KeyToPressBox.Modifiers.HasFlag(Keys.Shift)) { @class.KeyToPress = Keys.Shift; } else { @class.KeyToPress = this.KeyToPressBox.Key; } } this.method_4(); }
// Token: 0x0600284B RID: 10315 RVA: 0x00095D0C File Offset: 0x00093F0C private void KeyReleaseDelayBox_TextChanged(object sender, EventArgs e) { if (this.KeyReleaseDelayBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.KeyReleaseDelay = this.KeyReleaseDelayBox.Value; } }
// Token: 0x06002850 RID: 10320 RVA: 0x00095F2C File Offset: 0x0009412C private void StopOtherHotkeysCheckBox_CheckedChanged(object sender, EventArgs e) { if (this.StopOtherHotkeysCheckBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.StopOtherHotkeys = this.StopOtherHotkeysCheckBox.Checked; } }
// Token: 0x06002851 RID: 10321 RVA: 0x00095F78 File Offset: 0x00094178 private void HotkeyDescription_TextChanged(object sender, EventArgs e) { if (this.HotkeyDescription.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.Description = this.HotkeyDescription.Text; } }
// Token: 0x060001CB RID: 459 RVA: 0x00003B53 File Offset: 0x00001D53 public override Class80 vmethod_4() { Class87 @class = new Class87(); @class.method_3(this.ushort_0); @class.method_1(base.method_0()); return(@class); }
// Token: 0x0600284C RID: 10316 RVA: 0x00095D58 File Offset: 0x00093F58 private void MoveMouseRateBox_TextChanged(object sender, EventArgs e) { if (this.MoveMouseRateBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.MoveMouseRate = this.MoveMouseRateBox.Value; } }
// Token: 0x06002849 RID: 10313 RVA: 0x00095C40 File Offset: 0x00093E40 private void MoveMouseCheckBox_CheckedChanged(object sender, EventArgs e) { this.MoveMouseRateBox.Enabled = (this.MoveMouseRateLabel.Enabled = (this.MoveMouseCheckBox.Checked && this.MoveMouseCheckBox.Enabled)); if (this.MoveMouseCheckBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.MoveMouse = this.MoveMouseCheckBox.Checked; } }
// Token: 0x06002848 RID: 10312 RVA: 0x00095BC0 File Offset: 0x00093DC0 private void RepeatKeyPressCheckBox_CheckedChanged(object sender, EventArgs e) { this.KeyPressRepeatRateBox.Enabled = (this.RepeatKeyPressRateLabel.Enabled = (this.RepeatKeyPressCheckBox.Checked && this.RepeatKeyPressCheckBox.Enabled)); if (this.RepeatKeyPressCheckBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.RepeatKeyPress = this.RepeatKeyPressCheckBox.Checked; } }
// Token: 0x06002846 RID: 10310 RVA: 0x00095AE8 File Offset: 0x00093CE8 private void ReleaseKeyCheckBox_CheckedChanged(object sender, EventArgs e) { this.KeyReleaseDelayBox.Enabled = (this.ReleaseKeyDelayLabel.Enabled = (this.ReleaseKeyCheckBox.Checked && this.ReleaseKeyCheckBox.Enabled)); if (this.ReleaseKeyCheckBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.ReleaseKey = this.ReleaseKeyCheckBox.Checked; } }
// Token: 0x06002843 RID: 10307 RVA: 0x000959E0 File Offset: 0x00093BE0 private void PerformEventRadioButton_CheckedChanged(object sender, EventArgs e) { if (this.HotkeyListBox.SelectedItem != null && this.PerformEventRadioButton.Checked) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.HotkeyType = Enum40.const_0; this.method_2(true); } }
// Token: 0x06002842 RID: 10306 RVA: 0x00095988 File Offset: 0x00093B88 private void TabToonTownWindowsRadioButton_CheckedChanged(object sender, EventArgs e) { if (this.HotkeyListBox.SelectedItem != null && this.TabToonTownWindowsRadioButton.Checked) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; @class.HotkeyType = Enum40.const_1; this.method_2(false); } }
// Token: 0x06002841 RID: 10305 RVA: 0x000956F8 File Offset: 0x000938F8 private void HotkeyListBox_SelectedIndexChanged(object sender, EventArgs e) { bool flag = this.HotkeyListBox.SelectedItem != null; this.TabToonTownWindowsRadioButton.Enabled = flag; this.PerformEventRadioButton.Enabled = flag; this.HotkeyDescription.Enabled = flag; this.RemoveHotkey.Enabled = (flag && !this.bool_0); if (flag) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; this.PerformEventRadioButton.Checked = (@class.HotkeyType == Enum40.const_0); this.TabToonTownWindowsRadioButton.Checked = (@class.HotkeyType == Enum40.const_1); if (@class.KeyToPress.HasFlag(Keys.Control)) { this.KeyToPressBox.Hotkey = new Struct21(Keys.None, Keys.Control); } else if (@class.KeyToPress.HasFlag(Keys.Alt)) { this.KeyToPressBox.Hotkey = new Struct21(Keys.None, Keys.Alt); } else if (@class.KeyToPress.HasFlag(Keys.Shift)) { this.KeyToPressBox.Hotkey = new Struct21(Keys.None, Keys.Shift); } else { this.KeyToPressBox.Hotkey = new Struct21(@class.KeyToPress, Keys.None); } this.MoveMouseRateBox.Value = @class.MoveMouseRate; this.KeyPressRepeatRateBox.Value = @class.KeyPressRepeatRate; this.KeyReleaseDelayBox.Value = @class.KeyReleaseDelay; this.MoveMouseCheckBox.Checked = @class.MoveMouse; this.ReleaseKeyCheckBox.Checked = @class.ReleaseKey; this.RepeatKeyPressCheckBox.Checked = @class.RepeatKeyPress; this.StopOtherHotkeysCheckBox.Checked = @class.StopOtherHotkeys; this.HotkeyDescription.Text = @class.Description; this.method_2(@class.HotkeyType == Enum40.const_0); return; } this.method_2(false); this.PerformEventRadioButton.Checked = false; this.TabToonTownWindowsRadioButton.Checked = false; this.KeyToPressBox.Hotkey = default(Struct21); this.MoveMouseRateBox.Value = 0; this.KeyPressRepeatRateBox.Value = 0; this.KeyReleaseDelayBox.Value = 0; this.MoveMouseCheckBox.Checked = false; this.ReleaseKeyCheckBox.Checked = false; this.RepeatKeyPressCheckBox.Checked = false; this.StopOtherHotkeysCheckBox.Checked = false; this.HotkeyDescription.Text = string.Empty; }
// Token: 0x0600284F RID: 10319 RVA: 0x00095EA8 File Offset: 0x000940A8 private void method_4() { if (this.KeyToPressBox.Enabled) { Class87 @class = this.class112_0.Hotkeys[(Struct21)this.HotkeyListBox.SelectedItem]; this.ReleaseKeyCheckBox.Enabled = (this.RepeatKeyPressCheckBox.Enabled = (@class.KeyToPress != Keys.None && @class.HotkeyType == Enum40.const_0)); return; } Control releaseKeyCheckBox = this.ReleaseKeyCheckBox; this.RepeatKeyPressCheckBox.Enabled = false; releaseKeyCheckBox.Enabled = false; }
// Token: 0x06002B7F RID: 11135 RVA: 0x000A94B4 File Offset: 0x000A76B4 private void method_11() { Class87 @class = new Class87(); @class.Hotkey = new Struct21(Keys.F2, Keys.None); @class.KeyToPress = Keys.None; @class.HotkeyType = Enum40.const_1; @class.RepeatKeyPress = false; @class.StopOtherHotkeys = false; @class.MoveMouse = false; @class.MoveMouseRate = 0; @class.ReleaseKey = false; @class.KeyReleaseDelay = 0; @class.Description = "This hotkey tabs to the next ToonTown window."; this.Hotkeys.Add(@class.Hotkey, @class); }
// Token: 0x06001A32 RID: 6706 RVA: 0x0004CDE8 File Offset: 0x0004AFE8 public Class127(IntPtr toonTownHandle, Process toontownProcess, Class87 hotkeySettings) { this.intptr_0 = toonTownHandle; this.process_0 = toontownProcess; this.class87_0 = hotkeySettings; if (this.class87_0.RepeatKeyPress || this.class87_0.ReleaseKey) { this.timer_0 = new System.Timers.Timer(); this.timer_0.Elapsed += new ElapsedEventHandler(this.timer_0_Elapsed); } if (this.class87_0.MoveMouse) { this.timer_1 = new System.Timers.Timer(); this.timer_1.Elapsed += new ElapsedEventHandler(this.timer_1_Elapsed); this.timer_1.Interval = (double)this.class87_0.MoveMouseRate; } }
// Token: 0x06002B7D RID: 11133 RVA: 0x000A93A4 File Offset: 0x000A75A4 private void method_9() { Class87 @class = new Class87(); @class.Hotkey = new Struct21(Keys.NumPad1, Keys.None); @class.KeyToPress = Keys.Control; @class.HotkeyType = Enum40.const_0; @class.KeyPressRepeatRate = 32; @class.RepeatKeyPress = true; @class.StopOtherHotkeys = true; @class.MoveMouse = false; @class.MoveMouseRate = 0; @class.ReleaseKey = false; @class.KeyReleaseDelay = 0; @class.Description = "This hotkey enables automatic jumping."; this.Hotkeys.Add(@class.Hotkey, @class); }
// Token: 0x06002B7E RID: 11134 RVA: 0x000A9428 File Offset: 0x000A7628 private void method_10() { Class87 @class = new Class87(); @class.Hotkey = new Struct21(Keys.F4, Keys.None); @class.KeyToPress = Keys.End; @class.HotkeyType = Enum40.const_0; @class.KeyPressRepeatRate = 10000; @class.RepeatKeyPress = true; @class.StopOtherHotkeys = true; @class.MoveMouse = true; @class.MoveMouseRate = 30000; @class.ReleaseKey = true; @class.KeyReleaseDelay = 5000; @class.Description = "This hotkey keeps your toon awake."; this.Hotkeys.Add(@class.Hotkey, @class); }
// Token: 0x06002B80 RID: 11136 RVA: 0x000A952C File Offset: 0x000A772C protected override void vmethod_2(BinaryReader reader, int version) { this.Hotkeys = new Dictionary <Struct21, Class87>(); reader.ReadString(); new Struct55(reader.ReadUInt64()); reader.ReadString(); reader.smethod_30(); this.UpdateType = (Enum78)reader.ReadInt32(); this.UseVisualMode = reader.ReadBoolean(); this.HotkeysEnabled = reader.ReadBoolean(); this.ScreenshotSaveDirectory = reader.ReadString(); this.AcceptedContentPackAgreement = reader.ReadBoolean(); this.FirstTimeOpeningContentPacks = reader.ReadBoolean(); int num = reader.ReadInt32(); for (int i = 0; i < num; i++) { Class87 @class = new Class87(reader); this.Hotkeys.Add(@class.Hotkey, @class); } if (version == 1) { Class87 class2 = this.method_7(); if (this.Hotkeys.ContainsKey(class2.Hotkey)) { Class87 second = this.Hotkeys[class2.Hotkey]; if (Class112.smethod_0(class2, second)) { this.Hotkeys.Remove(class2.Hotkey); return; } } } else { if (version > 2) { this.DisplayNotifyBalloon = reader.ReadBoolean(); return; } this.DisplayNotifyBalloon = true; } }
// 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); } }
// Token: 0x06002B81 RID: 11137 RVA: 0x000A9644 File Offset: 0x000A7844 private static bool smethod_0(Class87 first, Class87 second) { return(first.Description == second.Description && first.HotkeyType == second.HotkeyType && first.InputEventFlags == second.InputEventFlags && first.KeyPressRepeatRate == second.KeyPressRepeatRate && first.KeyReleaseDelay == second.KeyReleaseDelay && first.KeyToPress == second.KeyToPress && first.MoveMouse == second.MoveMouse && first.MoveMouseRate == second.MoveMouseRate && first.ReleaseKey == second.ReleaseKey && first.RepeatKeyPress == second.RepeatKeyPress && first.StopOtherHotkeys == second.StopOtherHotkeys); }
// Token: 0x06000148 RID: 328 RVA: 0x0000F174 File Offset: 0x0000D374 public static Class80 smethod_1(object object_0, Type type_0) { Class80 @class = object_0 as Class80; if (@class != null) { return(@class); } if (type_0 == null) { if (object_0 == null) { return(new Class90()); } type_0 = object_0.GetType(); } type_0 = Class37.smethod_1(type_0); if (type_0 == Class175.type_0) { @class = new Class90(); if (object_0 != null && object_0.GetType() != Class175.type_0) { @class.method_1(object_0.GetType()); } } else if (Class29.smethod_0 <Array>(type_0)) { @class = new Class93(); } else if (Class29.smethod_0 <string>(type_0)) { @class = new Class96(); } else if (Class29.smethod_0 <IntPtr>(type_0)) { @class = new Class99(); } else if (Class29.smethod_0 <UIntPtr>(type_0)) { @class = new Class83(); } else if (Class29.smethod_0 <ulong>(type_0)) { @class = new Class89(); } else if (Class29.smethod_0 <uint>(type_0)) { @class = new Class92(); } else if (Class29.smethod_0 <ushort>(type_0)) { @class = new Class87(); } else if (Class29.smethod_0 <long>(type_0)) { @class = new Class82(); } else if (Class29.smethod_0 <int>(type_0)) { @class = new Class98(); } else if (Class29.smethod_0 <short>(type_0)) { @class = new Class94(); } else if (Class29.smethod_0 <byte>(type_0)) { @class = new Class88(); } else if (Class29.smethod_0 <sbyte>(type_0)) { @class = new Class85(); } else if (Class29.smethod_0 <double>(type_0)) { @class = new Class86(); } else if (Class29.smethod_0 <float>(type_0)) { @class = new Class91(); } else if (Class29.smethod_0 <bool>(type_0)) { @class = new Class97(); } else if (Class29.smethod_0 <char>(type_0)) { @class = new Class81(); } else if (Class175.smethod_0(type_0)) { Class90 class2 = new Class90(); class2.method_1(type_0); @class = class2; } else { if (Class29.smethod_0 <Enum>(type_0)) { Enum enum_; if (object_0 == null) { if (type_0 == Class175.type_2) { enum_ = null; } else { enum_ = (Enum)Activator.CreateInstance(type_0); } } else if (type_0 == Class175.type_2 && object_0 is Enum) { enum_ = (Enum)object_0; } else { enum_ = (Enum)Enum.ToObject(type_0, object_0); } return(new Class84(enum_)); } if (Class29.smethod_0 <ValueType>(type_0)) { if (object_0 == null) { object object_; if (type_0 == Class175.type_3) { object_ = null; } else { object_ = Activator.CreateInstance(type_0); } @class = new Class107(object_); } else { if (object_0.GetType() != type_0) { try { object_0 = Convert.ChangeType(object_0, type_0); } catch { } } @class = new Class107(object_0); } return(@class); } @class = new Class90(); } if (object_0 != null) { @class.vmethod_1(object_0); } return(@class); }
// Token: 0x06002B7C RID: 11132 RVA: 0x000A937C File Offset: 0x000A757C private void method_8() { Class87 @class = this.method_7(); this.Hotkeys.Add(@class.Hotkey, @class); }
internal void method_7(Class87 A_0) { this.class87_0 = A_0; }
internal void method_0(ShapeBase A_0) { this.class87_0 = new Class87(); this.method_2(A_0); this.method_1(A_0.IsInline); }
// 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(); } } } }