Exemplo n.º 1
0
 public unsafe void RemoveFrame()
 {
   if (this.mForm == null)
     return;
   this.mForm.TextChanged -= new EventHandler(this.TextChanged);
   this.mForm.FormClosed -= new FormClosedEventHandler(this.FormClosed);
   this.mForm.SizeChanged -= new EventHandler(this.SizeChanged);
   HWND__* hwndPtr1 = (HWND__*) this.mForm.Handle.ToPointer();
   if (\u003CModule\u003E.IsWindow(hwndPtr1) == 0)
     return;
   HWND__* parent = \u003CModule\u003E.GetParent(hwndPtr1);
   Interface* coreInterface = \u003CModule\u003E.GetCOREInterface();
   HWND__* hwndPtr2 = hwndPtr1;
   Interface* interfacePtr = coreInterface;
   // ISSUE: cast to a function pointer type
   // ISSUE: function pointer call
   HWND__* hwndPtr3 = __calli((__FnPtr<HWND__* (IntPtr)>) *(long*) (*(long*) interfacePtr + 272L))((IntPtr) interfacePtr);
   \u003CModule\u003E.SetParent(hwndPtr2, hwndPtr3);
   WinFormsCUIHandler* winFormsCuiHandlerPtr1 = this.mHandler;
   if ((IntPtr) winFormsCuiHandlerPtr1 != IntPtr.Zero)
     \u003CModule\u003E.ManagedServices\u002EInternal\u002EWinFormsCUIHandler\u002ERestoreStyles(winFormsCuiHandlerPtr1);
   WinFormsCUIHandler* winFormsCuiHandlerPtr2 = this.mHandler;
   if ((IntPtr) winFormsCuiHandlerPtr2 != IntPtr.Zero && (int) *(byte*) ((IntPtr) winFormsCuiHandlerPtr2 + 120L) != 0)
     return;
   this.mHandler = (WinFormsCUIHandler*) 0L;
   this.mForm = (Form) null;
   if (\u003CModule\u003E.IsWindow(parent) == 0)
     return;
   \u003CModule\u003E.DestroyWindow(parent);
 }
Exemplo n.º 2
0
        public unsafe WinFormsCUIFrame(Form form)
        {
            if (form == null)
            {
                return;
            }
            WinFormsCUIHandler *winFormsCuiHandlerPtr1 = (WinFormsCUIHandler *)\u003CModule\u003E.MaxHeapOperators\u002Enew(128UL);
            WinFormsCUIHandler *winFormsCuiHandlerPtr2;

            // ISSUE: fault handler
            try
            {
                winFormsCuiHandlerPtr2 = (IntPtr)winFormsCuiHandlerPtr1 == IntPtr.Zero ? (WinFormsCUIHandler *)0L : \u003CModule\u003E.ManagedServices\u002EInternal\u002EWinFormsCUIHandler\u002E\u007Bctor\u007D(winFormsCuiHandlerPtr1, form, 92U);
            }
            __fault
            {
                // ISSUE: method pointer
                // ISSUE: cast to a function pointer type
                \u003CModule\u003E.___CxxCallUnwindDelDtor((__FnPtr <void (void *)>)__methodptr(MaxHeapOperators\u002Edelete), (void *)winFormsCuiHandlerPtr1);
            }
            this.mHandler           = winFormsCuiHandlerPtr2;
            this.mForm.TextChanged += new EventHandler(this.TextChanged);
            this.mForm.FormClosed  += new FormClosedEventHandler(this.FormClosed);
            this.mForm.SizeChanged += new EventHandler(this.SizeChanged);
        }
