コード例 #1
0
ファイル: MessageBox.cs プロジェクト: giruzou/Liberfy
        public MsgBoxResult Show(string text, string caption = null, MsgBoxButtons buttons = 0, MsgBoxIcon icon = 0, MsgBoxFlags flags = 0)
        {
            if (hWnd != IntPtr.Zero && CenterOwner)
            {
                IntPtr hInst = GetWindowLong(hWnd, GWL.HINSTANCE);
                IntPtr thrId = GetCurrentThreadId();
                hook = SetWindowsHookEx(WH.CBT, HookPrc, hInst, thrId);
            }

            return((MsgBoxResult)MessageBox(hWnd, text, caption, (MB)buttons | (MB)icon | (MB)flags));
        }
コード例 #2
0
ファイル: MessageBox.cs プロジェクト: giruzou/Liberfy
 public static MsgBoxResult Show(IntPtr hWnd, string text, string caption = null, MsgBoxButtons buttons = 0, MsgBoxIcon icon = 0, MsgBoxFlags flags = 0)
 {
     return((MsgBoxResult)MessageBox(hWnd, text, caption, (MB)buttons | (MB)icon | (MB)flags));
 }
コード例 #3
0
ファイル: DialogService.cs プロジェクト: giruzou/Liberfy
 public MsgBoxResult MessageBox(string text, string caption = null, MsgBoxButtons buttons = 0, MsgBoxIcon icon = 0, MsgBoxFlags flags = 0)
 {
     return(msgBox.Show(text, caption ?? App.AppName, buttons, icon, flags));
 }