Gwupe.Agent.GwupeClientAppContext.WndProc C# (CSharp) Method

WndProc() public method

public WndProc ( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr
hwnd System.IntPtr
msg int
wParam System.IntPtr
lParam System.IntPtr
handled bool
return System.IntPtr
        public IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            if (msg == OsUtils.WM_SHOWGWUPE &&
            #if DEBUG
                wParam.ToInt32() == 0
            #else
                wParam.ToInt32() == 1
            #endif
            )
            {
                Logger.Debug("Received show message to my handle " + hwnd);
                UIManager.Show();
                handled = true;
            }
            else if (msg == OsUtils.WM_SHUTDOWNGWUPE &&
            #if DEBUG
                wParam.ToInt32() == 0
            #else
                wParam.ToInt32() == 1
            #endif
            )
            {
                Logger.Debug("Received shutdown message to my handle " + hwnd);
                Thread shutdownThread = new Thread(Shutdown) { IsBackground = true, Name = "shutdownByMessageThread" };
                shutdownThread.Start();
            }
            else if (msg == OsUtils.WM_UPGRADEGWUPE &&
            #if DEBUG
                wParam.ToInt32() == 0
            #else
                wParam.ToInt32() == 1
            #endif
            )
            {
                Logger.Debug("Received upgrade message to my handle " + hwnd);
                Thread upgradeThread = new Thread(new CheckUpgradeTask(this).RunTask) { IsBackground = true, Name = "upgradeByMessageThread" };
                upgradeThread.Start();
            }
            return IntPtr.Zero;
        }