// Token: 0x06001627 RID: 5671 RVA: 0x00035968 File Offset: 0x00033B68 public void method_1() { if (this.class115_0.class141_0.ProcessOpen) { int processId = Class265.GetProcessId(this.class115_0.class141_0.Process.Handle); if (processId != 0 && this.int_0 == processId) { using (Process processById = Process.GetProcessById(processId)) { Class410.smethod_8(this.toonTownParentForm_0, processById.MainWindowHandle); } } } }
// Token: 0x06001791 RID: 6033 RVA: 0x00007468 File Offset: 0x00005668 protected void method_7() { Class410.smethod_8(this, this.intptr_0); }
// Token: 0x0600172D RID: 5933 RVA: 0x0003824C File Offset: 0x0003644C protected bool method_10(string message, string question, Struct46 ratio, out Class125 bmp, out Struct46 resulting_ratio) { bmp = null; resulting_ratio = default(Struct46); if (!this.class141_0.ProcessOpen && !this.class141_0.smethod_1(this)) { return(false); } using (Class499 @class = new Class499(this, true)) { using (DialogBox dialogBox = new DialogBox(question, "Are you ready?", Enum90.const_0, null, false, Enum121.const_1, new Enum39[] { Enum39.const_0, Enum39.const_1 })) { @class.method_1(dialogBox, DialogResult.OK); DialogResult dialogResult = dialogBox.ShowDialog(); if (dialogResult != DialogResult.OK) { return(false); } @class.method_4(); @class.method_6(); } if (this.class141_0.ProcessOpen) { Class410.smethod_8(this, this.class141_0.MainWindowHandle); using (CountDown countDown = new CountDown()) { @class.method_1(countDown, DialogResult.OK); if (countDown.ShowDialog() == DialogResult.OK) { @class.method_6(); @class.method_4(); if (this.class141_0.ProcessOpen) { Class410.smethod_8(this, this.class141_0.MainWindowHandle); EventHandler eventHandler = null; CaptureSetupForm.Class159 class2 = new CaptureSetupForm.Class159(); class2.regionSelector_0 = new RegionSelector(this.class141_0.MainWindowHandle); try { @class.method_0(class2.regionSelector_0); Rectangle rectangle = Class410.smethod_16(this.class141_0.MainWindowHandle); class2.regionSelector_0.SelectionBounds = Rectangle.Empty; class2.regionSelector_0.SelectedRegion = ratio.method_0(rectangle.Size); class2.regionSelector_0.RegionSelectorType = Enum124.const_0; class2.regionSelector_0.FullSelect = false; class2.regionSelector_0.FullSize = true; class2.regionSelector_0.FullScreenCapture = true; class2.regionSelector_0.MovableResizeMessage = message + " Press any key to accept or escape to cancel."; Form regionSelector_ = class2.regionSelector_0; if (eventHandler == null) { eventHandler = new EventHandler(class2.method_0); } regionSelector_.Shown += eventHandler; if (class2.regionSelector_0.ShowDialog() == DialogResult.OK && class2.regionSelector_0.SelectedRegion.smethod_2()) { bmp = class2.regionSelector_0.SelectedBitmap; resulting_ratio = Struct46.smethod_3(class2.regionSelector_0.SelectedRegion, new Rectangle(Point.Empty, rectangle.Size)); return(true); } } finally { if (class2.regionSelector_0 != null) { ((IDisposable)class2.regionSelector_0).Dispose(); } } } } } } } return(false); }
// 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(); } } } }