Exemplo n.º 3
0
        public unsafe void RemoveFrame()
        {
            if (this.mForm == null)
            {
                return;
            }
            this.mForm.TextChanged -= new EventHandler(this.TextChanged);
            this.mForm.FormClosed  -= new FormClosedEventHandler(this.FormClosed);
            this.mForm.SizeChanged -= new EventHandler(this.SizeChanged);
            HWND__ *hwndPtr1 = (HWND__ *)this.mForm.Handle.ToPointer();

            if (\u003CModule\u003E.IsWindow(hwndPtr1) == 0)
            {
                return;
            }
            HWND__ *   parent        = \u003CModule\u003E.GetParent(hwndPtr1);
            Interface *coreInterface = \u003CModule\u003E.GetCOREInterface();
            HWND__ *   hwndPtr2      = hwndPtr1;
            Interface *interfacePtr  = coreInterface;
            // ISSUE: cast to a function pointer type
            // ISSUE: function pointer call
            HWND__ *hwndPtr3 = __calli((__FnPtr <HWND__ *(IntPtr)>) * (long *)(*(long *)interfacePtr + 272L))((IntPtr)interfacePtr);

            \u003CModule\u003E.SetParent(hwndPtr2, hwndPtr3);
            WinFormsCUIHandler *winFormsCuiHandlerPtr1 = this.mHandler;

            if ((IntPtr)winFormsCuiHandlerPtr1 != IntPtr.Zero)
            {
                \u003CModule\u003E.ManagedServices\u002EInternal\u002EWinFormsCUIHandler\u002ERestoreStyles(winFormsCuiHandlerPtr1);
            }
            WinFormsCUIHandler *winFormsCuiHandlerPtr2 = this.mHandler;

            if ((IntPtr)winFormsCuiHandlerPtr2 != IntPtr.Zero && (int)*(byte *)((IntPtr)winFormsCuiHandlerPtr2 + 120L) != 0)
            {
                return;
            }
            this.mHandler = (WinFormsCUIHandler *)0L;
            this.mForm    = (Form)null;
            if (\u003CModule\u003E.IsWindow(parent) == 0)
            {
                return;
            }
            \u003CModule\u003E.DestroyWindow(parent);
        }
Exemplo n.º 4
0
        public unsafe int GetDockState()
        {
            WinFormsCUIHandler *winFormsCuiHandlerPtr = this.mHandler;

            if ((IntPtr)winFormsCuiHandlerPtr == IntPtr.Zero)
            {
                return(16);
            }
            ICUIFrame *icuiFramePtr1 = (ICUIFrame *)*(long *)((IntPtr)winFormsCuiHandlerPtr + 96L);

            if ((IntPtr)icuiFramePtr1 == IntPtr.Zero)
            {
                return(16);
            }
            ICUIFrame *icuiFramePtr2 = icuiFramePtr1;

            // ISSUE: cast to a function pointer type
            // ISSUE: function pointer call
            return((int)__calli((__FnPtr <uint (IntPtr)>) * (long *)(*(long *)icuiFramePtr2 + 144L))((IntPtr)icuiFramePtr2));
        }
Exemplo n.º 5
0
 public unsafe WinFormsCUIFrame(Form form)
 {
   if (form == null)
     return;
   WinFormsCUIHandler* winFormsCuiHandlerPtr1 = (WinFormsCUIHandler*) \u003CModule\u003E.MaxHeapOperators\u002Enew(128UL);
   WinFormsCUIHandler* winFormsCuiHandlerPtr2;
   // ISSUE: fault handler
   try
   {
     winFormsCuiHandlerPtr2 = (IntPtr) winFormsCuiHandlerPtr1 == IntPtr.Zero ? (WinFormsCUIHandler*) 0L : \u003CModule\u003E.ManagedServices\u002EInternal\u002EWinFormsCUIHandler\u002E\u007Bctor\u007D(winFormsCuiHandlerPtr1, form, 92U);
   }
   __fault
   {
     // ISSUE: method pointer
     // ISSUE: cast to a function pointer type
     \u003CModule\u003E.___CxxCallUnwindDelDtor((__FnPtr<void (void*)>) __methodptr(MaxHeapOperators\u002Edelete), (void*) winFormsCuiHandlerPtr1);
   }
   this.mHandler = winFormsCuiHandlerPtr2;
   this.mForm.TextChanged += new EventHandler(this.TextChanged);
   this.mForm.FormClosed += new FormClosedEventHandler(this.FormClosed);
   this.mForm.SizeChanged += new EventHandler(this.SizeChanged);
 }