예제 #1
0
 // 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);
 }
예제 #2
0
 // Token: 0x06001614 RID: 5652 RVA: 0x000063C1 File Offset: 0x000045C1
 public static bool smethod_1(Class141 process, Form owner)
 {
     return(ToonTownParentForm.smethod_0(process) || process.smethod_2(owner, null));
 }