// Token: 0x06001636 RID: 5686 RVA: 0x00035CA0 File Offset: 0x00033EA0 public void method_16(object sender, FormClosingEventArgs e) { this.toonTownParentForm_0.timer_0.Enabled = false; if (this.func_1()) { this.action_4(); Class265.SetParent(this.class116_0.intptr_0, this.intptr_0); Enum79 @enum = (Enum79)Class265.smethod_2(this.class116_0.intptr_0, Enum55.const_3); @enum &= ~Enum79.flag_2; @enum |= (Enum79)2147483648U; @enum |= Enum79.flag_19; @enum |= Enum79.flag_14; @enum |= Enum79.flag_9; Class265.smethod_4(this.class116_0.intptr_0, Enum55.const_3, (int)@enum); Rectangle rectangle; FormWindowState formWindowState = Class410.smethod_22(new HandleRef(this.toonTownParentForm_0, this.toonTownParentForm_0.Handle), out rectangle); if (formWindowState.HasFlag(FormWindowState.Minimized)) { Class410.smethod_23(new HandleRef(this.toonTownParentForm_0, this.class116_0.intptr_0), formWindowState, new Rectangle?(rectangle)); } else { this.action_6(); this.action_8(null, rectangle); this.action_7(); Class410.smethod_23(new HandleRef(this.toonTownParentForm_0, this.class116_0.intptr_0), formWindowState, null); } this.action_5(); } this.class115_0.class141_0.Dispose(); this.toonTownParentForm_0.Dispose(); this.class115_0.form_0.Close(); ToonTownParentForm.hashSet_0.Remove(this.int_0); }
// Token: 0x060026F3 RID: 9971 RVA: 0x0008C0D4 File Offset: 0x0008A2D4 public static void smethod_23(HandleRef hWnd, FormWindowState state, Rectangle?rect = null) { Rectangle left; FormWindowState formWindowState; if ((formWindowState = Class410.smethod_22(hWnd, out left)) != state || (rect != null && left != rect.Value)) { Struct28 @struct = default(Struct28); @struct.uint_0 = (uint)Marshal.SizeOf(typeof(Struct28)); Class265.GetWindowPlacement(hWnd, ref @struct); if (rect != null && left != rect.Value) { @struct.struct24_0 = new Struct24(rect.Value); } if (formWindowState != state) { if (state.HasFlag(FormWindowState.Maximized)) { if (state.HasFlag(FormWindowState.Minimized)) { @struct.enum62_0 |= Enum62.flag_1; @struct.enum117_0 = Enum117.const_8; } else { @struct.enum117_0 = Enum117.const_2; @struct.enum62_0 &= ~Enum62.flag_1; } } else if (state.HasFlag(FormWindowState.Minimized)) { @struct.enum117_0 = Enum117.const_8; @struct.enum62_0 &= ~Enum62.flag_1; } else { @struct.enum117_0 = Enum117.const_4; @struct.enum62_0 &= ~Enum62.flag_1; } } Class265.SetWindowPlacement(hWnd, ref @struct); } }
// Token: 0x06001615 RID: 5653 RVA: 0x00035214 File Offset: 0x00033414 public static ToonTownParentForm smethod_2(Form parent) { ToonTownParentForm.Class115 @class = new ToonTownParentForm.Class115(); @class.form_0 = parent; @class.class141_0 = new Class141(); if (ToonTownParentForm.smethod_1(@class.class141_0, @class.form_0)) { Func <bool> func = null; ToonTownParentForm.Class116 class2 = new ToonTownParentForm.Class116(); class2.class115_0 = @class; class2.intptr_0 = @class.class141_0.MainWindowHandle; Enum79 @enum = (Enum79)Class265.smethod_2(class2.intptr_0, Enum55.const_3); if (@enum.HasFlag(Enum79.flag_19) && @enum.HasFlag(Enum79.flag_14) && @enum.HasFlag(Enum79.flag_9)) { ToonTownParentForm.Class117 class3 = new ToonTownParentForm.Class117(); class3.class116_0 = class2; class3.class115_0 = @class; class3.int_0 = @class.class141_0.Process.Id; ToonTownParentForm.hashSet_0.Add(class3.int_0); Rectangle bounds; FormWindowState formWindowState = Class410.smethod_22(new HandleRef(@class.form_0, class2.intptr_0), out bounds); @enum &= ~(Enum79.flag_9 | Enum79.flag_10); @enum &= ~Enum79.flag_14; @enum |= Enum79.flag_2; @enum &= ~Enum79.flag_1; @enum &= ~Enum79.flag_9; Class265.smethod_4(class2.intptr_0, Enum55.const_3, (int)@enum); IntPtr handle = Class265.smethod_3(new HandleRef(@class.form_0, class2.intptr_0), Enum104.const_5); Icon icon = Icon.FromHandle(handle); class3.toonTownParentForm_0 = new ToonTownParentForm(); class3.toonTownParentForm_0.Icon = icon; ToonTownParentForm.Class117 class4 = class3; if (func == null) { func = new Func <bool>(class2.method_0); } class4.func_0 = func; class3.func_1 = new Func <bool>(class3.method_0); class3.action_0 = new Action(class3.method_1); class3.action_1 = new Action <Action>(class3.method_2); class3.action_2 = new Action(class3.method_3); class3.action_3 = new Action(class3.method_4); class3.action_4 = new Action(class3.method_5); class3.action_5 = new Action(class3.method_6); class3.action_6 = new Action(class3.method_7); class3.action_7 = new Action(class3.method_8); class3.action_8 = new Action <IntPtr?, Rectangle>(class3.method_9); class3.action_9 = new Action <IntPtr?, Rectangle>(class3.method_10); class3.toonTownParentForm_0.OnResizeStarted += class3.method_11; class3.toonTownParentForm_0.OnResizeEnded += class3.method_12; class3.toonTownParentForm_0.GotFocus += class3.method_13; class3.toonTownParentForm_0.WindowStateChanged += class3.method_14; @class.class141_0.ProcessExited += class3.method_15; if (formWindowState.HasFlag(FormWindowState.Maximized)) { if (formWindowState.HasFlag(FormWindowState.Minimized)) { Class410.smethod_23(new HandleRef(@class.form_0, class2.intptr_0), FormWindowState.Minimized, null); } else { Class410.smethod_23(new HandleRef(@class.form_0, class2.intptr_0), FormWindowState.Normal, null); } } class3.intptr_0 = Class265.SetParent(class2.intptr_0, class3.toonTownParentForm_0.Handle); class3.toonTownParentForm_0.StartPosition = FormStartPosition.Manual; class3.toonTownParentForm_0.Bounds = bounds; class3.action_9(new IntPtr?(class3.toonTownParentForm_0.Handle), class3.toonTownParentForm_0.ClientRectangle); Class410.smethod_23(new HandleRef(@class.form_0, class3.toonTownParentForm_0.Handle), formWindowState, null); class3.toonTownParentForm_0.FormClosing += class3.method_16; class3.toonTownParentForm_0.OnCloseClicked += class3.method_17; class3.toonTownParentForm_0.timer_0.Tick += class3.method_18; class3.toonTownParentForm_0.Shown += class3.method_19; class3.toonTownParentForm_0.Show(); return(class3.toonTownParentForm_0); } DialogBox.smethod_3("The ToonTown window appears to be full screen and cannot be used. Please change ToonTown to window mode and try again.", "Invalid ToonTown Window"); } else { @class.class141_0.Dispose(); } return(null); }