### 2021-02-22更新
------ #### ryControls V2.1.2102.2201 *.[新增]新加入Gdu.WinformUI控件。
This commit is contained in:
parent
19ecb75c71
commit
34a3ef3ed9
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2265,7 +2265,7 @@
|
|||
<param name="handle"></param>
|
||||
<param name="size"></param>
|
||||
</member>
|
||||
<member name="M:ryCommon.Auto.IsInRect(MyDb.RyWin32.RECT,System.Drawing.Point)">
|
||||
<member name="M:ryCommon.Auto.IsInRect(System.Drawing.Rectangle,System.Drawing.Point)">
|
||||
<summary>
|
||||
判断鼠标位置是不是在指定的矩形中
|
||||
</summary>
|
||||
|
@ -4921,195 +4921,11 @@
|
|||
Win32 API
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
设置父窗口
|
||||
</summary>
|
||||
<param name="hWndChild"></param>
|
||||
<param name="hWndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
<param name="y"></param>
|
||||
<param name="nWidth"></param>
|
||||
<param name="nHeight"></param>
|
||||
<param name="BRePaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.GWL_WNDPROC">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SendMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.PostMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowRect(System.IntPtr,MyDb.RyWin32.RECT@)">
|
||||
<summary>
|
||||
获取窗口位置和大小
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpRect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.RECT">
|
||||
<summary>
|
||||
矩形
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Left">
|
||||
<summary>
|
||||
最左坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Top">
|
||||
<summary>
|
||||
最上坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Right">
|
||||
<summary>
|
||||
最右坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Bottom">
|
||||
<summary>
|
||||
最下坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.WM_COPYDATA">
|
||||
<summary>
|
||||
WM_COPYDATA消息的主要目的是允许在进程间传递只读数据。
|
||||
|
@ -5125,26 +4941,6 @@
|
|||
用户通道ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetMsg(System.Windows.Forms.Message,System.IntPtr@)">
|
||||
<summary>
|
||||
获取消息
|
||||
|
@ -5172,6 +4968,19 @@
|
|||
<param name="size"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Kernel32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WinAPI.Kernel32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct">
|
||||
<summary>
|
||||
|
||||
|
@ -5282,6 +5091,26 @@
|
|||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.GDI32">
|
||||
<summary>
|
||||
|
||||
|
@ -5326,12 +5155,12 @@
|
|||
<param name="dc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Win32API.User32">
|
||||
<member name="T:WinAPI.User32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
模拟鼠标点击
|
||||
</summary>
|
||||
|
@ -5342,7 +5171,7 @@
|
|||
<param name="dwExtraInfo"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
模拟按键
|
||||
</summary>
|
||||
|
@ -5351,16 +5180,16 @@
|
|||
<param name="dwFlags"></param>
|
||||
<param name="dwExtraInfo"></param>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetWindowDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
|
@ -5370,7 +5199,27 @@
|
|||
<param name="repaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5378,14 +5227,90 @@
|
|||
<param name="hwndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetParent(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetParent(System.IntPtr)">
|
||||
<summary>
|
||||
The GetParent function retrieves a handle to the specified window's parent or owner.
|
||||
</summary>
|
||||
<param name="hwnd">Handle to the window whose parent window handle is to be retrieved.</param>
|
||||
<returns>If the window is a child window, the return value is a handle to the parent window. If the window is a top-level window, the return value is a handle to the owner window. If the window is a top-level unowned window or if the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5395,7 +5320,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5405,7 +5330,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5415,21 +5340,48 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.LoadCursorFromFile(System.String)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.PostMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.LoadCursorFromFile(System.String)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="filename"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.IsWindowVisible(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.IsWindowVisible(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<member name="M:WinAPI.User32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<summary>
|
||||
The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window.
|
||||
</summary>
|
||||
|
@ -5439,7 +5391,7 @@
|
|||
<param name="lpszWindow">Pointer to a null-terminated string that specifies the window name (the window's title).</param>
|
||||
<returns>If the function succeeds, the return value is a handle to the window that has the specified class and window names.If the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<summary>
|
||||
The InvalidateRect function adds a rectangle to the specified window's update region.
|
||||
</summary>
|
||||
|
@ -5448,7 +5400,7 @@
|
|||
<param name="bErase">Erase state.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
The ValidateRect function validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
|
||||
</summary>
|
||||
|
@ -5456,7 +5408,7 @@
|
|||
<param name="rect">Validation rectangle coordinates.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5464,14 +5416,14 @@
|
|||
<param name="dwStyle"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5479,7 +5431,7 @@
|
|||
<param name="hdc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5487,7 +5439,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5495,7 +5447,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<member name="M:WinAPI.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5510,7 +5462,7 @@
|
|||
<param name="dwFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5519,7 +5471,7 @@
|
|||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<summary>
|
||||
Changes the size, position, and Z order of a child, pop-up, or top-level window.
|
||||
These windows are ordered according to their appearance on the screen.
|
||||
|
@ -5534,7 +5486,7 @@
|
|||
<param name="flags">Specifies the window sizing and positioning flags. This parameter can be a combination of the following values.</param>
|
||||
<returns>If the function succeeds, the return value is nonzero, if the function fails, the return value is zero.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,2 +1,2 @@
|
|||
[Money_Op]
|
||||
hwnd=3875764
|
||||
hwnd=2562494
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<root>
|
||||
<list id="LastUpdateTime" Value="2021/2/10 22:55:51" />
|
||||
<list id="LastUpdateTime" Value="2021/2/11 13:12:33" />
|
||||
<list id="UpdateAfterTime" Value="0" />
|
||||
</root>
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -2265,7 +2265,7 @@
|
|||
<param name="handle"></param>
|
||||
<param name="size"></param>
|
||||
</member>
|
||||
<member name="M:ryCommon.Auto.IsInRect(MyDb.RyWin32.RECT,System.Drawing.Point)">
|
||||
<member name="M:ryCommon.Auto.IsInRect(System.Drawing.Rectangle,System.Drawing.Point)">
|
||||
<summary>
|
||||
判断鼠标位置是不是在指定的矩形中
|
||||
</summary>
|
||||
|
@ -4921,195 +4921,11 @@
|
|||
Win32 API
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
设置父窗口
|
||||
</summary>
|
||||
<param name="hWndChild"></param>
|
||||
<param name="hWndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
<param name="y"></param>
|
||||
<param name="nWidth"></param>
|
||||
<param name="nHeight"></param>
|
||||
<param name="BRePaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.GWL_WNDPROC">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SendMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.PostMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowRect(System.IntPtr,MyDb.RyWin32.RECT@)">
|
||||
<summary>
|
||||
获取窗口位置和大小
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpRect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.RECT">
|
||||
<summary>
|
||||
矩形
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Left">
|
||||
<summary>
|
||||
最左坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Top">
|
||||
<summary>
|
||||
最上坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Right">
|
||||
<summary>
|
||||
最右坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Bottom">
|
||||
<summary>
|
||||
最下坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.WM_COPYDATA">
|
||||
<summary>
|
||||
WM_COPYDATA消息的主要目的是允许在进程间传递只读数据。
|
||||
|
@ -5125,26 +4941,6 @@
|
|||
用户通道ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetMsg(System.Windows.Forms.Message,System.IntPtr@)">
|
||||
<summary>
|
||||
获取消息
|
||||
|
@ -5172,6 +4968,19 @@
|
|||
<param name="size"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Kernel32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WinAPI.Kernel32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct">
|
||||
<summary>
|
||||
|
||||
|
@ -5282,6 +5091,26 @@
|
|||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.GDI32">
|
||||
<summary>
|
||||
|
||||
|
@ -5326,12 +5155,12 @@
|
|||
<param name="dc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Win32API.User32">
|
||||
<member name="T:WinAPI.User32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
模拟鼠标点击
|
||||
</summary>
|
||||
|
@ -5342,7 +5171,7 @@
|
|||
<param name="dwExtraInfo"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
模拟按键
|
||||
</summary>
|
||||
|
@ -5351,16 +5180,16 @@
|
|||
<param name="dwFlags"></param>
|
||||
<param name="dwExtraInfo"></param>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetWindowDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
|
@ -5370,7 +5199,27 @@
|
|||
<param name="repaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5378,14 +5227,90 @@
|
|||
<param name="hwndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetParent(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetParent(System.IntPtr)">
|
||||
<summary>
|
||||
The GetParent function retrieves a handle to the specified window's parent or owner.
|
||||
</summary>
|
||||
<param name="hwnd">Handle to the window whose parent window handle is to be retrieved.</param>
|
||||
<returns>If the window is a child window, the return value is a handle to the parent window. If the window is a top-level window, the return value is a handle to the owner window. If the window is a top-level unowned window or if the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5395,7 +5320,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5405,7 +5330,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5415,21 +5340,48 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.LoadCursorFromFile(System.String)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.PostMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.LoadCursorFromFile(System.String)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="filename"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.IsWindowVisible(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.IsWindowVisible(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<member name="M:WinAPI.User32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<summary>
|
||||
The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window.
|
||||
</summary>
|
||||
|
@ -5439,7 +5391,7 @@
|
|||
<param name="lpszWindow">Pointer to a null-terminated string that specifies the window name (the window's title).</param>
|
||||
<returns>If the function succeeds, the return value is a handle to the window that has the specified class and window names.If the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<summary>
|
||||
The InvalidateRect function adds a rectangle to the specified window's update region.
|
||||
</summary>
|
||||
|
@ -5448,7 +5400,7 @@
|
|||
<param name="bErase">Erase state.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
The ValidateRect function validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
|
||||
</summary>
|
||||
|
@ -5456,7 +5408,7 @@
|
|||
<param name="rect">Validation rectangle coordinates.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5464,14 +5416,14 @@
|
|||
<param name="dwStyle"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5479,7 +5431,7 @@
|
|||
<param name="hdc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5487,7 +5439,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5495,7 +5447,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<member name="M:WinAPI.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5510,7 +5462,7 @@
|
|||
<param name="dwFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5519,7 +5471,7 @@
|
|||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<summary>
|
||||
Changes the size, position, and Z order of a child, pop-up, or top-level window.
|
||||
These windows are ordered according to their appearance on the screen.
|
||||
|
@ -5534,7 +5486,7 @@
|
|||
<param name="flags">Specifies the window sizing and positioning flags. This parameter can be a combination of the following values.</param>
|
||||
<returns>If the function succeeds, the return value is nonzero, if the function fails, the return value is zero.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2265,7 +2265,7 @@
|
|||
<param name="handle"></param>
|
||||
<param name="size"></param>
|
||||
</member>
|
||||
<member name="M:ryCommon.Auto.IsInRect(MyDb.RyWin32.RECT,System.Drawing.Point)">
|
||||
<member name="M:ryCommon.Auto.IsInRect(System.Drawing.Rectangle,System.Drawing.Point)">
|
||||
<summary>
|
||||
判断鼠标位置是不是在指定的矩形中
|
||||
</summary>
|
||||
|
@ -4921,195 +4921,11 @@
|
|||
Win32 API
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
设置父窗口
|
||||
</summary>
|
||||
<param name="hWndChild"></param>
|
||||
<param name="hWndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
<param name="y"></param>
|
||||
<param name="nWidth"></param>
|
||||
<param name="nHeight"></param>
|
||||
<param name="BRePaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.GWL_WNDPROC">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SendMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.PostMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowRect(System.IntPtr,MyDb.RyWin32.RECT@)">
|
||||
<summary>
|
||||
获取窗口位置和大小
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpRect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.RECT">
|
||||
<summary>
|
||||
矩形
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Left">
|
||||
<summary>
|
||||
最左坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Top">
|
||||
<summary>
|
||||
最上坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Right">
|
||||
<summary>
|
||||
最右坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Bottom">
|
||||
<summary>
|
||||
最下坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.WM_COPYDATA">
|
||||
<summary>
|
||||
WM_COPYDATA消息的主要目的是允许在进程间传递只读数据。
|
||||
|
@ -5125,26 +4941,6 @@
|
|||
用户通道ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetMsg(System.Windows.Forms.Message,System.IntPtr@)">
|
||||
<summary>
|
||||
获取消息
|
||||
|
@ -5172,6 +4968,19 @@
|
|||
<param name="size"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Kernel32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WinAPI.Kernel32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct">
|
||||
<summary>
|
||||
|
||||
|
@ -5282,6 +5091,26 @@
|
|||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.GDI32">
|
||||
<summary>
|
||||
|
||||
|
@ -5326,12 +5155,12 @@
|
|||
<param name="dc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Win32API.User32">
|
||||
<member name="T:WinAPI.User32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
模拟鼠标点击
|
||||
</summary>
|
||||
|
@ -5342,7 +5171,7 @@
|
|||
<param name="dwExtraInfo"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
模拟按键
|
||||
</summary>
|
||||
|
@ -5351,16 +5180,16 @@
|
|||
<param name="dwFlags"></param>
|
||||
<param name="dwExtraInfo"></param>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetWindowDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
|
@ -5370,7 +5199,27 @@
|
|||
<param name="repaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5378,14 +5227,90 @@
|
|||
<param name="hwndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetParent(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetParent(System.IntPtr)">
|
||||
<summary>
|
||||
The GetParent function retrieves a handle to the specified window's parent or owner.
|
||||
</summary>
|
||||
<param name="hwnd">Handle to the window whose parent window handle is to be retrieved.</param>
|
||||
<returns>If the window is a child window, the return value is a handle to the parent window. If the window is a top-level window, the return value is a handle to the owner window. If the window is a top-level unowned window or if the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5395,7 +5320,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5405,7 +5330,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5415,21 +5340,48 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.LoadCursorFromFile(System.String)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.PostMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.LoadCursorFromFile(System.String)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="filename"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.IsWindowVisible(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.IsWindowVisible(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<member name="M:WinAPI.User32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<summary>
|
||||
The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window.
|
||||
</summary>
|
||||
|
@ -5439,7 +5391,7 @@
|
|||
<param name="lpszWindow">Pointer to a null-terminated string that specifies the window name (the window's title).</param>
|
||||
<returns>If the function succeeds, the return value is a handle to the window that has the specified class and window names.If the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<summary>
|
||||
The InvalidateRect function adds a rectangle to the specified window's update region.
|
||||
</summary>
|
||||
|
@ -5448,7 +5400,7 @@
|
|||
<param name="bErase">Erase state.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
The ValidateRect function validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
|
||||
</summary>
|
||||
|
@ -5456,7 +5408,7 @@
|
|||
<param name="rect">Validation rectangle coordinates.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5464,14 +5416,14 @@
|
|||
<param name="dwStyle"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5479,7 +5431,7 @@
|
|||
<param name="hdc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5487,7 +5439,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5495,7 +5447,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<member name="M:WinAPI.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5510,7 +5462,7 @@
|
|||
<param name="dwFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5519,7 +5471,7 @@
|
|||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<summary>
|
||||
Changes the size, position, and Z order of a child, pop-up, or top-level window.
|
||||
These windows are ordered according to their appearance on the screen.
|
||||
|
@ -5534,7 +5486,7 @@
|
|||
<param name="flags">Specifies the window sizing and positioning flags. This parameter can be a combination of the following values.</param>
|
||||
<returns>If the function succeeds, the return value is nonzero, if the function fails, the return value is zero.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -2265,7 +2265,7 @@
|
|||
<param name="handle"></param>
|
||||
<param name="size"></param>
|
||||
</member>
|
||||
<member name="M:ryCommon.Auto.IsInRect(MyDb.RyWin32.RECT,System.Drawing.Point)">
|
||||
<member name="M:ryCommon.Auto.IsInRect(System.Drawing.Rectangle,System.Drawing.Point)">
|
||||
<summary>
|
||||
判断鼠标位置是不是在指定的矩形中
|
||||
</summary>
|
||||
|
@ -4921,195 +4921,11 @@
|
|||
Win32 API
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
设置父窗口
|
||||
</summary>
|
||||
<param name="hWndChild"></param>
|
||||
<param name="hWndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
<param name="y"></param>
|
||||
<param name="nWidth"></param>
|
||||
<param name="nHeight"></param>
|
||||
<param name="BRePaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.GWL_WNDPROC">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.SendMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.PostMessage(System.IntPtr,System.Int32,System.Int32,MyDb.RyWin32.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetWindowRect(System.IntPtr,MyDb.RyWin32.RECT@)">
|
||||
<summary>
|
||||
获取窗口位置和大小
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpRect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.RECT">
|
||||
<summary>
|
||||
矩形
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Left">
|
||||
<summary>
|
||||
最左坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Top">
|
||||
<summary>
|
||||
最上坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Right">
|
||||
<summary>
|
||||
最右坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.RECT.Bottom">
|
||||
<summary>
|
||||
最下坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.WM_COPYDATA">
|
||||
<summary>
|
||||
WM_COPYDATA消息的主要目的是允许在进程间传递只读数据。
|
||||
|
@ -5125,26 +4941,6 @@
|
|||
用户通道ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:MyDb.RyWin32.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:MyDb.RyWin32.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:MyDb.RyWin32.GetMsg(System.Windows.Forms.Message,System.IntPtr@)">
|
||||
<summary>
|
||||
获取消息
|
||||
|
@ -5172,6 +4968,19 @@
|
|||
<param name="size"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Kernel32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WinAPI.Kernel32.TerminateProcess(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
结束进程
|
||||
</summary>
|
||||
<param name="handle"></param>
|
||||
<param name="exitCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct">
|
||||
<summary>
|
||||
|
||||
|
@ -5282,6 +5091,26 @@
|
|||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.Struct.COPYDATASTRUCT">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.dwData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.cData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WinAPI.Struct.COPYDATASTRUCT.lpData">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WinAPI.GDI32">
|
||||
<summary>
|
||||
|
||||
|
@ -5326,12 +5155,12 @@
|
|||
<param name="dc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Win32API.User32">
|
||||
<member name="T:WinAPI.User32">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.mouse_event(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
模拟鼠标点击
|
||||
</summary>
|
||||
|
@ -5342,7 +5171,7 @@
|
|||
<param name="dwExtraInfo"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.keybd_event(System.Windows.Forms.Keys,System.Byte,System.UInt32,System.UInt32)">
|
||||
<summary>
|
||||
模拟按键
|
||||
</summary>
|
||||
|
@ -5351,16 +5180,16 @@
|
|||
<param name="dwFlags"></param>
|
||||
<param name="dwExtraInfo"></param>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetWindowDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.MoveWindow(System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
|
||||
移动窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="x"></param>
|
||||
|
@ -5370,7 +5199,27 @@
|
|||
<param name="repaint"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.CallWindowProc(System.IntPtr,System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="lpPrevWndFunc"></param>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="nIndex"></param>
|
||||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetParent(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5378,14 +5227,90 @@
|
|||
<param name="hwndParent"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetParent(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetParent(System.IntPtr)">
|
||||
<summary>
|
||||
The GetParent function retrieves a handle to the specified window's parent or owner.
|
||||
</summary>
|
||||
<param name="hwnd">Handle to the window whose parent window handle is to be retrieved.</param>
|
||||
<returns>If the window is a child window, the return value is a handle to the parent window. If the window is a top-level window, the return value is a handle to the owner window. If the window is a top-level unowned window or if the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetSystemMenu(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="bRevert"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.RemoveMenu(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hMenu"></param>
|
||||
<param name="nPosition"></param>
|
||||
<param name="wFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetForegroundWindow(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetForegroundWindow">
|
||||
<summary>
|
||||
获取当前前台窗口句柄
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetActiveWindow">
|
||||
<summary>
|
||||
获得当前活动窗体
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SetActiveWindow(System.IntPtr)">
|
||||
<summary>
|
||||
设置活动窗体
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetClassName(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取类名
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowThreadProcessId(System.IntPtr,System.Int32@)">
|
||||
<summary>
|
||||
获取当前线程对应的进程ID
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="ID"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.IsWindow(System.IntPtr)">
|
||||
<summary>
|
||||
判断指定句柄是否是一个窗口
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.GetWindowText(System.Int32,System.Text.StringBuilder,System.Int32)">
|
||||
<summary>
|
||||
获取窗口标题
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="lpString"></param>
|
||||
<param name="nMaxCount"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5395,7 +5320,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5405,7 +5330,7 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.UInt32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5415,21 +5340,48 @@
|
|||
<param name="lParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.LoadCursorFromFile(System.String)">
|
||||
<member name="M:WinAPI.User32.SendMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.PostMessage(System.IntPtr,System.Int32,System.Int32,WinAPI.Struct.COPYDATASTRUCT@)">
|
||||
<summary>
|
||||
发送消息
|
||||
</summary>
|
||||
<param name="hWnd"></param>
|
||||
<param name="msg"></param>
|
||||
<param name="wParam"></param>
|
||||
<param name="IParam"></param>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.LoadCursorFromFile(System.String)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="filename"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.IsWindowVisible(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.IsWindowVisible(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<member name="M:WinAPI.User32.FindWindow(System.String,System.String)">
|
||||
<summary>
|
||||
查找窗口
|
||||
</summary>
|
||||
<param name="lpClassName"></param>
|
||||
<param name="lpWindowName"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WinAPI.User32.FindWindowEx(System.IntPtr,System.IntPtr,System.String,System.String)">
|
||||
<summary>
|
||||
The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window.
|
||||
</summary>
|
||||
|
@ -5439,7 +5391,7 @@
|
|||
<param name="lpszWindow">Pointer to a null-terminated string that specifies the window name (the window's title).</param>
|
||||
<returns>If the function succeeds, the return value is a handle to the window that has the specified class and window names.If the function fails, the return value is NULL.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<member name="M:WinAPI.User32.InvalidateRect(System.IntPtr,System.Drawing.Rectangle@,System.Boolean)">
|
||||
<summary>
|
||||
The InvalidateRect function adds a rectangle to the specified window's update region.
|
||||
</summary>
|
||||
|
@ -5448,7 +5400,7 @@
|
|||
<param name="bErase">Erase state.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.ValidateRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
The ValidateRect function validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
|
||||
</summary>
|
||||
|
@ -5456,7 +5408,7 @@
|
|||
<param name="rect">Validation rectangle coordinates.</param>
|
||||
<returns>If the function succeeds, the return value is true.If the function fails, the return value is false.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<member name="M:WinAPI.User32.GetWindowLong(System.IntPtr,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5464,14 +5416,14 @@
|
|||
<param name="dwStyle"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetDC(System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.GetDC(System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="hwnd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<member name="M:WinAPI.User32.ReleaseDC(System.IntPtr,System.IntPtr)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5479,7 +5431,7 @@
|
|||
<param name="hdc"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetClientRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5487,7 +5439,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<member name="M:WinAPI.User32.GetWindowRect(System.IntPtr,System.Drawing.Rectangle@)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5495,7 +5447,7 @@
|
|||
<param name="rect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<member name="M:WinAPI.User32.UpdateLayeredWindow(System.IntPtr,System.IntPtr,System.Drawing.Point@,System.Drawing.Size@,System.IntPtr,System.Drawing.Point@,System.Int32,WinAPI.Struct.BLENDFUNCTION@,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5510,7 +5462,7 @@
|
|||
<param name="dwFlags"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<member name="M:WinAPI.User32.SetWindowLong(System.IntPtr,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
@ -5519,7 +5471,7 @@
|
|||
<param name="dwNewLong"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,WinAPI.Struct.FlagsSetWindowPos)">
|
||||
<summary>
|
||||
Changes the size, position, and Z order of a child, pop-up, or top-level window.
|
||||
These windows are ordered according to their appearance on the screen.
|
||||
|
@ -5534,7 +5486,7 @@
|
|||
<param name="flags">Specifies the window sizing and positioning flags. This parameter can be a combination of the following values.</param>
|
||||
<returns>If the function succeeds, the return value is nonzero, if the function fails, the return value is zero.</returns>
|
||||
</member>
|
||||
<member name="M:Win32API.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<member name="M:WinAPI.User32.SetWindowPos(System.IntPtr,System.IntPtr,System.Int32,System.Int32,System.Int32,System.Int32,System.UInt32)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -1,4 +1,9 @@
|
|||
### 2021-02-11更新
|
||||
### 2021-02-22更新
|
||||
------
|
||||
#### ryControls V2.1.2102.2201
|
||||
*.[新增]新加入Gdu.WinformUI控件。
|
||||
|
||||
### 2021-02-11更新
|
||||
------
|
||||
#### MyDb V2.1.2102.1101
|
||||
- *.[新增]新增Auto类,增加 鼠标模拟操作和按键模拟操作。
|
||||
|
|
Binary file not shown.
|
@ -154,7 +154,8 @@ namespace Itrycn_Project2
|
|||
//var point= button1.PointToScreen(button1.Location);
|
||||
// ryCommon.Auto.LeftClick(point.X+5, point.Y+5);
|
||||
textBox1.Focus();
|
||||
Auto.PasteText("你好");
|
||||
Auto.GetRect(Handle,out var size);
|
||||
MessageBox.Show(size.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace QuickMsg
|
|||
/// </summary>
|
||||
~CustomMsg()
|
||||
{
|
||||
MyDb.RyWin32.SetWindowLong(handle, MyDb.RyWin32.GWL_WNDPROC, oldWndFunc);
|
||||
WinAPI.User32.SetWindowLong(handle, MyDb.RyWin32.GWL_WNDPROC, oldWndFunc);
|
||||
//System.Windows.Forms.Application.RemoveMessageFilter(this);
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -75,7 +75,7 @@ namespace QuickMsg
|
|||
/// <param name="m"></param>
|
||||
public void DefWndProc(ref System.Windows.Forms.Message m)
|
||||
{
|
||||
m.Result = MyDb.RyWin32.CallWindowProc(oldWndFunc, m.HWnd, m.Msg, m.WParam, m.LParam);
|
||||
m.Result = WinAPI.User32.CallWindowProc(oldWndFunc, m.HWnd, m.Msg, m.WParam, m.LParam);
|
||||
if (m.Msg == MyDb.RyWin32.WM_COPYDATA)
|
||||
{
|
||||
var msg = MyDb.RyWin32.GetMsg(m, out IntPtr handle);
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using WinAPI;
|
||||
|
||||
namespace QuickMsg
|
||||
{
|
||||
|
@ -112,7 +113,7 @@ namespace QuickMsg
|
|||
/// <returns></returns>
|
||||
public bool MainExist()
|
||||
{
|
||||
return MyDb.RyWin32.IsWindow(main_handle);
|
||||
return User32.IsWindow(main_handle);
|
||||
}
|
||||
private void MSG_OnMsg(object sender, MsgArgs e)
|
||||
{
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
<Compile Include="SysFuns\RyWin32.cs" />
|
||||
<Compile Include="SysFuns\SuperForm.cs" />
|
||||
<Compile Include="SysFuns\WinHotReg.cs" />
|
||||
<Compile Include="WinAPI\Kernel32.cs" />
|
||||
<Compile Include="WinAPI\Structs.cs" />
|
||||
<Compile Include="WinAPI\GDI32.cs" />
|
||||
<Compile Include="WinAPI\User32.cs" />
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Win32API;
|
||||
using WinAPI;
|
||||
|
||||
namespace ryCommon
|
||||
{
|
||||
|
@ -266,7 +266,7 @@ namespace ryCommon
|
|||
Rectangle windowRect = new Rectangle();
|
||||
size = new Size(0, 0);
|
||||
if (hdcSrc == IntPtr.Zero) { return windowRect; }
|
||||
User32.GetWindowRect(handle, ref windowRect);
|
||||
User32.GetWindowRect(handle, out windowRect);
|
||||
int width = windowRect.Right - windowRect.Left;
|
||||
int height = windowRect.Bottom - windowRect.Top;
|
||||
size = new Size(width, height);
|
||||
|
@ -288,7 +288,7 @@ namespace ryCommon
|
|||
/// <param name="rect"></param>
|
||||
/// <param name="mouse_position"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsInRect(MyDb.RyWin32.RECT rect, Point mouse_position)
|
||||
public static bool IsInRect(Rectangle rect, Point mouse_position)
|
||||
{
|
||||
return mouse_position.X >= rect.Left && mouse_position.X <= rect.Right && mouse_position.Y >= rect.Top && mouse_position.Y <= rect.Bottom;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using WinAPI;
|
||||
|
||||
namespace ryCommon
|
||||
{
|
||||
|
@ -87,7 +88,7 @@ namespace ryCommon
|
|||
if (_parent != null)
|
||||
{
|
||||
sub_Form.StartPosition = FormStartPosition.Manual;
|
||||
MyDb.RyWin32.GetWindowRect(_parent.Handle, out var rect);
|
||||
User32.GetWindowRect(_parent.Handle, out var rect);
|
||||
sub_Form.Top = rect.Top + (rect.Bottom- rect.Top - sub_Form.Height) / 2;
|
||||
sub_Form.Left = rect.Left + (rect.Right- rect.Left - sub_Form.Width) / 2;
|
||||
if (_parent.TopMost) { sub_Form.TopMost = true; }
|
||||
|
@ -156,7 +157,7 @@ namespace ryCommon
|
|||
case FormLocation.ParentMiddle:
|
||||
if (parent != null)
|
||||
{
|
||||
MyDb.RyWin32.GetWindowRect(parent.Handle, out var rect);
|
||||
User32.GetWindowRect(parent.Handle, out var rect);
|
||||
x = rect.Left + (rect.Right- rect.Left - sub_Form.Width) / 2;
|
||||
y = rect.Top + (rect.Bottom- rect.Top - sub_Form.Height) / 2;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Linq;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using WinAPI;
|
||||
|
||||
namespace ryCommon
|
||||
{
|
||||
|
@ -43,8 +44,8 @@ namespace ryCommon
|
|||
{
|
||||
int iSysMenu;
|
||||
const int MF_BYCOMMAND = 0x400; //0x400-关闭
|
||||
iSysMenu = MyDb.RyWin32.GetSystemMenu(iHWND, 0);
|
||||
return MyDb.RyWin32.RemoveMenu(iSysMenu, 6, MF_BYCOMMAND);
|
||||
iSysMenu = User32.GetSystemMenu(iHWND, 0);
|
||||
return User32.RemoveMenu(iSysMenu, 6, MF_BYCOMMAND);
|
||||
}
|
||||
/// <summary>
|
||||
/// 把窗体放到最前
|
||||
|
@ -52,7 +53,7 @@ namespace ryCommon
|
|||
/// <param name="iHWND"></param>
|
||||
public static void BringToTop(IntPtr iHWND)
|
||||
{
|
||||
MyDb.RyWin32.SetForegroundWindow(iHWND);
|
||||
User32.SetForegroundWindow(iHWND);
|
||||
}
|
||||
/// <summary>
|
||||
/// 显示窗体
|
||||
|
@ -94,7 +95,7 @@ namespace ryCommon
|
|||
public static string GetWinText(IntPtr Handle)
|
||||
{
|
||||
StringBuilder WinTitle = new StringBuilder(200);
|
||||
int len = MyDb.RyWin32.GetWindowText(Handle.ToInt32(), WinTitle, 200);
|
||||
int len = User32.GetWindowText(Handle.ToInt32(), WinTitle, 200);
|
||||
return WinTitle.ToString();
|
||||
}
|
||||
|
||||
|
@ -106,7 +107,7 @@ namespace ryCommon
|
|||
public static string GetWinClass(IntPtr Handle)
|
||||
{
|
||||
StringBuilder WinClass = new StringBuilder(200);
|
||||
int len = MyDb.RyWin32.GetClassName(Handle.ToInt32(), WinClass, 200);
|
||||
int len = User32.GetClassName(Handle.ToInt32(), WinClass, 200);
|
||||
return WinClass.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -115,7 +116,7 @@ namespace ryCommon
|
|||
/// <returns></returns>
|
||||
public static IntPtr GetActiveWindow()
|
||||
{
|
||||
return MyDb.RyWin32.GetActiveWindow();
|
||||
return User32.GetActiveWindow();
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置为当前活动窗口
|
||||
|
@ -124,7 +125,7 @@ namespace ryCommon
|
|||
/// <returns></returns>
|
||||
public static IntPtr SetActiveWindow(IntPtr hwnd)
|
||||
{
|
||||
return MyDb.RyWin32.SetActiveWindow(hwnd);
|
||||
return User32.SetActiveWindow(hwnd);
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据窗口句柄来获得进程id
|
||||
|
@ -133,7 +134,7 @@ namespace ryCommon
|
|||
/// <returns></returns>
|
||||
public static int GetProcessId(IntPtr hwnd)
|
||||
{
|
||||
MyDb.RyWin32.GetWindowThreadProcessId(hwnd, out int ID);
|
||||
User32.GetWindowThreadProcessId(hwnd, out int ID);
|
||||
return ID;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -155,8 +156,8 @@ namespace ryCommon
|
|||
public static void SetDesktopForm(IntPtr handle)
|
||||
{
|
||||
//在构造函数中或者Load中
|
||||
IntPtr hDeskTop = MyDb.RyWin32.FindWindow("Progman", null);
|
||||
MyDb.RyWin32.SetParent(handle, hDeskTop);
|
||||
IntPtr hDeskTop = WinAPI.User32.FindWindow("Progman", null);
|
||||
WinAPI.User32.SetParent(handle, hDeskTop);
|
||||
}
|
||||
/// <summary>
|
||||
/// 结束进程
|
||||
|
@ -165,7 +166,7 @@ namespace ryCommon
|
|||
/// <returns></returns>
|
||||
public static long KillPorc(int pid)
|
||||
{
|
||||
return MyDb.RyWin32.TerminateProcess(pid,1);
|
||||
return WinAPI.Kernel32.TerminateProcess(pid,1);
|
||||
}
|
||||
/// <summary>
|
||||
/// 打开窗体,只打开一个实例(非模态)
|
||||
|
|
|
@ -5,6 +5,8 @@ using System.Linq;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using WinAPI;
|
||||
using static WinAPI.Struct;
|
||||
|
||||
namespace MyDb
|
||||
{
|
||||
|
@ -13,199 +15,11 @@ namespace MyDb
|
|||
/// </summary>
|
||||
public class RyWin32
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="bRevert"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("USER32.DLL")]
|
||||
public static extern int GetSystemMenu(IntPtr hwnd, int bRevert);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hMenu"></param>
|
||||
/// <param name="nPosition"></param>
|
||||
/// <param name="wFlags"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("USER32.DLL")]
|
||||
public static extern int RemoveMenu(int hMenu, int nPosition, int wFlags);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
||||
/// <summary>
|
||||
/// 获取当前前台窗口句柄
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
/// <summary>
|
||||
/// 获得当前活动窗体
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetActiveWindow();//获得当前活动窗体
|
||||
/// <summary>
|
||||
/// 设置活动窗体
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr SetActiveWindow(IntPtr hwnd);//设置活动窗体
|
||||
/// <summary>
|
||||
/// 获取类名
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="lpClassName"></param>
|
||||
/// <param name="nMaxCount"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32", EntryPoint = "GetClassName", SetLastError = false,
|
||||
CharSet = CharSet.Auto, ExactSpelling = false,
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern int GetClassName(int hWnd, StringBuilder lpClassName, int nMaxCount);
|
||||
/// <summary>
|
||||
/// 获取当前线程对应的进程ID
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="ID"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID);
|
||||
/// <summary>
|
||||
/// 判断指定句柄是否是一个窗口
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll", EntryPoint = "IsWindow")]
|
||||
public static extern bool IsWindow(IntPtr hWnd);
|
||||
/// <summary>
|
||||
/// 获取窗口标题
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="lpString"></param>
|
||||
/// <param name="nMaxCount"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32", SetLastError = true)]
|
||||
public static extern int GetWindowText(
|
||||
int hWnd,//窗口句柄
|
||||
StringBuilder lpString,//标题
|
||||
int nMaxCount //最大值
|
||||
);
|
||||
/// <summary>
|
||||
/// 查找窗口
|
||||
/// </summary>
|
||||
/// <param name="lpClassName"></param>
|
||||
/// <param name="lpWindowName"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll", EntryPoint = "FindWindow")]
|
||||
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
|
||||
/// <summary>
|
||||
/// 设置父窗口
|
||||
/// </summary>
|
||||
/// <param name="hWndChild"></param>
|
||||
/// <param name="hWndParent"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int SetParent(IntPtr hWndChild, IntPtr hWndParent);
|
||||
/// <summary>
|
||||
/// 移动窗口
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="nWidth"></param>
|
||||
/// <param name="nHeight"></param>
|
||||
/// <param name="BRePaint"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern int MoveWindow(IntPtr hWnd, int x, int y, int nWidth, int nHeight, bool BRePaint);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="lpPrevWndFunc"></param>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="wParam"></param>
|
||||
/// <param name="lParam"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll")]
|
||||
public extern static IntPtr CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="nIndex"></param>
|
||||
/// <param name="dwNewLong"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll")]
|
||||
public static extern IntPtr SetWindowLong(IntPtr hwnd, int nIndex, IntPtr dwNewLong);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const int GWL_WNDPROC = (-4);
|
||||
/// <summary>
|
||||
/// 结束进程
|
||||
/// </summary>
|
||||
/// <param name="handle"></param>
|
||||
/// <param name="exitCode"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("kernel32")]
|
||||
public static extern long TerminateProcess(int handle, int exitCode);
|
||||
/// <summary>
|
||||
/// 发送消息
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="wParam"></param>
|
||||
/// <param name="IParam"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll", EntryPoint = "SendMessage")]
|
||||
private static extern int SendMessage(IntPtr hwnd, int msg, int wParam, ref COPYDATASTRUCT IParam);
|
||||
/// <summary>
|
||||
/// 发送消息
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="wParam"></param>
|
||||
/// <param name="IParam"></param>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern void PostMessage(IntPtr hWnd, int msg, int wParam, ref COPYDATASTRUCT IParam);
|
||||
/// <summary>
|
||||
/// 获取窗口位置和大小
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="lpRect"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
|
||||
/// <summary>
|
||||
/// 矩形
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT
|
||||
{
|
||||
/// <summary>
|
||||
/// 最左坐标
|
||||
/// </summary>
|
||||
public int Left;
|
||||
/// <summary>
|
||||
/// 最上坐标
|
||||
/// </summary>
|
||||
public int Top;
|
||||
/// <summary>
|
||||
/// 最右坐标
|
||||
/// </summary>
|
||||
public int Right;
|
||||
/// <summary>
|
||||
/// 最下坐标
|
||||
/// </summary>
|
||||
public int Bottom;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WM_COPYDATA消息的主要目的是允许在进程间传递只读数据。
|
||||
/// </summary>
|
||||
|
@ -218,25 +32,7 @@ namespace MyDb
|
|||
/// 用户通道ID
|
||||
/// </summary>
|
||||
public const int User_chanel_id = 1001;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public struct COPYDATASTRUCT
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public IntPtr dwData;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int cData;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string lpData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取消息
|
||||
/// </summary>
|
||||
|
@ -267,7 +63,7 @@ namespace MyDb
|
|||
cdata.dwData = from_handle;
|
||||
cdata.lpData = str;
|
||||
cdata.cData = len + 1;
|
||||
return SendMessage(to_handle, WM_COPYDATA, wParam, ref cdata);
|
||||
return User32.SendMessage(to_handle, WM_COPYDATA, wParam, ref cdata);
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置父窗口
|
||||
|
@ -278,8 +74,8 @@ namespace MyDb
|
|||
/// <returns></returns>
|
||||
public static bool SetParentWin(IntPtr sub_form, IntPtr parent_form,Size size)
|
||||
{
|
||||
SetParent(sub_form, parent_form);
|
||||
MoveWindow(sub_form, 0, 0, size.Width, size.Height, false);
|
||||
User32.SetParent(sub_form, parent_form);
|
||||
User32.MoveWindow(sub_form, 0, 0, size.Width, size.Height, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Linq;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using WinAPI;
|
||||
|
||||
namespace ryCommon
|
||||
{
|
||||
|
@ -31,7 +32,7 @@ namespace ryCommon
|
|||
/// </summary>
|
||||
~SuperForm()
|
||||
{
|
||||
MyDb.RyWin32.SetWindowLong(handle, MyDb.RyWin32.GWL_WNDPROC, oldWndFunc);
|
||||
User32.SetWindowLong(handle, MyDb.RyWin32.GWL_WNDPROC, oldWndFunc);
|
||||
}
|
||||
private bool isMouseDown = false;
|
||||
private Point FormLocation; //form的location
|
||||
|
@ -104,7 +105,7 @@ namespace ryCommon
|
|||
/// <param name="m"></param>
|
||||
protected virtual void WndProc(ref Message m)
|
||||
{
|
||||
m.Result = MyDb.RyWin32.CallWindowProc(oldWndFunc, m.HWnd, m.Msg, m.WParam, m.LParam);
|
||||
m.Result = User32.CallWindowProc(oldWndFunc, m.HWnd, m.Msg, m.WParam, m.LParam);
|
||||
switch (m.Msg)
|
||||
{
|
||||
case 0x0084:
|
||||
|
|
23
Source/MyDb/WinAPI/Kernel32.cs
Normal file
23
Source/MyDb/WinAPI/Kernel32.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace WinAPI
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class Kernel32
|
||||
{
|
||||
/// <summary>
|
||||
/// 结束进程
|
||||
/// </summary>
|
||||
/// <param name="handle"></param>
|
||||
/// <param name="exitCode"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("kernel32")]
|
||||
public static extern long TerminateProcess(int handle, int exitCode);
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ namespace WinAPI
|
|||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Struct
|
||||
public static class Struct
|
||||
{
|
||||
#region Struct
|
||||
/// <summary>
|
||||
|
@ -104,5 +104,24 @@ namespace WinAPI
|
|||
/// </summary>
|
||||
SWP_ASYNCWINDOWPOS = 0x4000
|
||||
};
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public struct COPYDATASTRUCT
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public IntPtr dwData;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int cData;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string lpData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,15 +5,13 @@ using System.Runtime.InteropServices;
|
|||
using static WinAPI.Struct;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Win32API
|
||||
namespace WinAPI
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class User32
|
||||
{
|
||||
|
||||
|
||||
#region UnmanagedMethods
|
||||
/// <summary>
|
||||
/// 模拟鼠标点击
|
||||
|
@ -43,7 +41,7 @@ namespace Win32API
|
|||
[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern IntPtr GetWindowDC(IntPtr hWnd);
|
||||
/// <summary>
|
||||
///
|
||||
/// 移动窗口
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="x"></param>
|
||||
|
@ -54,6 +52,27 @@ namespace Win32API
|
|||
/// <returns></returns>
|
||||
[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern bool MoveWindow(IntPtr hWnd, int x, int y, int width, int height, bool repaint);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="lpPrevWndFunc"></param>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="wParam"></param>
|
||||
/// <param name="lParam"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll")]
|
||||
public extern static IntPtr CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="nIndex"></param>
|
||||
/// <param name="dwNewLong"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll")]
|
||||
public static extern IntPtr SetWindowLong(IntPtr hwnd, int nIndex, IntPtr dwNewLong);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -74,6 +93,88 @@ namespace Win32API
|
|||
///
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="bRevert"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("USER32.DLL")]
|
||||
public static extern int GetSystemMenu(IntPtr hwnd, int bRevert);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hMenu"></param>
|
||||
/// <param name="nPosition"></param>
|
||||
/// <param name="wFlags"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("USER32.DLL")]
|
||||
public static extern int RemoveMenu(int hMenu, int nPosition, int wFlags);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
||||
/// <summary>
|
||||
/// 获取当前前台窗口句柄
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
/// <summary>
|
||||
/// 获得当前活动窗体
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetActiveWindow();//获得当前活动窗体
|
||||
/// <summary>
|
||||
/// 设置活动窗体
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr SetActiveWindow(IntPtr hwnd);//设置活动窗体
|
||||
/// <summary>
|
||||
/// 获取类名
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="lpClassName"></param>
|
||||
/// <param name="nMaxCount"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32", EntryPoint = "GetClassName", SetLastError = false,
|
||||
CharSet = CharSet.Auto, ExactSpelling = false,
|
||||
CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern int GetClassName(int hWnd, StringBuilder lpClassName, int nMaxCount);
|
||||
/// <summary>
|
||||
/// 获取当前线程对应的进程ID
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="ID"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID);
|
||||
/// <summary>
|
||||
/// 判断指定句柄是否是一个窗口
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32.dll", EntryPoint = "IsWindow")]
|
||||
public static extern bool IsWindow(IntPtr hWnd);
|
||||
/// <summary>
|
||||
/// 获取窗口标题
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="lpString"></param>
|
||||
/// <param name="nMaxCount"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("user32", SetLastError = true)]
|
||||
public static extern int GetWindowText(
|
||||
int hWnd,//窗口句柄
|
||||
StringBuilder lpString,//标题
|
||||
int nMaxCount //最大值
|
||||
);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="wMsg"></param>
|
||||
/// <param name="wParam"></param>
|
||||
/// <param name="lParam"></param>
|
||||
|
@ -109,6 +210,25 @@ namespace Win32API
|
|||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern bool SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
|
||||
/// <summary>
|
||||
/// 发送消息
|
||||
/// </summary>
|
||||
/// <param name="hwnd"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="wParam"></param>
|
||||
/// <param name="IParam"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll", EntryPoint = "SendMessage")]
|
||||
public static extern int SendMessage(IntPtr hwnd, int msg, int wParam, ref COPYDATASTRUCT IParam);
|
||||
/// <summary>
|
||||
/// 发送消息
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="wParam"></param>
|
||||
/// <param name="IParam"></param>
|
||||
[DllImport("user32.dll")]
|
||||
public static extern void PostMessage(IntPtr hWnd, int msg, int wParam, ref COPYDATASTRUCT IParam);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
|
@ -122,7 +242,14 @@ namespace Win32API
|
|||
/// <returns></returns>
|
||||
[DllImport("user32", CharSet = CharSet.Auto)]
|
||||
public static extern bool IsWindowVisible(IntPtr hwnd);
|
||||
|
||||
/// <summary>
|
||||
/// 查找窗口
|
||||
/// </summary>
|
||||
/// <param name="lpClassName"></param>
|
||||
/// <param name="lpWindowName"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport("User32.dll", EntryPoint = "FindWindow")]
|
||||
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
|
||||
/// <summary>
|
||||
/// The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window.
|
||||
/// </summary>
|
||||
|
@ -218,7 +345,7 @@ namespace Win32API
|
|||
[DllImport("user32", CharSet = CharSet.Auto)]
|
||||
public static extern bool GetWindowRect(
|
||||
IntPtr hWnd,
|
||||
[In, Out] ref Rectangle rect);
|
||||
out Rectangle rect);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
Binary file not shown.
Binary file not shown.
91
Source/ryControls/Gdu.WinFormUI/Common/ButtonColorTable.cs
Normal file
91
Source/ryControls/Gdu.WinFormUI/Common/ButtonColorTable.cs
Normal file
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class ButtonColorTable
|
||||
{
|
||||
public Color BorderColorNormal { get; set; }
|
||||
public Color BorderColorHover { get; set; }
|
||||
public Color BorderColorPressed { get; set; }
|
||||
public Color BorderColorDisabled { get; set; }
|
||||
|
||||
public Color BackColorNormal { get; set; }
|
||||
public Color BackColorHover { get; set; }
|
||||
public Color BackColorPressed { get; set; }
|
||||
public Color BackColorDisabled { get; set; }
|
||||
|
||||
public Color ForeColorNormal { get; set; }
|
||||
public Color ForeColorHover { get; set; }
|
||||
public Color ForeColorPressed { get; set; }
|
||||
public Color ForeColorDisabled { get; set; }
|
||||
|
||||
public ButtonColorTable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static ButtonColorTable DefaultTable()
|
||||
{
|
||||
ButtonColorTable table = new ButtonColorTable();
|
||||
|
||||
table.ForeColorNormal = table.ForeColorHover = table.ForeColorPressed = Color.Black;
|
||||
|
||||
table.BackColorNormal = Color.LightPink;
|
||||
table.BackColorHover = Color.HotPink;
|
||||
table.BackColorPressed = Color.DeepPink;
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
public static ButtonColorTable GetDefaultCloseBtnColor()
|
||||
{
|
||||
ButtonColorTable table = new ButtonColorTable();
|
||||
|
||||
table.ForeColorNormal = Color.Black;
|
||||
table.ForeColorHover = table.ForeColorPressed = Color.White;
|
||||
table.BackColorNormal = Color.Transparent;
|
||||
table.BackColorHover = Color.FromArgb(241,157,147);
|
||||
table.BackColorPressed = Color.FromArgb(217,98,98);
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
public static ButtonColorTable GetColorTableVs2013Theme()
|
||||
{
|
||||
ButtonColorTable table = new ButtonColorTable();
|
||||
|
||||
table.ForeColorNormal = table.ForeColorHover = table.ForeColorPressed = Color.Black;
|
||||
table.BackColorHover = Color.FromArgb(255, 252, 244);
|
||||
table.BackColorPressed = Color.FromArgb(255, 232, 166);
|
||||
table.BorderColorHover = table.BorderColorPressed = Color.FromArgb(229, 195, 101);
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
public static ButtonColorTable GetDevWhiteThemeMinMaxBtnColor()
|
||||
{
|
||||
ButtonColorTable maxTable = new ButtonColorTable();
|
||||
maxTable.ForeColorNormal = Color.Black;
|
||||
maxTable.ForeColorHover = maxTable.ForeColorPressed = Color.White;
|
||||
maxTable.BackColorNormal = Color.Transparent;
|
||||
maxTable.BackColorHover = Color.FromArgb(54, 101, 179);
|
||||
maxTable.BackColorPressed = Color.FromArgb(44, 88, 161);
|
||||
return maxTable;
|
||||
}
|
||||
|
||||
public static ButtonColorTable GetDevWhiteThemeCloseBtnColor()
|
||||
{
|
||||
ButtonColorTable closeTable = new ButtonColorTable();
|
||||
closeTable.ForeColorNormal = closeTable.ForeColorHover = closeTable.ForeColorPressed
|
||||
= ColorHelper.GetDarkerColor(Color.White, 5);
|
||||
closeTable.BackColorNormal = Color.FromArgb(199, 80, 80);
|
||||
closeTable.BackColorHover = Color.FromArgb(224, 67, 67);
|
||||
closeTable.BackColorPressed = Color.FromArgb(153, 61, 61);
|
||||
return closeTable;
|
||||
}
|
||||
}
|
||||
}
|
45
Source/ryControls/Gdu.WinFormUI/Common/Common.cs
Normal file
45
Source/ryControls/Gdu.WinFormUI/Common/Common.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public delegate GraphicsPath ButtonForePathGetter(Rectangle rect);
|
||||
public enum GMButtonState
|
||||
{
|
||||
Normal,
|
||||
Hover,
|
||||
Pressed,
|
||||
PressLeave,
|
||||
}
|
||||
|
||||
public enum ButtonBorderType
|
||||
{
|
||||
Rectangle,
|
||||
Ellipse,
|
||||
}
|
||||
|
||||
public enum MouseOperationType
|
||||
{
|
||||
Move,
|
||||
Down,
|
||||
Up,
|
||||
Hover,
|
||||
Leave,
|
||||
}
|
||||
|
||||
public enum ForePathRatoteDirection
|
||||
{
|
||||
Down,
|
||||
Left,
|
||||
Up,
|
||||
Right,
|
||||
}
|
||||
|
||||
public enum ForePathRenderMode
|
||||
{
|
||||
Draw,
|
||||
Fill,
|
||||
}
|
||||
}
|
195
Source/ryControls/Gdu.WinFormUI/Forms/ControlBoxManager.cs
Normal file
195
Source/ryControls/Gdu.WinFormUI/Forms/ControlBoxManager.cs
Normal file
|
@ -0,0 +1,195 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class ControlBoxManager
|
||||
{
|
||||
private GMForm _owner;
|
||||
|
||||
private WLButton closeBtn;
|
||||
private WLButton maxBtn;
|
||||
private WLButton resBtn;
|
||||
private WLButton minBtn;
|
||||
|
||||
#region event handler
|
||||
|
||||
private void CloseBtnClick(object sender, EventArgs e)
|
||||
{
|
||||
_owner.Close();
|
||||
}
|
||||
|
||||
private void MaxBtnClick(object sender, EventArgs e)
|
||||
{
|
||||
_owner.WindowState = FormWindowState.Maximized;
|
||||
}
|
||||
|
||||
private void ResBtnClick(object sender, EventArgs e)
|
||||
{
|
||||
_owner.WindowState = FormWindowState.Normal;
|
||||
}
|
||||
|
||||
private void MinBtnClick(object sender, EventArgs e)
|
||||
{
|
||||
_owner.WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void SetControlBoxColor()
|
||||
{
|
||||
|
||||
closeBtn.ColorTable = _owner.XTheme.CloseBoxColor;
|
||||
closeBtn.BackImageNormal = _owner.XTheme.CloseBoxBackImageNormal;
|
||||
closeBtn.BackImageHover = _owner.XTheme.CloseBoxBackImageHover;
|
||||
closeBtn.BackImagePressed = _owner.XTheme.CloseBoxBackImagePressed;
|
||||
|
||||
// max res box
|
||||
if (_owner.MaximizeBox)
|
||||
{
|
||||
maxBtn.ColorTable = _owner.XTheme.MaxBoxColor;
|
||||
maxBtn.BackImageNormal = _owner.XTheme.MaxBoxBackImageNormal;
|
||||
maxBtn.BackImageHover = _owner.XTheme.MaxBoxBackImageHover;
|
||||
maxBtn.BackImagePressed = _owner.XTheme.MaxBoxBackImagePressed;
|
||||
|
||||
resBtn.ColorTable = _owner.XTheme.MaxBoxColor;
|
||||
resBtn.BackImageNormal = _owner.XTheme.ResBoxBackImageNormal;
|
||||
resBtn.BackImageHover = _owner.XTheme.ResBoxBackImageHover;
|
||||
resBtn.BackImagePressed = _owner.XTheme.ResBoxBackImagePressed;
|
||||
}
|
||||
|
||||
// min box
|
||||
if (_owner.MinimizeBox)
|
||||
{
|
||||
minBtn.ColorTable = _owner.XTheme.MinBoxColor;
|
||||
minBtn.BackImageNormal = _owner.XTheme.MinBoxBackImageNormal;
|
||||
minBtn.BackImageHover = _owner.XTheme.MinBoxBackImageHover;
|
||||
minBtn.BackImagePressed = _owner.XTheme.MinBoxBackImagePressed;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void BtnIni()
|
||||
{
|
||||
// close box
|
||||
closeBtn = new WLButton(_owner);
|
||||
closeBtn.Visible = true;
|
||||
closeBtn.Bounds = _owner.CloseBoxRect;
|
||||
|
||||
closeBtn.Click += new EventHandler(CloseBtnClick);
|
||||
closeBtn.ForePathGetter = new ButtonForePathGetter(
|
||||
GraphicsPathHelper.CreateCloseFlagPath);
|
||||
|
||||
// max res box
|
||||
if (_owner.MaximizeBox)
|
||||
{
|
||||
maxBtn = new WLButton(_owner);
|
||||
resBtn = new WLButton(_owner);
|
||||
|
||||
if (_owner.WindowState == FormWindowState.Normal)
|
||||
{
|
||||
maxBtn.Visible = true;
|
||||
resBtn.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
maxBtn.Visible = false;
|
||||
resBtn.Visible = true;
|
||||
}
|
||||
|
||||
maxBtn.Bounds = _owner.MaxBoxRect;
|
||||
resBtn.Bounds = _owner.MaxBoxRect;
|
||||
|
||||
maxBtn.Click += new EventHandler(MaxBtnClick);
|
||||
maxBtn.ForePathGetter = new ButtonForePathGetter(
|
||||
GraphicsPathHelper.CreateMaximizeFlagPath);
|
||||
|
||||
resBtn.Click += new EventHandler(ResBtnClick);
|
||||
resBtn.ForePathGetter = new ButtonForePathGetter(
|
||||
GraphicsPathHelper.CreateRestoreFlagPath);
|
||||
}
|
||||
|
||||
// min box
|
||||
if (_owner.MinimizeBox)
|
||||
{
|
||||
minBtn = new WLButton(_owner);
|
||||
|
||||
minBtn.Visible = true;
|
||||
minBtn.Bounds = _owner.MinBoxRect;
|
||||
|
||||
minBtn.Click += new EventHandler(MinBtnClick);
|
||||
minBtn.ForePathGetter = new ButtonForePathGetter(
|
||||
GraphicsPathHelper.CreateMinimizeFlagPath);
|
||||
}
|
||||
|
||||
SetControlBoxColor();
|
||||
}
|
||||
|
||||
public ControlBoxManager(GMForm owner)
|
||||
{
|
||||
_owner = owner;
|
||||
BtnIni();
|
||||
}
|
||||
|
||||
public void FormResize()
|
||||
{
|
||||
if(maxBtn != null)
|
||||
{
|
||||
if (_owner.WindowState == FormWindowState.Normal)
|
||||
{
|
||||
maxBtn.Visible = true;
|
||||
resBtn.Visible = false;
|
||||
resBtn.State = GMButtonState.Normal;
|
||||
}
|
||||
else
|
||||
{
|
||||
resBtn.Visible = true;
|
||||
maxBtn.Visible = false;
|
||||
maxBtn.State = GMButtonState.Normal;
|
||||
}
|
||||
resBtn.Bounds = maxBtn.Bounds = _owner.MaxBoxRect;
|
||||
}
|
||||
if (minBtn != null)
|
||||
minBtn.Bounds = _owner.MinBoxRect;
|
||||
closeBtn.Bounds = _owner.CloseBoxRect;
|
||||
}
|
||||
|
||||
public void MouseOperation(Point location, MouseOperationType type)
|
||||
{
|
||||
closeBtn.MouseOperation(location, type);
|
||||
if (maxBtn != null && maxBtn.Visible)
|
||||
maxBtn.MouseOperation(location, type);
|
||||
if(resBtn!=null && resBtn.Visible)
|
||||
resBtn.MouseOperation(location, type);
|
||||
if(minBtn!=null)
|
||||
minBtn.MouseOperation(location, type);
|
||||
}
|
||||
|
||||
public void DrawBoxes(Graphics g)
|
||||
{
|
||||
if (_owner.ControlBox)
|
||||
{
|
||||
closeBtn.DrawButton(g);
|
||||
if (_owner.MinimizeBox && minBtn != null)
|
||||
minBtn.DrawButton(g);
|
||||
if (_owner.MaximizeBox)
|
||||
{
|
||||
if (maxBtn != null & maxBtn.Visible)
|
||||
maxBtn.DrawButton(g);
|
||||
if (resBtn != null && resBtn.Visible)
|
||||
resBtn.DrawButton(g);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetBoxColor()
|
||||
{
|
||||
SetControlBoxColor();
|
||||
}
|
||||
}
|
||||
}
|
38
Source/ryControls/Gdu.WinFormUI/Forms/GMForm.Designer.cs
generated
Normal file
38
Source/ryControls/Gdu.WinFormUI/Forms/GMForm.Designer.cs
generated
Normal file
|
@ -0,0 +1,38 @@
|
|||
namespace MGdu.WinFormUI
|
||||
{
|
||||
partial class GMForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Text = "GMForm";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
1679
Source/ryControls/Gdu.WinFormUI/Forms/GMForm.cs
Normal file
1679
Source/ryControls/Gdu.WinFormUI/Forms/GMForm.cs
Normal file
File diff suppressed because it is too large
Load Diff
47
Source/ryControls/Gdu.WinFormUI/Forms/GMShadow.Designer.cs
generated
Normal file
47
Source/ryControls/Gdu.WinFormUI/Forms/GMShadow.Designer.cs
generated
Normal file
|
@ -0,0 +1,47 @@
|
|||
namespace MGdu.WinFormUI
|
||||
{
|
||||
partial class GMShadow
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// GMShadow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 261);
|
||||
this.Name = "GMShadow";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.Text = "GMShadow";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
395
Source/ryControls/Gdu.WinFormUI/Forms/GMShadow.cs
Normal file
395
Source/ryControls/Gdu.WinFormUI/Forms/GMShadow.cs
Normal file
|
@ -0,0 +1,395 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using MGdu.WinFormUI.Win32;
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
internal partial class GMShadow : Form
|
||||
{
|
||||
private GMForm _owner;
|
||||
private bool _timeToResizeOwner;
|
||||
|
||||
public GMShadow(GMForm owner)
|
||||
{
|
||||
_owner = owner;
|
||||
_timeToResizeOwner = false;
|
||||
InitializeComponent();
|
||||
FormIni();
|
||||
}
|
||||
|
||||
public void BeginToResizeOwner()
|
||||
{
|
||||
_timeToResizeOwner = true;
|
||||
}
|
||||
|
||||
private void FormIni()
|
||||
{
|
||||
base.FormBorderStyle = FormBorderStyle.None;
|
||||
base.WindowState = FormWindowState.Normal;
|
||||
base.ShowInTaskbar = false;
|
||||
SetStyle(
|
||||
ControlStyles.UserPaint |
|
||||
ControlStyles.AllPaintingInWmPaint |
|
||||
ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.ResizeRedraw |
|
||||
ControlStyles.DoubleBuffer, true);
|
||||
UpdateStyles();
|
||||
base.AutoScaleMode = AutoScaleMode.None;
|
||||
}
|
||||
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
get
|
||||
{
|
||||
CreateParams cp = base.CreateParams;
|
||||
cp.ExStyle |= (int)Win32.WinAPI.WindowStyleEx.WS_EX_LAYERED;
|
||||
return cp;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetFormReion()
|
||||
{
|
||||
if (base.Region != null)
|
||||
base.Region.Dispose();
|
||||
|
||||
using (GraphicsPath path = GraphicsPathHelper.CreateRoundedRect(
|
||||
new Rectangle(Point.Empty, base.Size), 16, RoundStyle.All, false))
|
||||
{
|
||||
this.Region = new Region(path);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetOwnerSize()
|
||||
{
|
||||
var size = base.Size;
|
||||
size.Width -= ShadowWidth * 2;
|
||||
size.Height -= ShadowWidth * 2;
|
||||
if (_owner.Size != size)
|
||||
{
|
||||
_owner.Size = size;
|
||||
_owner.Update();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetOwnerLocation()
|
||||
{
|
||||
Point location = base.Location;
|
||||
location.Offset(ShadowWidth, ShadowWidth);
|
||||
if (_owner.Location != location)
|
||||
{
|
||||
_owner.Location = location;
|
||||
_owner.Update();
|
||||
}
|
||||
}
|
||||
|
||||
#region properties from owner
|
||||
|
||||
private int ShadowWidth
|
||||
{
|
||||
get { return _owner.XTheme.ShadowWidth; }
|
||||
}
|
||||
|
||||
private bool UseShadowToResize
|
||||
{
|
||||
get { return _owner.XTheme.UseShadowToResize; }
|
||||
}
|
||||
|
||||
private Color ShadowColor
|
||||
{
|
||||
get { return _owner.XTheme.ShadowColor; }
|
||||
}
|
||||
|
||||
private int ShadowAValueDark
|
||||
{
|
||||
get { return _owner.XTheme.ShadowAValueDark; }
|
||||
}
|
||||
|
||||
private int ShadowAValueLight
|
||||
{
|
||||
get { return _owner.XTheme.ShadowAValueLight; }
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region resize rect region
|
||||
|
||||
private Rectangle TopLeftRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(0, 0, ShadowWidth, ShadowWidth);
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle TopRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(
|
||||
ShadowWidth,
|
||||
0,
|
||||
this.Size.Width - ShadowWidth * 2,
|
||||
ShadowWidth);
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle TopRightRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(
|
||||
this.Size.Width - ShadowWidth,
|
||||
0,
|
||||
ShadowWidth,
|
||||
ShadowWidth);
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle LeftRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(
|
||||
0,
|
||||
ShadowWidth,
|
||||
ShadowWidth,
|
||||
this.Size.Height - ShadowWidth * 2);
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle RightRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(
|
||||
this.Size.Width - ShadowWidth,
|
||||
ShadowWidth,
|
||||
ShadowWidth,
|
||||
this.Size.Height - ShadowWidth * 2);
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle BottomLeftRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(
|
||||
0,
|
||||
this.Size.Height - ShadowWidth,
|
||||
ShadowWidth,
|
||||
ShadowWidth);
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle BottomRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(
|
||||
ShadowWidth,
|
||||
this.Size.Height - ShadowWidth,
|
||||
this.Size.Width - ShadowWidth * 2,
|
||||
ShadowWidth);
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle BottomRightRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(
|
||||
this.Size.Width - ShadowWidth,
|
||||
this.Size.Height - ShadowWidth,
|
||||
ShadowWidth,
|
||||
ShadowWidth);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void DrawShadow(Graphics g)
|
||||
{
|
||||
int aDark = ShadowAValueDark;
|
||||
int aLight = ShadowAValueLight;
|
||||
if (aDark < 0)
|
||||
aDark = 0;
|
||||
if (aDark > 180)
|
||||
aDark = 180;
|
||||
if (aLight < 0)
|
||||
aLight = 0;
|
||||
if (aLight > 180)
|
||||
aLight = 180;
|
||||
if (aLight > aDark)
|
||||
{
|
||||
int t = aLight;
|
||||
aLight = aDark;
|
||||
aDark = t;
|
||||
}
|
||||
|
||||
int diff = (aDark - aLight) / ShadowWidth;
|
||||
Rectangle rect = base.ClientRectangle;
|
||||
rect.Width--;
|
||||
rect.Height--;
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
for (int i = 0; i < ShadowWidth; i++)
|
||||
{
|
||||
using (Pen p = new Pen(Color.FromArgb(aLight + diff * i, ShadowColor)))
|
||||
{
|
||||
g.DrawRectangle(p, rect);
|
||||
}
|
||||
rect.Inflate(-1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
internal void RefleshLayeredForm()
|
||||
{
|
||||
Bitmap formBitMap = new Bitmap(base.Width, base.Height);
|
||||
Graphics g = Graphics.FromImage(formBitMap);
|
||||
|
||||
DrawShadow(g);
|
||||
|
||||
Win32.WinAPI.POINT ptSrc = new Win32.WinAPI.POINT(0, 0);
|
||||
Win32.WinAPI.POINT ptWinPos = new Win32.WinAPI.POINT(base.Left, base.Top);
|
||||
Win32.WinAPI.SIZE szWinSize = new Win32.WinAPI.SIZE(Width, Height);
|
||||
byte biAlpha = 0xFF;
|
||||
Win32.WinAPI.BLENDFUNCTION stBlend = new Win32.WinAPI.BLENDFUNCTION(
|
||||
(byte)Win32.WinAPI.BlendOp.AC_SRC_OVER, 0, biAlpha, (byte)Win32.WinAPI.BlendOp.AC_SRC_ALPHA);
|
||||
|
||||
IntPtr gdiBitMap = IntPtr.Zero;
|
||||
IntPtr memoryDC = IntPtr.Zero;
|
||||
IntPtr preBits = IntPtr.Zero;
|
||||
IntPtr screenDC = IntPtr.Zero;
|
||||
|
||||
try
|
||||
{
|
||||
screenDC = Win32.WinAPI.GetDC(IntPtr.Zero);
|
||||
memoryDC = Win32.WinAPI.CreateCompatibleDC(screenDC);
|
||||
|
||||
gdiBitMap = formBitMap.GetHbitmap(Color.FromArgb(0));
|
||||
|
||||
preBits = Win32.WinAPI.SelectObject(memoryDC, gdiBitMap);
|
||||
Win32.WinAPI.UpdateLayeredWindow(base.Handle
|
||||
, screenDC
|
||||
, ref ptWinPos
|
||||
, ref szWinSize
|
||||
, memoryDC
|
||||
, ref ptSrc
|
||||
, 0
|
||||
, ref stBlend
|
||||
, (uint)Win32.WinAPI.ULWPara.ULW_ALPHA);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (gdiBitMap != IntPtr.Zero)
|
||||
{
|
||||
Win32.WinAPI.SelectObject(memoryDC, preBits);
|
||||
Win32.WinAPI.DeleteObject(gdiBitMap);
|
||||
}
|
||||
|
||||
Win32.WinAPI.DeleteDC(memoryDC);
|
||||
Win32.WinAPI.ReleaseDC(IntPtr.Zero, screenDC);
|
||||
g.Dispose();
|
||||
formBitMap.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void WmNcHitTest(ref Message m)
|
||||
{
|
||||
int para = m.LParam.ToInt32();
|
||||
int x0 = Win32.WinAPI.LOWORD(para);
|
||||
int y0 = Win32.WinAPI.HIWORD(para);
|
||||
Point p = PointToClient(new Point(x0, y0));
|
||||
|
||||
if (UseShadowToResize)
|
||||
{
|
||||
if (TopLeftRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTTOPLEFT);
|
||||
return ;
|
||||
}
|
||||
|
||||
if (TopRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTTOP);
|
||||
return ;
|
||||
}
|
||||
|
||||
if (TopRightRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTTOPRIGHT);
|
||||
return ;
|
||||
}
|
||||
|
||||
if (LeftRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTLEFT);
|
||||
return ;
|
||||
}
|
||||
|
||||
if (RightRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTRIGHT);
|
||||
return ;
|
||||
}
|
||||
|
||||
if (BottomLeftRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTBOTTOMLEFT);
|
||||
return ;
|
||||
}
|
||||
|
||||
if (BottomRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTBOTTOM);
|
||||
return ;
|
||||
}
|
||||
|
||||
if (BottomRightRect.Contains(p))
|
||||
{
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTBOTTOMRIGHT);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
m.Result = new IntPtr((int)Win32.WinAPI.NCHITTEST.HTCLIENT);
|
||||
return ;
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == (int)Win32.WinAPI.WindowMessages.WM_NCHITTEST)
|
||||
{
|
||||
WmNcHitTest(ref m);
|
||||
return;
|
||||
}
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
{
|
||||
base.OnSizeChanged(e);
|
||||
RefleshLayeredForm();
|
||||
SetFormReion();
|
||||
if (UseShadowToResize && _timeToResizeOwner && _owner.WindowState == FormWindowState.Normal)
|
||||
SetOwnerSize();
|
||||
}
|
||||
|
||||
protected override void OnLocationChanged(EventArgs e)
|
||||
{
|
||||
base.OnLocationChanged(e);
|
||||
if (UseShadowToResize && _timeToResizeOwner && _owner.WindowState == FormWindowState.Normal)
|
||||
SetOwnerLocation();
|
||||
}
|
||||
}
|
||||
}
|
120
Source/ryControls/Gdu.WinFormUI/Forms/GMShadow.resx
Normal file
120
Source/ryControls/Gdu.WinFormUI/Forms/GMShadow.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
1367
Source/ryControls/Gdu.WinFormUI/Forms/MdiBarController.cs
Normal file
1367
Source/ryControls/Gdu.WinFormUI/Forms/MdiBarController.cs
Normal file
File diff suppressed because it is too large
Load Diff
575
Source/ryControls/Gdu.WinFormUI/Forms/ThemeFormBase.cs
Normal file
575
Source/ryControls/Gdu.WinFormUI/Forms/ThemeFormBase.cs
Normal file
|
@ -0,0 +1,575 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
/// <summary>
|
||||
/// 该类封装设置一个主题所需的信息,可以继承该类实现不同的主题
|
||||
/// </summary>
|
||||
public class ThemeFormBase
|
||||
{
|
||||
#region about theme
|
||||
|
||||
/// <summary>
|
||||
/// 主题名称,用于标识主题,对主题进行简单描述
|
||||
/// </summary>
|
||||
public string ThemeName { protected set; get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public info
|
||||
|
||||
// form shape about
|
||||
|
||||
/// <summary>
|
||||
/// 窗体边界大小,鼠标移动到该边界将变成指针形状,拖动可改变窗体大小
|
||||
/// </summary>
|
||||
public int SideResizeWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体边框大小
|
||||
/// </summary>
|
||||
public int BorderWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体标题栏高度
|
||||
/// </summary>
|
||||
public int CaptionHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题栏图标与窗体左边框的距离
|
||||
/// </summary>
|
||||
public int IconLeftMargin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题栏图标尺寸
|
||||
/// </summary>
|
||||
public Size IconSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题栏文本左边距
|
||||
/// </summary>
|
||||
public int TextLeftMargin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 控制按钮(关闭按钮)相对于窗体右上角的偏移量
|
||||
/// </summary>
|
||||
public Point ControlBoxOffset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体关闭按钮的尺寸
|
||||
/// </summary>
|
||||
public Size CloseBoxSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体最大化/还原按钮的大小
|
||||
/// </summary>
|
||||
public Size MaxBoxSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体最小化按钮的大小
|
||||
/// </summary>
|
||||
public Size MinBoxSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关闭/最大化/最小化按钮之间的距离,可以设置成负值使它们重叠
|
||||
/// </summary>
|
||||
public int ControlBoxSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体圆角程度
|
||||
/// </summary>
|
||||
public int Radius { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体圆角样式
|
||||
/// </summary>
|
||||
public RoundStyle RoundedStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用默认的圆角样式,该样式为左上角和右上角圆角,
|
||||
/// 最好在窗体边框较粗时才使用该样式
|
||||
/// </summary>
|
||||
public bool UseDefaultTopRoundingFormRegion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否在标题栏上绘制图标
|
||||
/// </summary>
|
||||
public bool DrawCaptionIcon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否在标题栏上绘制文本
|
||||
/// </summary>
|
||||
public bool DrawCaptionText { get; set; }
|
||||
|
||||
// form shadow
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示窗体阴影
|
||||
/// </summary>
|
||||
public bool ShowShadow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体阴影大小
|
||||
/// </summary>
|
||||
public int ShadowWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拖动窗体阴影是否可以改变窗体大小
|
||||
/// </summary>
|
||||
public bool UseShadowToResize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阴影的颜色,可以设置成其他颜色而不一定是黑色
|
||||
/// </summary>
|
||||
public Color ShadowColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阴影从里到外是逐渐变浅的,这个值设置深色部分的透明度,ARGB中的A值
|
||||
/// </summary>
|
||||
public int ShadowAValueDark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阴影从里到外是逐渐变浅的,这个值设置浅色部分的透明度,ARGB中的A值
|
||||
/// </summary>
|
||||
public int ShadowAValueLight { get; set; }
|
||||
|
||||
// form other
|
||||
|
||||
/// <summary>
|
||||
/// 是否在客户区边界画线使其看起来有立体感
|
||||
/// </summary>
|
||||
public bool SetClientInset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体标题栏文字是否居中显示
|
||||
/// </summary>
|
||||
public bool CaptionTextCenter { get; set; }
|
||||
|
||||
// form color
|
||||
|
||||
/// <summary>
|
||||
/// 窗体边框最外一像素的颜色
|
||||
/// </summary>
|
||||
public Color FormBorderOutterColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体边框第二最外像素的颜色
|
||||
/// </summary>
|
||||
public Color FormBorderInnerColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体边框其他部分颜色,如果窗体边框大小大于2,则其他像素将用此颜色画出
|
||||
/// </summary>
|
||||
public Color FormBorderInmostColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题栏颜色是从上到下渐变的,这个值设置上边的颜色值
|
||||
/// </summary>
|
||||
public Color CaptionBackColorTop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题栏颜色是从上到下渐变的,这个值设置下边的颜色值
|
||||
/// </summary>
|
||||
public Color CaptionBackColorBottom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题栏文字颜色
|
||||
/// </summary>
|
||||
public Color CaptionTextColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体背景颜色,该值将覆盖窗体自带的BackColor属性值
|
||||
/// </summary>
|
||||
public Color FormBackColor { get; set; }
|
||||
|
||||
// control-box color table
|
||||
/// <summary>
|
||||
/// 窗体关闭按钮的颜色集合
|
||||
/// </summary>
|
||||
public ButtonColorTable CloseBoxColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体最大化/还原按钮的颜色集合
|
||||
/// </summary>
|
||||
public ButtonColorTable MaxBoxColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 窗体最小化按钮的颜色集合
|
||||
/// </summary>
|
||||
public ButtonColorTable MinBoxColor { get; set; }
|
||||
|
||||
// control-box image
|
||||
/// <summary>
|
||||
/// 默认状态下关闭按钮背景图片
|
||||
/// </summary>
|
||||
public Image CloseBoxBackImageNormal { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移过去时关闭按钮背景图片
|
||||
/// </summary>
|
||||
public Image CloseBoxBackImageHover { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标按下时关闭按钮背景图片
|
||||
/// </summary>
|
||||
public Image CloseBoxBackImagePressed { get; set; }
|
||||
/// <summary>
|
||||
/// 默认状态下最大化按钮背景图片
|
||||
/// </summary>
|
||||
public Image MaxBoxBackImageNormal { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移过去时最大化按钮背景图片
|
||||
/// </summary>
|
||||
public Image MaxBoxBackImageHover { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标按下时最大化按钮背景图片
|
||||
/// </summary>
|
||||
public Image MaxBoxBackImagePressed { get; set; }
|
||||
/// <summary>
|
||||
/// 默认状态下恢复按钮背景图片
|
||||
/// </summary>
|
||||
public Image ResBoxBackImageNormal { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移过去时恢复按钮背景图片
|
||||
/// </summary>
|
||||
public Image ResBoxBackImageHover { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标按下时恢复按钮背景图片
|
||||
/// </summary>
|
||||
public Image ResBoxBackImagePressed { get; set; }
|
||||
/// <summary>
|
||||
/// 默认状态下最小化按钮背景图片
|
||||
/// </summary>
|
||||
public Image MinBoxBackImageNormal { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标移过去时最小化按钮背景图片
|
||||
/// </summary>
|
||||
public Image MinBoxBackImageHover { get; set; }
|
||||
/// <summary>
|
||||
/// 鼠标按下时最小化按钮背景图片
|
||||
/// </summary>
|
||||
public Image MinBoxBackImagePressed { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region mdi support
|
||||
|
||||
// bar overall ---------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// 是否用SendMessage的方式切换子窗体,以避免子窗体切换时产生的闪烁
|
||||
/// </summary>
|
||||
public bool Mdi_UseMsgToActivateChild { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Mdi-Bar与窗体左、上、右边界的距离,只用到这三个值,Bottom值没用到。
|
||||
/// 用这三个值来确定Mdi-Bar的宽度及其在窗体中的位置
|
||||
/// </summary>
|
||||
public Padding Mdi_BarMargin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 内部左边空白,第一个标签将从这个空白距离之后开始
|
||||
/// </summary>
|
||||
public int Mdi_BarLeftPadding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签栏内部右边空白
|
||||
/// </summary>
|
||||
public int Mdi_BarRightPadding { get; set; }
|
||||
/// <summary>
|
||||
/// 标签栏背景颜色
|
||||
/// </summary>
|
||||
public Color Mdi_BarBackColor { get; set; }
|
||||
/// <summary>
|
||||
/// 标签栏边框颜色
|
||||
/// </summary>
|
||||
public Color Mdi_BarBorderColor { get; set; }
|
||||
/// <summary>
|
||||
/// 标签栏背景图片
|
||||
/// </summary>
|
||||
public bool Mdi_DrawBarBackground { get; set; }
|
||||
/// <summary>
|
||||
/// 是否显示标签栏边框
|
||||
/// </summary>
|
||||
public bool Mdi_DrawBarBorder { get; set; }
|
||||
|
||||
// bar bottom region--------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// 标签栏下边区域的背景颜色
|
||||
/// </summary>
|
||||
public Color Mdi_BarBottomRegionBackColor { get; set; }
|
||||
/// <summary>
|
||||
/// 标签栏下边区域的高度
|
||||
/// </summary>
|
||||
public int Mdi_BarBottomRegionHeight { get; set; }
|
||||
|
||||
|
||||
// tab ----------------------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// 标签高度
|
||||
/// </summary>
|
||||
public int Mdi_TabHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 被选中的标签高度,可以设置成与TabHeight不一样的值,以突出显示被选中状态
|
||||
/// </summary>
|
||||
public int Mdi_TabHeightActive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签之间的距离,设成负值可以使标签有重叠的效果
|
||||
/// </summary>
|
||||
public int Mdi_TabAndTabSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签的最大宽度,任何情况下标签都不能超过这个宽度
|
||||
/// </summary>
|
||||
public int Mdi_TabMaxWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签正常宽度,如果标签需要很短的宽度(比如20像素)就可以显示完上面的文字,
|
||||
/// 但是Mdi-Bar上有足够的空间时,标签会以正常宽度(比如100像素)显示
|
||||
/// </summary>
|
||||
public int Mdi_TabNormalWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签最小宽度,当标签小于这个宽度时将被隐藏
|
||||
/// </summary>
|
||||
public int Mdi_TabMinWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签梯度大小,标签可以不以矩形方式显示,而是有一个梯度/斜度。
|
||||
/// </summary>
|
||||
public int Mdi_TabSlopeWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签顶部空白,这个值用于参与计算Mdi-Bar高度,计算方式为:
|
||||
/// Mdi-Bar Height = BottomRegionHeight + TabHeight + TabTopSpace
|
||||
/// </summary>
|
||||
public int Mdi_TabTopSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签上是否显示子窗体图标
|
||||
/// </summary>
|
||||
public bool Mdi_ShowTabIcon { get; set; }
|
||||
/// <summary>
|
||||
/// 标签上是否显示子窗体关闭图标
|
||||
/// </summary>
|
||||
public bool Mdi_ShowTabCloseIcon { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 选中状态的标签的上部背景色,与下部背景色不同时,标签背景色就有渐变效果
|
||||
/// </summary>
|
||||
public Color Mdi_TabActiveBackColorTop { get; set; }
|
||||
/// <summary>
|
||||
/// 选中状态的标签的下部背景色,与上部背景色不同时,标签背景色就有渐变效果
|
||||
/// </summary>
|
||||
public Color Mdi_TabActiveBackColorBottom { get; set; }
|
||||
/// <summary>
|
||||
/// 标签激活时字体颜色
|
||||
/// </summary>
|
||||
public Color Mdi_TabActiveForeColor { get; set; } = Color.Black;
|
||||
/// <summary>
|
||||
/// 非选中状态的标签的字体颜色
|
||||
/// </summary>
|
||||
public Color Mdi_TabDeactiveForeColor { get; set; } = Color.Black;
|
||||
|
||||
/// <summary>
|
||||
/// 非选中状态的标签的上部背景色
|
||||
/// </summary>
|
||||
public Color Mdi_TabDeactiveBackColorTop { get; set; }
|
||||
/// <summary>
|
||||
/// 非选中状态的标签的下部背景色
|
||||
/// </summary>
|
||||
public Color Mdi_TabDeactiveBackColorBottom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签外边框颜色
|
||||
/// </summary>
|
||||
public Color Mdi_TabOutterBorderColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签内边框颜色,这个颜色一般具有一定的透明度
|
||||
/// </summary>
|
||||
public Color Mdi_TabInnerBorderColor { get; set; }
|
||||
/// <summary>
|
||||
/// 是否显示标签边框
|
||||
/// </summary>
|
||||
public bool Mdi_TabShowBorder { get; set; } = true;
|
||||
// new tab btn ---------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// 是否显示默认的新建标签按钮(NewTabBtn)
|
||||
/// </summary>
|
||||
public bool Mdi_ShowNewTabBtn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NewTabBtn与下边框的距离,这个值用来定位按钮的Y坐标
|
||||
/// </summary>
|
||||
public int Mdi_NewTabBtnBottomSpace { get; set; }
|
||||
/// <summary>
|
||||
/// 新建标签按钮与左边框的距离,这个值用来定位按钮的X坐标
|
||||
/// </summary>
|
||||
public int Mdi_NewTabBtnLeftSpace { get; set; }
|
||||
/// <summary>
|
||||
/// 新建标签按钮大小
|
||||
/// </summary>
|
||||
public Size Mdi_NewTabBtnSize { get; set; }
|
||||
/// <summary>
|
||||
/// 按钮颜色集合
|
||||
/// </summary>
|
||||
public ButtonColorTable Mdi_NewTabBtnColor { get; set; }
|
||||
|
||||
// list-all-btn ----------------------------------------------------------
|
||||
/// <summary>
|
||||
/// 是否一直显示ListAllBtn,即使在没有标签被隐藏的情况下
|
||||
/// </summary>
|
||||
public bool Mdi_AlwaysShowListAllBtn { get; set; }
|
||||
/// <summary>
|
||||
///《显示全部标签》按钮的位置
|
||||
/// </summary>
|
||||
public BarButtonAlignmentType Mdi_ListAllBtnAlign { get; set; }
|
||||
/// <summary>
|
||||
/// 《显示全部标签》按钮与下边框的距离,这个值用来定位按钮的Y坐标
|
||||
/// </summary>
|
||||
public int Mdi_ListAllBtnBottomSpace { get; set; }
|
||||
/// <summary>
|
||||
/// 《显示全部标签》按钮与左边框的距离,这个值用来定位按钮的X坐标
|
||||
/// </summary>
|
||||
public int Mdi_ListAllBtnLeftSpace { get; set; }
|
||||
/// <summary>
|
||||
/// 《显示全部标签》按钮的颜色
|
||||
/// </summary>
|
||||
public ButtonColorTable Mdi_ListAllBtnColor { get; set; }
|
||||
/// <summary>
|
||||
/// 《显示全部标签》按钮的大小
|
||||
/// </summary>
|
||||
public Size Mdi_ListAllBtnSize { get; set; }
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 皮肤主题
|
||||
/// </summary>
|
||||
public ThemeFormBase()
|
||||
{
|
||||
// about theme
|
||||
ThemeName = "Base Default Theme";
|
||||
|
||||
// form shape
|
||||
SideResizeWidth = 1;
|
||||
BorderWidth = 1;
|
||||
CaptionHeight = 26;
|
||||
IconLeftMargin = 2;
|
||||
IconSize = new Size(16, 16);
|
||||
TextLeftMargin = 2;
|
||||
ControlBoxOffset = new Point(1, 1);
|
||||
ControlBoxSpace = 2;
|
||||
Radius = 8;
|
||||
RoundedStyle = RoundStyle.None;
|
||||
UseDefaultTopRoundingFormRegion = true;
|
||||
DrawCaptionIcon = true;
|
||||
DrawCaptionText = true;
|
||||
|
||||
// form shadow
|
||||
ShowShadow = false;
|
||||
ShadowWidth = 1;
|
||||
ShadowColor = Color.Black;
|
||||
ShadowAValueDark = 80;
|
||||
ShadowAValueLight = 0;
|
||||
UseShadowToResize = false;
|
||||
|
||||
// form color
|
||||
//FormBorderInmostColor = FormBorderInnerColor = FormBorderOutterColor
|
||||
// = ColorHelper.GetLighterColor(Color.FromArgb(75, 159, 216), 10);
|
||||
//CaptionBackColorBottom = CaptionBackColorTop
|
||||
// = ColorHelper.GetLighterColor(Color.FromArgb(75, 159, 216), 10);
|
||||
//CaptionTextColor = Color.Black;
|
||||
//FormBackColor = SystemColors.Control;
|
||||
CaptionBackColorTop = Color.FromArgb(51, 76, 95);
|
||||
CaptionBackColorBottom = Color.FromArgb(51, 76, 95);
|
||||
FormBackColor = Color.FromArgb(242, 242, 242);
|
||||
CaptionTextColor = Color.White;
|
||||
FormBorderOutterColor = FormBorderInnerColor = Color.FromArgb(230, 230, 230);
|
||||
FormBorderInmostColor = Color.FromArgb(248, 248, 248);
|
||||
|
||||
// form other
|
||||
SetClientInset = true;
|
||||
CaptionTextCenter = false;
|
||||
|
||||
// control box color
|
||||
CloseBoxSize = MaxBoxSize = MinBoxSize = new Size(30, 23);
|
||||
ButtonColorTable closeTable = new ButtonColorTable();
|
||||
closeTable.ForeColorNormal = closeTable.ForeColorHover
|
||||
= closeTable.ForeColorPressed = Color.FromArgb(249, 240, 223);
|
||||
closeTable.BackColorHover = Color.FromArgb(217, 71, 71);
|
||||
closeTable.BackColorPressed = Color.FromArgb(188, 52, 52);
|
||||
CloseBoxColor = closeTable;
|
||||
Mdi_ShowTabCloseIcon = false;
|
||||
ButtonColorTable minTable = new ButtonColorTable();
|
||||
minTable.ForeColorNormal = minTable.ForeColorHover
|
||||
= minTable.ForeColorPressed = Color.FromArgb(249, 240, 223);
|
||||
minTable.BackColorHover = Color.FromArgb(67, 139, 221);
|
||||
minTable.BackColorPressed = Color.FromArgb(50, 125, 210);
|
||||
MinBoxColor = MaxBoxColor = minTable;
|
||||
Mdi_ShowNewTabBtn = false;
|
||||
|
||||
//CloseBoxColor = ButtonColorTable.GetDevWhiteThemeCloseBtnColor();
|
||||
//MaxBoxColor = ButtonColorTable.GetDevWhiteThemeMinMaxBtnColor();
|
||||
//MinBoxColor = MaxBoxColor;
|
||||
|
||||
#region mdi support
|
||||
|
||||
// bar overall
|
||||
Mdi_UseMsgToActivateChild = true;
|
||||
Mdi_BarMargin = new Padding(6, 38, 100, 0);
|
||||
Mdi_BarLeftPadding = 3;
|
||||
Mdi_BarRightPadding = 100;
|
||||
Mdi_BarBackColor = Color.LightSkyBlue;
|
||||
Mdi_BarBorderColor = Color.Red;
|
||||
Mdi_DrawBarBackground = false;
|
||||
Mdi_DrawBarBorder = false;
|
||||
|
||||
// bar bottom region
|
||||
Mdi_BarBottomRegionBackColor = Color.White;
|
||||
Mdi_BarBottomRegionHeight = 3;
|
||||
|
||||
// tab
|
||||
Mdi_TabHeight = 26;
|
||||
Mdi_TabHeightActive = Mdi_TabHeight;
|
||||
Mdi_TabSlopeWidth = 8;
|
||||
Mdi_TabAndTabSpace = -Mdi_TabSlopeWidth;
|
||||
Mdi_TabTopSpace = 2;
|
||||
Mdi_TabMaxWidth = 360;
|
||||
Mdi_TabNormalWidth = 180;
|
||||
Mdi_TabMinWidth = 90;
|
||||
Mdi_ShowTabIcon = true;
|
||||
|
||||
Mdi_TabOutterBorderColor = Color.Gray;
|
||||
Mdi_TabInnerBorderColor = Color.FromArgb(180, Color.White);
|
||||
Mdi_TabActiveBackColorTop = Color.White;
|
||||
Mdi_TabActiveBackColorBottom = Color.FromArgb(248, 248, 248);
|
||||
Mdi_TabDeactiveBackColorTop = Color.FromArgb(230, 230, 230);
|
||||
Mdi_TabDeactiveBackColorBottom = Color.FromArgb(230, 230, 230);
|
||||
|
||||
// new tab btn
|
||||
Mdi_ShowNewTabBtn = true;
|
||||
Mdi_NewTabBtnBottomSpace = 1;
|
||||
Mdi_NewTabBtnLeftSpace = 4;
|
||||
Mdi_NewTabBtnSize = new Size(24, 24);
|
||||
|
||||
ButtonColorTable NewTabBtnTable = new ButtonColorTable();
|
||||
NewTabBtnTable.ForeColorNormal = NewTabBtnTable.ForeColorHover
|
||||
= NewTabBtnTable.ForeColorPressed = Color.Gray;
|
||||
NewTabBtnTable.BackColorHover = Color.White;
|
||||
NewTabBtnTable.BackColorPressed = Color.WhiteSmoke;
|
||||
Mdi_NewTabBtnColor = NewTabBtnTable;
|
||||
// list all btn
|
||||
Mdi_AlwaysShowListAllBtn = false;
|
||||
Mdi_ListAllBtnAlign = BarButtonAlignmentType.Left;
|
||||
Mdi_ListAllBtnBottomSpace = Mdi_BarBottomRegionHeight + 4;
|
||||
Mdi_ListAllBtnLeftSpace = 4;
|
||||
Mdi_ListAllBtnSize = new Size(36, 18);
|
||||
Mdi_ListAllBtnColor = NewTabBtnTable;
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public abstract class GMBarControlBase : Control
|
||||
{
|
||||
public GMBarControlBase()
|
||||
{
|
||||
base.SetStyle(ControlStyles.UserPaint |
|
||||
ControlStyles.ResizeRedraw |
|
||||
ControlStyles.AllPaintingInWmPaint |
|
||||
ControlStyles.SupportsTransparentBackColor |
|
||||
ControlStyles.OptimizedDoubleBuffer, true);
|
||||
base.TabStop = false;
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override RightToLeft RightToLeft
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.RightToLeft;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.RightToLeft = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override Image BackgroundImage
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.BackgroundImage;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.BackgroundImage = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override ImageLayout BackgroundImageLayout
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.BackgroundImageLayout;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.BackgroundImageLayout = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override System.Drawing.Color ForeColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.ForeColor;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.ForeColor = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override Color BackColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.BackColor;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.BackColor = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override Font Font
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Font;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Font = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public enum GMControlType
|
||||
{
|
||||
Button,
|
||||
RadioButton,
|
||||
CheckBox,
|
||||
RollingBar,
|
||||
ProgressBar,
|
||||
TrackBar,
|
||||
ScrollBar,
|
||||
|
||||
GMTabStrip,
|
||||
|
||||
ListBox,
|
||||
ComboBox,
|
||||
|
||||
TreeView,
|
||||
ListView,
|
||||
GMGrid,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public interface IGMControl
|
||||
{
|
||||
GMControlType ControlType { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class GMProgessBarThemeBase : IDisposable
|
||||
{
|
||||
public Color BackColor { get; set; }
|
||||
public Color BorderColor { get; set; }
|
||||
public Color InnerBorderColor { get; set; }
|
||||
public Color CoveredColor { get; set; }
|
||||
public Color LeadingEdgeColor { get; set; }
|
||||
|
||||
public bool DrawInnerBorder { get; set; }
|
||||
public bool DrawLeadingEdge { get; set; }
|
||||
public bool DrawBackColorGlass { get; set; }
|
||||
public bool DrawCoveredColorGlass { get; set; }
|
||||
|
||||
public int BorderRadius { get; set; }
|
||||
public Color ForeColor { get; set; }
|
||||
public Font ForeFont { get; set; }
|
||||
|
||||
public GMProgessBarThemeBase()
|
||||
{
|
||||
BackColor = Color.White;
|
||||
InnerBorderColor = Color.White;
|
||||
BorderColor = Color.FromArgb(171, 171, 171);
|
||||
CoveredColor = Color.FromArgb(0, 114, 198);
|
||||
|
||||
DrawInnerBorder = true;
|
||||
DrawLeadingEdge = false;
|
||||
DrawBackColorGlass = false;
|
||||
DrawCoveredColorGlass = false;
|
||||
|
||||
BorderRadius = 0;
|
||||
ForeColor = Color.Black;
|
||||
ForeFont = new Font("微软雅黑", 9);
|
||||
}
|
||||
|
||||
#region IDisposable
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (ForeFont != null && !ForeFont.IsSystemFont)
|
||||
ForeFont.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,409 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
[ToolboxItem(true)]
|
||||
public class GMProgressBar : GMBarControlBase, IGMControl
|
||||
{
|
||||
|
||||
#region 构造函数及初始化
|
||||
|
||||
public GMProgressBar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private var
|
||||
|
||||
string text = "0%";
|
||||
|
||||
#endregion
|
||||
|
||||
#region IGMControl实现
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public GMControlType ControlType
|
||||
{
|
||||
get { return GMControlType.ProgressBar; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 新增的公开属性
|
||||
|
||||
int _percentage = 0;
|
||||
bool _showPercentageText = true;
|
||||
GMProgessBarThemeBase _xtheme;
|
||||
ProgressBarShapeStyle _shap = ProgressBarShapeStyle.Rectangle;
|
||||
|
||||
[DefaultValue(0), Description("0-100之间的整数值,表示当前进度")]
|
||||
public int Percentage
|
||||
{
|
||||
get
|
||||
{
|
||||
return _percentage;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_percentage != value)
|
||||
{
|
||||
if (value < 0)
|
||||
value = 0;
|
||||
if (value > 100)
|
||||
value = 100;
|
||||
_percentage = value;
|
||||
text = _percentage.ToString() + "%";
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DefaultValue(true)]
|
||||
public bool ShowPercentageText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showPercentageText;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_showPercentageText != value)
|
||||
{
|
||||
_showPercentageText = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Description("表示进度条是长方形的还是圆形的"),DefaultValue(typeof(ProgressBarShapeStyle),"0")]
|
||||
public ProgressBarShapeStyle Shape
|
||||
{
|
||||
get
|
||||
{
|
||||
return _shap;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_shap != value)
|
||||
{
|
||||
_shap = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public GMProgessBarThemeBase XTheme
|
||||
{
|
||||
get
|
||||
{
|
||||
return _xtheme;
|
||||
}
|
||||
set
|
||||
{
|
||||
_xtheme = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 可用XTheme配置的属性
|
||||
|
||||
protected virtual Color GMBackColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return Color.White;
|
||||
else
|
||||
return _xtheme.BackColor;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Color InnerBorderColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return Color.White;
|
||||
else
|
||||
return _xtheme.InnerBorderColor;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Color BorderColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return Color.FromArgb(171, 171, 171);
|
||||
else
|
||||
return _xtheme.BorderColor;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Color CoveredColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return Color.FromArgb(0, 114, 198);
|
||||
else
|
||||
return _xtheme.CoveredColor;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Color LeadingEdgeColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return Color.Empty;
|
||||
else
|
||||
return _xtheme.LeadingEdgeColor;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool DrawInnerBorder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return true;
|
||||
else
|
||||
return _xtheme.DrawInnerBorder;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool DrawLeadingEdge
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return false;
|
||||
else
|
||||
return _xtheme.DrawLeadingEdge;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool DrawBackColorGlass
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return false;
|
||||
else
|
||||
return _xtheme.DrawBackColorGlass;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool DrawCoveredColorGlass
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return false;
|
||||
else
|
||||
return _xtheme.DrawCoveredColorGlass;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual int BorderRadius
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return 0;
|
||||
else
|
||||
return _xtheme.BorderRadius;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Color GMForeColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return base.ForeColor;
|
||||
else
|
||||
return _xtheme.ForeColor;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Font ForeFont
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return base.Font;
|
||||
else
|
||||
return _xtheme.ForeFont;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 计算出的各元素区域
|
||||
|
||||
private Rectangle CoveredRect
|
||||
{
|
||||
get
|
||||
{
|
||||
Point location = ClientRectangle.Location;
|
||||
int maxWidth, height, width;
|
||||
if (DrawInnerBorder)
|
||||
{
|
||||
maxWidth = base.Width - 4;
|
||||
height = base.Height - 4;
|
||||
location.Offset(2, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
maxWidth = base.Width - 2;
|
||||
height = base.Height - 2;
|
||||
location.Offset(1, 1);
|
||||
}
|
||||
width = (int)((float)maxWidth * (float)Percentage / 100f);
|
||||
return new Rectangle(location, new Size(width, height));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 内部绘图
|
||||
|
||||
protected virtual void PaintThisBar(Graphics g)
|
||||
{
|
||||
BasicBlockPainter.RenderFlatBackground(g, ClientRectangle, GMBackColor,
|
||||
ButtonBorderType.Rectangle, BorderRadius, RoundStyle.All);
|
||||
if (DrawBackColorGlass)
|
||||
BasicBlockPainter.RenderRectangleGlass(g, ClientRectangle, BorderRadius, RoundStyle.All,
|
||||
RectangleGlassPosition.Bottom, 270f, 0.5f, Color.White, 100, 20);
|
||||
Rectangle rectCover = CoveredRect;
|
||||
if (rectCover.Width > 0)
|
||||
{
|
||||
rectCover.Inflate(1, 1);
|
||||
BasicBlockPainter.RenderFlatBackground(g, rectCover, CoveredColor,
|
||||
ButtonBorderType.Rectangle, BorderRadius, RoundStyle.All);
|
||||
if (DrawCoveredColorGlass)
|
||||
BasicBlockPainter.RenderRectangleGlass(g, rectCover, BorderRadius, RoundStyle.All,
|
||||
RectangleGlassPosition.Top, 90.001f);
|
||||
}
|
||||
if (DrawLeadingEdge && Percentage != 100)
|
||||
{
|
||||
rectCover.Inflate(-1, -1);
|
||||
Point p1 = new Point(rectCover.Right - 1 + 1, rectCover.Y);
|
||||
Point p2 = new Point(rectCover.Right - 1 + 1, rectCover.Bottom - 1);
|
||||
using (Pen p = new Pen(LeadingEdgeColor))
|
||||
{
|
||||
g.DrawLine(p, p1, p2);
|
||||
}
|
||||
}
|
||||
if (ShowPercentageText)
|
||||
{
|
||||
TextRenderer.DrawText(g, text, ForeFont, ClientRectangle, ForeColor,
|
||||
TextFormatFlags.HorizontalCenter |
|
||||
TextFormatFlags.VerticalCenter);
|
||||
}
|
||||
Rectangle rectBorder = ClientRectangle;
|
||||
BasicBlockPainter.RenderBorder(g, rectBorder, BorderColor, ButtonBorderType.Rectangle,
|
||||
BorderRadius, RoundStyle.All);
|
||||
if (DrawInnerBorder)
|
||||
{
|
||||
rectBorder.Inflate(-1, -1);
|
||||
BasicBlockPainter.RenderBorder(g, rectBorder, InnerBorderColor, ButtonBorderType.Rectangle,
|
||||
BorderRadius, RoundStyle.All);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void PaintThisBarInCircleShape(Graphics g)
|
||||
{
|
||||
Rectangle rect;
|
||||
|
||||
if (base.Width < base.Height)
|
||||
{
|
||||
rect = new Rectangle(0, (Height - Width) / 2, Width, Width);
|
||||
}
|
||||
else
|
||||
{
|
||||
rect = new Rectangle((Width - Height) / 2, 0, Height, Height);
|
||||
}
|
||||
|
||||
g.FillRectangle(Brushes.Transparent, ClientRectangle);
|
||||
|
||||
SimpleObjectPainter.RenderCircleProgressBar(
|
||||
g,
|
||||
rect,
|
||||
CoveredColor,
|
||||
BorderColor,
|
||||
GMBackColor,
|
||||
DrawInnerBorder,
|
||||
270,
|
||||
Percentage,
|
||||
ShowPercentageText,
|
||||
ForeFont);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 重写基类方法
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
if (Shape == ProgressBarShapeStyle.Circle)
|
||||
{
|
||||
PaintThisBarInCircleShape(e.Graphics);
|
||||
}
|
||||
else
|
||||
{
|
||||
PaintThisBar(e.Graphics);
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
public override System.Drawing.Color ForeColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.ForeColor;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.ForeColor = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
public override Font Font
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Font;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Font = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public enum ProgressBarShapeStyle
|
||||
{
|
||||
Rectangle,
|
||||
Circle,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,308 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
[ToolboxItem(true)]
|
||||
public class GMRollingBar : GMBarControlBase, IGMControl
|
||||
{
|
||||
|
||||
#region 构造函数及初始化
|
||||
|
||||
public GMRollingBar()
|
||||
{
|
||||
rollingTimer = new Timer();
|
||||
rollingTimer.Tick += new EventHandler(rollingTimer_Tick);
|
||||
rollingTimer.Interval = _refleshFrequency;
|
||||
rollingTimer.Enabled = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private var
|
||||
|
||||
float currentAngle = 0f;
|
||||
|
||||
Timer rollingTimer;
|
||||
|
||||
#endregion
|
||||
|
||||
#region IGMControl实现
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public GMControlType ControlType
|
||||
{
|
||||
get { return GMControlType.RollingBar; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 新增的公开属性
|
||||
|
||||
GMRollingBarThemeBase _xtheme;
|
||||
RollingBarStyle _style;
|
||||
int _refleshFrequency = 150;
|
||||
|
||||
[DefaultValue(150)]
|
||||
public int RefleshFrequency
|
||||
{
|
||||
get
|
||||
{
|
||||
return _refleshFrequency;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_refleshFrequency != value)
|
||||
{
|
||||
if (value < 1)
|
||||
value = 150;
|
||||
_refleshFrequency = value;
|
||||
rollingTimer.Interval = _refleshFrequency;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DefaultValue(typeof(RollingBarStyle),"0")]
|
||||
public RollingBarStyle Style
|
||||
{
|
||||
get
|
||||
{
|
||||
return _style;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_style != value)
|
||||
{
|
||||
_style = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public GMRollingBarThemeBase XTheme
|
||||
{
|
||||
get
|
||||
{
|
||||
return _xtheme;
|
||||
}
|
||||
set
|
||||
{
|
||||
_xtheme = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 公开的方法
|
||||
|
||||
public void StartRolling()
|
||||
{
|
||||
if (rollingTimer.Enabled)
|
||||
return;
|
||||
rollingTimer.Enabled = true;
|
||||
}
|
||||
|
||||
public void StopRolling()
|
||||
{
|
||||
rollingTimer.Enabled = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 可用XTheme配置的属性
|
||||
|
||||
protected virtual int Radius1
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return 10;
|
||||
else
|
||||
return _xtheme.Radius1;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual int Radius2
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return 24;
|
||||
else
|
||||
return _xtheme.Radius2;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual int SpokeNum
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return 12;
|
||||
else
|
||||
return _xtheme.SpokeNum;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual float PenWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return 2;
|
||||
else
|
||||
return _xtheme.PenWidth;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Color BaseColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return Color.Red;
|
||||
else
|
||||
return _xtheme.BaseColor;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual Color GMBackColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_xtheme == null)
|
||||
return Color.Transparent;
|
||||
else
|
||||
return _xtheme.BackColor;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 内部方法
|
||||
|
||||
private void rollingTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
base.Invalidate();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 内部绘图
|
||||
|
||||
protected virtual void PaintThisRollingBar(Graphics g)
|
||||
{
|
||||
switch (Style)
|
||||
{
|
||||
case RollingBarStyle.Default:
|
||||
PaintDefault(g);
|
||||
break;
|
||||
|
||||
case RollingBarStyle.ChromeOneQuarter:
|
||||
PaintChromeOneQuarter(g);
|
||||
break;
|
||||
|
||||
case RollingBarStyle.DiamondRing:
|
||||
PaintDiamondRing(g);
|
||||
break;
|
||||
|
||||
case RollingBarStyle.BigGuyLeadsLittleGuys:
|
||||
PaintTheseGuys(g);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void IncreaseCurrentAngle(int spokeNum)
|
||||
{
|
||||
if (rollingTimer.Enabled)
|
||||
{
|
||||
currentAngle += 360f / spokeNum;
|
||||
if (currentAngle > 360f)
|
||||
currentAngle -= 360f;
|
||||
}
|
||||
}
|
||||
|
||||
private void PaintDefault(Graphics g)
|
||||
{
|
||||
IncreaseCurrentAngle(SpokeNum);
|
||||
|
||||
RollingBarPainter.RenderDefault(
|
||||
g,
|
||||
ClientRectangle,
|
||||
GMBackColor,
|
||||
currentAngle,
|
||||
Radius1,
|
||||
Radius2,
|
||||
SpokeNum,
|
||||
PenWidth,
|
||||
ColorHelper.GetLighterArrayColors(BaseColor, SpokeNum));
|
||||
}
|
||||
|
||||
private void PaintChromeOneQuarter(Graphics g)
|
||||
{
|
||||
IncreaseCurrentAngle(10);
|
||||
|
||||
RollingBarPainter.RenderChromeOneQuarter(
|
||||
g,
|
||||
ClientRectangle,
|
||||
GMBackColor,
|
||||
currentAngle,
|
||||
Radius1,
|
||||
BaseColor);
|
||||
}
|
||||
|
||||
private void PaintDiamondRing(Graphics g)
|
||||
{
|
||||
IncreaseCurrentAngle(12);
|
||||
|
||||
RollingBarPainter.RenderDiamondRing(
|
||||
g,
|
||||
ClientRectangle,
|
||||
GMBackColor,
|
||||
currentAngle,
|
||||
Radius1,
|
||||
BaseColor,
|
||||
_xtheme == null ? Color.White : _xtheme.DiamondColor);
|
||||
}
|
||||
|
||||
private void PaintTheseGuys(Graphics g)
|
||||
{
|
||||
IncreaseCurrentAngle(10);
|
||||
|
||||
RollingBarPainter.RenderTheseGuys(
|
||||
g,
|
||||
ClientRectangle,
|
||||
GMBackColor,
|
||||
currentAngle,
|
||||
Radius1,
|
||||
BaseColor);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 重写基类方法
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
PaintThisRollingBar(e.Graphics);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class GMRollingBarThemeBase
|
||||
{
|
||||
public int Radius1 { get; set; }
|
||||
public int Radius2 { get; set; }
|
||||
public int SpokeNum { get; set; }
|
||||
public float PenWidth { get; set; }
|
||||
public Color BackColor { get; set; }
|
||||
public Color BaseColor { get; set; }
|
||||
public Color DiamondColor { get; set; }
|
||||
|
||||
public GMRollingBarThemeBase()
|
||||
{
|
||||
Radius1 = 10;
|
||||
Radius2 = 24;
|
||||
SpokeNum = 12;
|
||||
PenWidth = 2;
|
||||
BackColor = Color.Transparent;
|
||||
BaseColor = Color.Red;
|
||||
DiamondColor = Color.White;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public enum RollingBarStyle
|
||||
{
|
||||
Default,
|
||||
ChromeOneQuarter,
|
||||
DiamondRing,
|
||||
BigGuyLeadsLittleGuys,
|
||||
//FiveRunningFools,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
[ToolboxItem(true)]
|
||||
public class GMHScrollBar : GMScrollBarBase
|
||||
{
|
||||
|
||||
#region 重写/实现属性
|
||||
|
||||
protected override int ScrollBarLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Size.Width;
|
||||
}
|
||||
}
|
||||
|
||||
//现在发现这个属性其实没有必要重写
|
||||
protected override int MiddleButtonBeginPositionDot
|
||||
{
|
||||
get
|
||||
{
|
||||
int sideBtnLen = ShowSideButtons ? base.SideButtonLength : 0;
|
||||
return base.InnerPaddingWidth + sideBtnLen +
|
||||
base.MiddleButtonOutterSpace1;
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle SideButton1Rect
|
||||
{
|
||||
get
|
||||
{
|
||||
int width, height;
|
||||
if (ShowSideButtons)
|
||||
{
|
||||
height = base.Size.Height - InnerPaddingWidth * 2;
|
||||
width = base.SideButtonLength;
|
||||
|
||||
int len = ScrollBarLength - InnerPaddingWidth * 2;
|
||||
if (len < 0)
|
||||
len = 0;
|
||||
if (len < SideButtonLength * 2)
|
||||
width = len / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = height = 0;
|
||||
}
|
||||
return new Rectangle(base.InnerPaddingWidth,
|
||||
base.InnerPaddingWidth, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle SideButton2Rect
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle rect1 = SideButton1Rect;
|
||||
return new Rectangle(Size.Width - InnerPaddingWidth - rect1.Width,
|
||||
InnerPaddingWidth, rect1.Width, rect1.Height);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle MiddleButtonRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(this.MiddleButtonCurrentPositionDot,
|
||||
InnerPaddingWidth + MiddleButtonOutterSpace2,
|
||||
base.MiddleButtonLength,
|
||||
Size.Height - InnerPaddingWidth * 2 - MiddleButtonOutterSpace2 * 2
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle BeforeMdlBtnRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(MiddleButtonBeginPositionDot,
|
||||
InnerPaddingWidth,
|
||||
MiddleButtonCurrentPositionDot - MiddleButtonBeginPositionDot,
|
||||
Size.Height - InnerPaddingWidth * 2);
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle AfterMdlBtnRect
|
||||
{
|
||||
get
|
||||
{
|
||||
int top = InnerPaddingWidth;
|
||||
int left = MiddleButtonRect.Bottom;
|
||||
int height = Size.Height - top * 2;
|
||||
int width = SideButton2Rect.Left - left - MiddleButtonOutterSpace1;
|
||||
if (!ShowSideButtons)
|
||||
width += SideButtonLength;
|
||||
return new Rectangle(left, top, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
protected override ForePathRatoteDirection SideButton1RotateInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ForePathRatoteDirection.Left;
|
||||
}
|
||||
}
|
||||
|
||||
protected override ForePathRatoteDirection SideButton2RotateInfo
|
||||
{
|
||||
get { return ForePathRatoteDirection.Right; }
|
||||
}
|
||||
|
||||
protected override bool IsVerticalBar
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 构造函数
|
||||
|
||||
public GMHScrollBar()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,116 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class GMScrollBarThemeBase : IDisposable
|
||||
{
|
||||
public int InnerPaddingWidth { get; set; }
|
||||
public int MiddleButtonOutterSpace1 { get; set; }
|
||||
public int MiddleButtonOutterSpace2 { get; set; }
|
||||
public int SideButtonLength { get; set; }
|
||||
public int BestUndirectLen { get; set; }
|
||||
public bool DrawBackground { get; set; }
|
||||
public bool DrawBorder { get; set; }
|
||||
public bool DrawInnerBorder { get; set; }
|
||||
public bool ShowSideButtons { get; set; }
|
||||
public Color BackColor { get; set; }
|
||||
public Color BorderColor { get; set; }
|
||||
public Color InnerBorderColor { get; set; }
|
||||
public Size SideButtonForePathSize { get; set; }
|
||||
public ButtonForePathGetter SideButtonForePathGetter { get; set; }
|
||||
public ButtonColorTable SideButtonColorTable { get; set; }
|
||||
public ButtonColorTable MiddleButtonColorTable { get; set; }
|
||||
public ForePathRenderMode HowSideButtonForePathDraw { get; set; }
|
||||
|
||||
public bool DrawLinesInMiddleButton { get; set; }
|
||||
public Color MiddleButtonLine1Color { get; set; }
|
||||
public Color MiddleButtonLine2Color { get; set; }
|
||||
public int MiddleBtnLineOutterSpace1 { get; set; }
|
||||
public int MiddleBtnLineOutterSpace2 { get; set; }
|
||||
|
||||
public int SideButtonRadius { get; set; }
|
||||
public int MiddleButtonRadius { get; set; }
|
||||
public ButtonBorderType SideButtonBorderType { get; set; }
|
||||
|
||||
private void SetDefaultValue()
|
||||
{
|
||||
InnerPaddingWidth = 0;
|
||||
MiddleButtonOutterSpace1 = 1;
|
||||
MiddleButtonOutterSpace2 = 0;
|
||||
SideButtonLength = 16;
|
||||
BestUndirectLen = 15;
|
||||
DrawBackground = true;
|
||||
DrawBorder = false;
|
||||
DrawInnerBorder = false;
|
||||
ShowSideButtons = true;
|
||||
//SideButtonCanDisabled = false;
|
||||
BackColor = Color.FromArgb(227,227,227);
|
||||
BorderColor = Color.FromArgb(248, 248, 248);
|
||||
|
||||
SideButtonForePathSize = new Size(10, 9);
|
||||
SideButtonForePathGetter = new ButtonForePathGetter(
|
||||
MGdu.WinFormUI.MyGraphics.GraphicsPathHelper.Create7x4DownTriangleFlag);
|
||||
|
||||
SideButtonColorTable = SideBtnColor();
|
||||
MiddleButtonColorTable = MdlBtnColor();
|
||||
|
||||
HowSideButtonForePathDraw = ForePathRenderMode.Draw;
|
||||
|
||||
DrawLinesInMiddleButton = true;
|
||||
MiddleBtnLineOutterSpace1 = 4;
|
||||
MiddleBtnLineOutterSpace2 = 4;
|
||||
MiddleButtonLine1Color = Color.FromArgb(89, 89, 89);
|
||||
MiddleButtonLine2Color = Color.FromArgb(182, 182, 182);
|
||||
|
||||
SideButtonRadius = MiddleButtonRadius = 0;
|
||||
SideButtonBorderType = ButtonBorderType.Rectangle;
|
||||
}
|
||||
|
||||
private ButtonColorTable SideBtnColor()
|
||||
{
|
||||
ButtonColorTable table = MdlBtnColor();
|
||||
|
||||
table.ForeColorNormal = Color.FromArgb(73, 73, 73);
|
||||
table.ForeColorHover = Color.FromArgb(32, 106, 145);
|
||||
table.ForeColorPressed = Color.FromArgb(15, 38, 50);
|
||||
table.ForeColorDisabled = SystemColors.ControlDarkDark;
|
||||
|
||||
table.BackColorDisabled = SystemColors.ControlDark;
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
private ButtonColorTable MdlBtnColor()
|
||||
{
|
||||
ButtonColorTable table = new ButtonColorTable();
|
||||
|
||||
table.BorderColorNormal = Color.FromArgb(151, 151, 151);
|
||||
table.BorderColorHover = Color.FromArgb(53, 111, 155);
|
||||
table.BorderColorPressed = Color.FromArgb(60, 127, 177);
|
||||
|
||||
table.BackColorNormal = Color.FromArgb(217, 218, 219);
|
||||
table.BackColorHover = Color.FromArgb(169, 219, 246);
|
||||
table.BackColorPressed = Color.FromArgb(111, 202, 240);
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
public GMScrollBarThemeBase()
|
||||
{
|
||||
SetDefaultValue();
|
||||
}
|
||||
|
||||
#region IDisposable
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//if (SideButtonForePath != null)
|
||||
// SideButtonForePath.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
[ToolboxItem(true)]
|
||||
public class GMVScrollBar : GMScrollBarBase
|
||||
{
|
||||
#region private var
|
||||
|
||||
#endregion
|
||||
|
||||
#region 重写/实现属性
|
||||
|
||||
protected override int ScrollBarLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Size.Height;
|
||||
}
|
||||
}
|
||||
|
||||
protected override int MiddleButtonBeginPositionDot
|
||||
{
|
||||
get
|
||||
{
|
||||
int sizeBtnLen = ShowSideButtons ? base.SideButtonLength : 0;
|
||||
return base.InnerPaddingWidth + sizeBtnLen +
|
||||
base.MiddleButtonOutterSpace1;
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle SideButton1Rect
|
||||
{
|
||||
get
|
||||
{
|
||||
int width, height;
|
||||
if (ShowSideButtons)
|
||||
{
|
||||
width = base.Size.Width - InnerPaddingWidth * 2;
|
||||
height = base.SideButtonLength;
|
||||
|
||||
int len = ScrollBarLength - InnerPaddingWidth * 2;
|
||||
if (len < 0)
|
||||
len = 0;
|
||||
if (len < SideButtonLength * 2)
|
||||
height = len / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = height = 0;
|
||||
}
|
||||
return new Rectangle(base.InnerPaddingWidth,
|
||||
base.InnerPaddingWidth, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle SideButton2Rect
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle rect1 = SideButton1Rect;
|
||||
return new Rectangle(InnerPaddingWidth,
|
||||
Size.Height - InnerPaddingWidth - rect1.Height,
|
||||
rect1.Width, rect1.Height);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle MiddleButtonRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(InnerPaddingWidth + MiddleButtonOutterSpace2,
|
||||
this.MiddleButtonCurrentPositionDot,
|
||||
Size.Width - InnerPaddingWidth * 2 - MiddleButtonOutterSpace2 * 2,
|
||||
base.MiddleButtonLength);
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle BeforeMdlBtnRect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(InnerPaddingWidth,
|
||||
MiddleButtonBeginPositionDot,
|
||||
Size.Width - InnerPaddingWidth * 2,
|
||||
MiddleButtonCurrentPositionDot - MiddleButtonBeginPositionDot);
|
||||
}
|
||||
}
|
||||
|
||||
protected override Rectangle AfterMdlBtnRect
|
||||
{
|
||||
get
|
||||
{
|
||||
int left = InnerPaddingWidth;
|
||||
int top = MiddleButtonRect.Bottom;
|
||||
int width = Size.Width - left * 2;
|
||||
int height = SideButton2Rect.Top - top - MiddleButtonOutterSpace1;
|
||||
if (!ShowSideButtons)
|
||||
height += SideButtonLength;
|
||||
return new Rectangle(left, top, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
protected override ForePathRatoteDirection SideButton1RotateInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ForePathRatoteDirection.Up;
|
||||
}
|
||||
}
|
||||
|
||||
protected override ForePathRatoteDirection SideButton2RotateInfo
|
||||
{
|
||||
get { return ForePathRatoteDirection.Down; }
|
||||
}
|
||||
|
||||
protected override bool IsVerticalBar
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 构造函数
|
||||
|
||||
public GMVScrollBar()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,246 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class CutePointAndValuePresenter
|
||||
{
|
||||
#region 内部变量
|
||||
|
||||
int eggCount = 10;
|
||||
int markCount = 10;
|
||||
bool fcp;
|
||||
|
||||
double averageEggsInEachGab;
|
||||
int firstMarkN;
|
||||
int lastMarkN;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 构造函数
|
||||
|
||||
public CutePointAndValuePresenter()
|
||||
{
|
||||
UpdateEggAndMarkInfo();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 公开的属性,方法
|
||||
|
||||
public int PointCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return fcp ? eggCount : markCount;
|
||||
}
|
||||
}
|
||||
|
||||
public int ValueCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return fcp ? markCount : eggCount;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPointAndValueCount(int pointCount, int valueCount)
|
||||
{
|
||||
if (pointCount < 1)
|
||||
pointCount = 1;
|
||||
if (valueCount < 1)
|
||||
valueCount = 1;
|
||||
if (pointCount >= valueCount)
|
||||
{
|
||||
fcp = true;
|
||||
eggCount = pointCount;
|
||||
markCount = valueCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
fcp = false;
|
||||
eggCount = valueCount;
|
||||
markCount = pointCount;
|
||||
}
|
||||
UpdateEggAndMarkInfo();
|
||||
}
|
||||
|
||||
public void GetPointIndexFromValueIndex(int vIndex, out int pIndexFrom, out int pIndexTo)
|
||||
{
|
||||
|
||||
if (fcp)
|
||||
{
|
||||
if (vIndex < 0 || vIndex > markCount - 1)
|
||||
throw new ArgumentOutOfRangeException("vIndex");
|
||||
|
||||
GetEggsIndexFromMarkIndex(vIndex, out pIndexFrom, out pIndexTo);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vIndex < 0 || vIndex > eggCount - 1)
|
||||
throw new ArgumentOutOfRangeException("vIndex");
|
||||
|
||||
GetMarkIndexFromEggIndex(vIndex, out pIndexFrom);
|
||||
pIndexTo = pIndexFrom;
|
||||
}
|
||||
}
|
||||
|
||||
public void GetValueIndexFromPointIndex(int pIndex, out int vIndexFrom, out int vIndexTo)
|
||||
{
|
||||
if (fcp)
|
||||
{
|
||||
if (pIndex < 0 || pIndex > eggCount - 1)
|
||||
throw new ArgumentOutOfRangeException("pIndex");
|
||||
|
||||
GetMarkIndexFromEggIndex(pIndex, out vIndexFrom);
|
||||
vIndexTo = vIndexFrom;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pIndex < 0 || pIndex > markCount - 1)
|
||||
throw new ArgumentOutOfRangeException("pIndex");
|
||||
|
||||
GetEggsIndexFromMarkIndex(pIndex, out vIndexFrom, out vIndexTo);
|
||||
}
|
||||
}
|
||||
|
||||
public void GetExactPointIndexFromValueIndex(int vIndex, out int pIndex)
|
||||
{
|
||||
int pIndex2;
|
||||
GetPointIndexFromValueIndex(vIndex, out pIndex, out pIndex2);
|
||||
int maxIndex = fcp ? markCount - 1 : eggCount - 1;
|
||||
if (vIndex == maxIndex)
|
||||
pIndex = pIndex2;
|
||||
else if (vIndex != 0)
|
||||
pIndex = (pIndex + pIndex2) / 2;
|
||||
}
|
||||
|
||||
public void GetExactValueIndexFromPointIndex(int pIndex, out int vIndex)
|
||||
{
|
||||
int vIndex2;
|
||||
GetValueIndexFromPointIndex(pIndex, out vIndex, out vIndex2);
|
||||
int maxIndex = fcp ? eggCount - 1 : markCount - 1;
|
||||
if (pIndex == maxIndex)
|
||||
vIndex = vIndex2;
|
||||
else if (pIndex != 0)
|
||||
vIndex = (vIndex + vIndex2) / 2;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 内部函数
|
||||
|
||||
private int GetUpRoundedHalfValue(int a)
|
||||
{
|
||||
int t = a / 2;
|
||||
if (a % 2 != 0)
|
||||
t++;
|
||||
return t;
|
||||
}
|
||||
|
||||
private int EggsCount(int markIndex)
|
||||
{
|
||||
return (markIndex + 1) +
|
||||
(int)Math.Round(averageEggsInEachGab * ((double)markIndex + 0.5), MidpointRounding.AwayFromZero);
|
||||
}
|
||||
|
||||
private void UpdateEggAndMarkInfo()
|
||||
{
|
||||
if (markCount == 1)
|
||||
{
|
||||
firstMarkN = eggCount;
|
||||
return;
|
||||
}
|
||||
if (markCount == 2)
|
||||
{
|
||||
firstMarkN = GetUpRoundedHalfValue(eggCount);
|
||||
lastMarkN = eggCount / 2;
|
||||
return;
|
||||
}
|
||||
|
||||
int remainEggs = eggCount - markCount;
|
||||
int gabs = markCount - 1;
|
||||
averageEggsInEachGab = (double)remainEggs / (double)gabs;
|
||||
firstMarkN = EggsCount(0);
|
||||
lastMarkN = eggCount - EggsCount(markCount - 2);
|
||||
}
|
||||
|
||||
private void GetEggsIndexFromMarkIndex(int markIndex, out int eggIndexFrom, out int eggIndexTo)
|
||||
{
|
||||
if (markIndex == 0)
|
||||
{
|
||||
eggIndexFrom = 0;
|
||||
eggIndexTo = firstMarkN - 1;
|
||||
return;
|
||||
}
|
||||
if (markIndex == markCount - 1)
|
||||
{
|
||||
eggIndexTo = eggCount - 1;
|
||||
eggIndexFrom = eggIndexTo - lastMarkN + 1;
|
||||
return;
|
||||
}
|
||||
eggIndexFrom = EggsCount(markIndex - 1);
|
||||
eggIndexTo = EggsCount(markIndex) - 1;
|
||||
}
|
||||
|
||||
private void GetMarkIndexFromEggIndex(int eggIndex, out int markIndex)
|
||||
{
|
||||
if (eggIndex < firstMarkN)
|
||||
{
|
||||
markIndex = 0;
|
||||
return;
|
||||
}
|
||||
if (eggIndex >= (eggCount - lastMarkN))
|
||||
{
|
||||
markIndex = markCount - 1;
|
||||
return;
|
||||
}
|
||||
|
||||
//double rst = ((double)eggIndex + averageEggsInEachGab * 0.5) / (1 + averageEggsInEachGab);
|
||||
//markIndex = (int)rst;
|
||||
|
||||
markIndex = (int)(((double)eggIndex + averageEggsInEachGab * 0.5) / (1 + averageEggsInEachGab));
|
||||
if (!IsRightEgg(markIndex, eggIndex))
|
||||
{
|
||||
if (markIndex == 1)
|
||||
markIndex++;
|
||||
else if (markIndex == markCount - 2)
|
||||
markIndex--;
|
||||
else
|
||||
{
|
||||
if (IsRightEgg(markIndex - 1, eggIndex))
|
||||
markIndex--;
|
||||
else if (IsRightEgg(markIndex + 1, eggIndex))
|
||||
markIndex++;
|
||||
else
|
||||
{
|
||||
string msg = "Inner error in CutePointAndValuePresenter.GetMarkIndexFromEggIndex(), " +
|
||||
"\r\n" + "can't find the correct markindex, please contact the author and " +
|
||||
"report this error with the following data: " + "\r\n" +
|
||||
"eggCount: " + eggCount.ToString() + "\r\n" +
|
||||
"markCount: " + markCount.ToString() + "\r\n" +
|
||||
"eggIndex: " + eggIndex.ToString();
|
||||
|
||||
throw new Exception(msg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsRightEgg(int markIndex, int eggIndex)
|
||||
{
|
||||
int eggIndex1 = EggsCount(markIndex - 1);
|
||||
int eggIndex2 = EggsCount(markIndex) - 1;
|
||||
return (eggIndex1 <= eggIndex) && (eggIndex <= eggIndex2);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
1546
Source/ryControls/Gdu.WinFormUI/GMControls/TrackBar/GMTrackBar.cs
Normal file
1546
Source/ryControls/Gdu.WinFormUI/GMControls/TrackBar/GMTrackBar.cs
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class GMTrackBarThemeBase
|
||||
{
|
||||
#region 尺寸及间距调节
|
||||
|
||||
public int ButtonLength1 { get; set; }
|
||||
public int ButtonLength2 { get; set; }
|
||||
public int MainLineLength { get; set; }
|
||||
public int ButtonOutterSpace1 { get; set; }
|
||||
public int ButtonOutterSpace2 { get; set; }
|
||||
public int TickLineLength { get; set; }
|
||||
public int TickLineSpaceWithButton { get; set; }
|
||||
public int TickLineSpaceWithBorder { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region 边框及颜色设置
|
||||
|
||||
public int BorderWidth { get; set; }
|
||||
public bool DrawBackground { get; set; }
|
||||
public bool DrawBorder { get; set; }
|
||||
public bool DrawInnerBorder { get; set; }
|
||||
public Color BackColor { get; set; }
|
||||
public Color BorderColor { get; set; }
|
||||
public Color InnerBorderColor { get; set; }
|
||||
public Color TickLineColor { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region extra
|
||||
|
||||
public ButtonColorTable ThumbButtonColorTable { get; set; }
|
||||
public ButtonBorderType ThumbButtonBorderType { get; set; }
|
||||
|
||||
public bool MainLineDrawBorder { get; set; }
|
||||
public Color MainLineBorderColor { get; set; }
|
||||
public int MainLineRadius { get; set; }
|
||||
public Color MainLineRange1BackColor { get; set; }
|
||||
public Color MainLineRange2BackColor { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public GMTrackBarThemeBase()
|
||||
{
|
||||
ButtonLength1 = 8;
|
||||
ButtonLength2 = 18;
|
||||
MainLineLength = 4;
|
||||
ButtonOutterSpace1 = 4;
|
||||
ButtonOutterSpace2 = 2;
|
||||
TickLineLength = 3;
|
||||
TickLineSpaceWithButton = 2;
|
||||
TickLineSpaceWithBorder = 6;
|
||||
|
||||
BorderWidth = 1;
|
||||
DrawBackground = true;
|
||||
DrawBorder = false;
|
||||
DrawInnerBorder = false;
|
||||
BackColor = Color.Transparent;
|
||||
TickLineColor = Color.FromArgb(185, 185, 185);
|
||||
|
||||
MainLineDrawBorder = true;
|
||||
MainLineBorderColor = Color.FromArgb(0, 114, 198);
|
||||
MainLineRadius = 0;
|
||||
MainLineRange1BackColor = MainLineRange2BackColor = Color.White;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
77
Source/ryControls/Gdu.WinFormUI/MyGraphics/ColorHelper.cs
Normal file
77
Source/ryControls/Gdu.WinFormUI/MyGraphics/ColorHelper.cs
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI.MyGraphics
|
||||
{
|
||||
public static class ColorHelper
|
||||
{
|
||||
public static Color GetLighterColor(Color baseColor, int percentage)
|
||||
{
|
||||
int r0 = baseColor.R;
|
||||
int g0 = baseColor.G;
|
||||
int b0 = baseColor.B;
|
||||
|
||||
int r = r0 + (int)((255 - r0) * (percentage / 100f));
|
||||
int g = g0 + (int)((255 - g0) * (percentage / 100f));
|
||||
int b = b0 + (int)((255 - b0) * (percentage / 100f));
|
||||
|
||||
if (r > 255)
|
||||
r = 255;
|
||||
if (g > 255)
|
||||
g = 255;
|
||||
if (b > 255)
|
||||
b = 255;
|
||||
|
||||
return Color.FromArgb(baseColor.A, r, g, b);
|
||||
}
|
||||
|
||||
public static Color GetDarkerColor(Color baseColor, int percentage)
|
||||
{
|
||||
int r0 = baseColor.R;
|
||||
int g0 = baseColor.G;
|
||||
int b0 = baseColor.B;
|
||||
|
||||
int r = r0 - (int)(r0 * (percentage / 100f));
|
||||
int g = g0 - (int)(g0 * (percentage / 100f));
|
||||
int b = b0 - (int)(b0 * (percentage / 100f));
|
||||
|
||||
if (r < 0)
|
||||
r = 0;
|
||||
if (g < 0)
|
||||
g = 0;
|
||||
if (b < 0)
|
||||
b = 0;
|
||||
|
||||
return Color.FromArgb(baseColor.A, r, g, b);
|
||||
}
|
||||
|
||||
public static Color[] GetLighterArrayColors(Color baseColor, int arrayLength, float maxPercentage)
|
||||
{
|
||||
if (maxPercentage < 2)
|
||||
maxPercentage = 2f;
|
||||
if (maxPercentage > 100)
|
||||
maxPercentage = 100f;
|
||||
|
||||
Color[] arrc = new Color[arrayLength];
|
||||
float average = maxPercentage / arrayLength;
|
||||
for (int i = 0; i < arrayLength; i++)
|
||||
{
|
||||
arrc[arrayLength - i - 1] = GetLighterColor(baseColor, (int)(average * i));
|
||||
}
|
||||
return arrc;
|
||||
}
|
||||
|
||||
public static Color[] GetLighterArrayColors(Color baseColor, int arrayLength)
|
||||
{
|
||||
return GetLighterArrayColors(baseColor, arrayLength, 100f);
|
||||
}
|
||||
}
|
||||
}
|
338
Source/ryControls/Gdu.WinFormUI/MyGraphics/GraphicsPathHelper.cs
Normal file
338
Source/ryControls/Gdu.WinFormUI/MyGraphics/GraphicsPathHelper.cs
Normal file
|
@ -0,0 +1,338 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI.MyGraphics
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 提供产生各种路径的静态方法,比如圆角路径、关闭按钮上的x路径、+号路径
|
||||
/// </summary>
|
||||
public static class GraphicsPathHelper
|
||||
{
|
||||
public static GraphicsPath CreateRoundedRect(Rectangle rect, int radius, RoundStyle type, bool shorten)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
if (shorten)
|
||||
{
|
||||
rect.Width--;
|
||||
rect.Height--;
|
||||
}
|
||||
|
||||
if (radius < 2)
|
||||
type = RoundStyle.None;
|
||||
|
||||
Rectangle rectTopLeft = new Rectangle(rect.X, rect.Y, radius, radius);
|
||||
Rectangle rectTopRight = new Rectangle(rect.Right - radius, rect.Y, radius, radius);
|
||||
Rectangle rectBottomLeft = new Rectangle(rect.X, rect.Bottom - radius, radius, radius);
|
||||
Rectangle rectBottomRight = new Rectangle(rect.Right - radius, rect.Bottom - radius, radius, radius);
|
||||
Point p1 = new Point(rect.X, rect.Y);
|
||||
Point p2 = new Point(rect.Right, rect.Y);
|
||||
Point p3 = new Point(rect.Right, rect.Bottom);
|
||||
Point p4 = new Point(rect.X, rect.Bottom);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case RoundStyle.None:
|
||||
path.AddRectangle(rect);
|
||||
break;
|
||||
case RoundStyle.All:
|
||||
path.AddArc(rectTopLeft, 180, 90);
|
||||
path.AddArc(rectTopRight, 270, 90);
|
||||
path.AddArc(rectBottomRight, 0, 90);
|
||||
path.AddArc(rectBottomLeft, 90, 90);
|
||||
break;
|
||||
case RoundStyle.Top:
|
||||
path.AddArc(rectTopLeft, 180, 90);
|
||||
path.AddArc(rectTopRight, 270, 90);
|
||||
path.AddLine(p3, p4);
|
||||
break;
|
||||
case RoundStyle.Bottom:
|
||||
path.AddArc(rectBottomRight, 0, 90);
|
||||
path.AddArc(rectBottomLeft, 90, 90);
|
||||
path.AddLine(p1, p2);
|
||||
break;
|
||||
case RoundStyle.Left:
|
||||
path.AddArc(rectBottomLeft, 90, 90);
|
||||
path.AddArc(rectTopLeft, 180, 90);
|
||||
path.AddLine(p2, p3);
|
||||
break;
|
||||
case RoundStyle.Right:
|
||||
path.AddArc(rectTopRight, 270, 90);
|
||||
path.AddArc(rectBottomRight, 0, 90);
|
||||
path.AddLine(p4, p1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
path.CloseFigure();
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateMinimizeFlagPath(Rectangle rect)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
int x = rect.X + (rect.Width - 9) / 2;
|
||||
int y = rect.Y + (rect.Height - 7) / 2;
|
||||
Point p1 = new Point(x + 1, y + 5);
|
||||
Point p2 = new Point(x + 7, y + 5);
|
||||
Point p3 = new Point(x + 1, y + 6);
|
||||
Point p4 = new Point(x + 7, y + 6);
|
||||
path.AddLines(new Point[] { p1, p2, p3, p4 });
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateMaximizeFlagPath(Rectangle rect)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
int x = rect.X + (rect.Width - 9) / 2;
|
||||
int y = rect.Y + (rect.Height - 7) / 2;
|
||||
Point p1 = new Point(x + 1, y + 1);
|
||||
Point p2 = new Point(x + 7, y + 1);
|
||||
path.AddRectangle(new Rectangle(new Point(x, y), new Size(8, 6)));
|
||||
path.CloseFigure();
|
||||
path.AddLine(p1, p2);
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateRestoreFlagPath(Rectangle rect)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
int x = rect.X + (rect.Width - 11) / 2;
|
||||
int y = rect.Y + (rect.Height - 9) / 2;
|
||||
|
||||
Point p1 = new Point(x, y + 3);
|
||||
Point p2 = new Point(x + 6, y + 3);
|
||||
Point p3 = new Point(x + 6, y + 4);
|
||||
Point p4 = new Point(x + 6, y + 8);
|
||||
Point p5 = new Point(x, y + 8);
|
||||
Point p6 = new Point(x, y + 4);
|
||||
|
||||
Point p7 = new Point(x + 7, y + 5);
|
||||
Point p8 = new Point(x + 9, y + 5);
|
||||
Point p9 = new Point(x + 9, y + 1);
|
||||
Point p10 = new Point(x + 3, y + 1);
|
||||
Point p11 = new Point(x + 3, y + 2);
|
||||
Point p12 = new Point(x + 3, y);
|
||||
Point p13 = new Point(x + 9, y);
|
||||
|
||||
path.AddLines(new Point[] { p1, p2, p4, p5, p6, p3, p2, p1 });
|
||||
path.CloseFigure();
|
||||
|
||||
path.AddLines(new Point[] { p7, p8, p9, p10, p11, p12, p13, p8, p7 });
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateCloseFlagPath(Rectangle rect)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
int x = rect.X + (rect.Width - 9) / 2;
|
||||
int y = rect.Y + (rect.Height - 7) / 2;
|
||||
|
||||
Point p1 = new Point(x + 1-1, y-1);
|
||||
Point p2 = new Point(x + 7, y + 6);
|
||||
Point p3 = new Point(x + 8, y + 6);
|
||||
Point p4 = new Point(x + 2-1, y-1);
|
||||
|
||||
Point p5 = new Point(x + 6+1, y-1);
|
||||
Point p6 = new Point(x, y + 6);
|
||||
Point p7 = new Point(x + 1, y + 6);
|
||||
Point p8 = new Point(x + 7+1, y-1);
|
||||
|
||||
path.AddLine(p1, p2);
|
||||
path.AddLine(p3, p4);
|
||||
path.CloseFigure();
|
||||
path.AddLine(p5, p6);
|
||||
path.AddLine(p7, p8);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateTopRoundedPathForFormRegion(Rectangle rect)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
Point pBL = new Point(rect.X, rect.Bottom); // bottom left
|
||||
Point pBR = new Point(rect.Right, rect.Bottom); // bottom right
|
||||
|
||||
int x = rect.X, y = rect.Y, r = rect.Right;
|
||||
Point p1 = new Point(x, y + 4);
|
||||
Point p2 = new Point(x + 1, y + 4);
|
||||
Point p3 = new Point(x + 1, y + 2);
|
||||
Point p4 = new Point(x + 2, y + 2);
|
||||
Point p5 = new Point(x + 2, y + 1);
|
||||
Point p6 = new Point(x + 4, y + 1);
|
||||
Point p7 = new Point(x + 4, y);
|
||||
|
||||
Point p8 = new Point(r - 4, y);
|
||||
Point p9 = new Point(r - 4, y + 1);
|
||||
Point p10 = new Point(r - 2, y + 1);
|
||||
Point p11 = new Point(r - 2, y + 2);
|
||||
Point p12 = new Point(r - 1, y + 2);
|
||||
Point p13 = new Point(r - 1, y + 4);
|
||||
Point p14 = new Point(r, y + 4);
|
||||
|
||||
path.AddLines(new Point[] { p1, p2, p3, p4, p5, p6, p7 });
|
||||
path.AddLines(new Point[] { p8, p9, p10, p11, p12, p13, p14 });
|
||||
path.AddLine(pBR, pBL);
|
||||
|
||||
path.CloseFigure();
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateSingleLineCloseFlag(Rectangle rect, int width)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
int x = rect.X + (rect.Width - width) / 2;
|
||||
int y = rect.Y + (rect.Height - width) / 2;
|
||||
|
||||
Point p1 = new Point(x, y);
|
||||
Point p2 = new Point(x + width, y);
|
||||
Point p3 = new Point(x + width, y + width);
|
||||
Point p4 = new Point(x, y + width);
|
||||
|
||||
path.AddLine(p1, p3);
|
||||
path.CloseFigure();
|
||||
path.AddLine(p2, p4);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateSingleLineCloseFlag(Rectangle rect)
|
||||
{
|
||||
return CreateSingleLineCloseFlag(rect, 6);
|
||||
}
|
||||
|
||||
public static GraphicsPath CreatePlusFlag(Rectangle rect, int width)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
if (width % 2 == 1)
|
||||
width++;
|
||||
|
||||
int x = rect.X + (rect.Width - width) / 2;
|
||||
int y = rect.Y + (rect.Height - width) / 2;
|
||||
|
||||
Point p1 = new Point(x + width / 2 - 1, y);
|
||||
Point p2 = new Point(x + width / 2 - 1, y + width - 1);
|
||||
Point p3 = new Point(x + width / 2, y + width - 1);
|
||||
Point p4 = new Point(x + width / 2, y);
|
||||
|
||||
Point p5 = new Point(x, y + width / 2 - 1);
|
||||
Point p6 = new Point(x + width - 1, y + width / 2 - 1);
|
||||
Point p7 = new Point(x + width - 1, y + width / 2);
|
||||
Point p8 = new Point(x, y + width / 2);
|
||||
|
||||
path.AddLines(new Point[] { p1, p2, p3, p4 });
|
||||
path.CloseFigure();
|
||||
path.AddLines(new Point[] { p5, p6, p7, p8 });
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath CreatePlusFlag(Rectangle rect)
|
||||
{
|
||||
return CreatePlusFlag(rect, 10);
|
||||
}
|
||||
|
||||
public static GraphicsPath CreateDownTriangleFlag(Rectangle rect)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
int x = rect.X + (rect.Width - 10) / 2;
|
||||
int y = rect.Y + (rect.Height - 9) / 2;
|
||||
|
||||
if (rect.Height % 2 == 0)
|
||||
y++;
|
||||
|
||||
Point p1 = new Point(x, y);
|
||||
Point p2 = new Point(x + 9, y);
|
||||
Point p3 = new Point(x + 9, y + 1);
|
||||
Point p4 = new Point(x, y + 1);
|
||||
|
||||
path.AddLines(new Point[] { p1, p2, p3, p4 });
|
||||
path.CloseFigure();
|
||||
|
||||
int x1 = x, y1 = y + 4, x2 = x + 9, y2 = y + 4;
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
path.AddLine(x2, y2, x1, y1);
|
||||
else
|
||||
path.AddLine(x1, y1, x2, y2);
|
||||
x1++;
|
||||
x2--;
|
||||
y1++;
|
||||
y2++;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath Create7x4DownTriangleFlag(Rectangle rect)
|
||||
{
|
||||
return CreateWxHDownTriangleFlag(rect, 7, 4);
|
||||
}
|
||||
|
||||
public static GraphicsPath Create9x5DownTriangleFlag(Rectangle rect)
|
||||
{
|
||||
return CreateWxHDownTriangleFlag(rect, 9, 5);
|
||||
}
|
||||
|
||||
private static GraphicsPath CreateWxHDownTriangleFlag(Rectangle rect, int w, int h)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
int x = rect.X + (rect.Width - w) / 2;
|
||||
int y = rect.Y + (rect.Height - h) / 2;
|
||||
|
||||
int x1 = x, x2 = x + w - 1;
|
||||
|
||||
for (int i = 0; i < h; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
path.AddLine(x1, y, x2, y);
|
||||
else
|
||||
path.AddLine(x2, y, x1, y);
|
||||
x1++;
|
||||
x2--;
|
||||
y++;
|
||||
}
|
||||
path.CloseFigure();
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath Create7x4In7x7DownTriangleFlag(Rectangle rect)
|
||||
{
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
|
||||
int x = rect.X + (rect.Width - 7) / 2;
|
||||
int y = rect.Y + (rect.Height - 7) / 2 + 2;
|
||||
|
||||
int x1 = x, x2 = x + 6;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
path.AddLine(x1, y, x2, y);
|
||||
else
|
||||
path.AddLine(x2, y, x1, y);
|
||||
x1++;
|
||||
x2--;
|
||||
y++;
|
||||
}
|
||||
path.CloseFigure();
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
49
Source/ryControls/Gdu.WinFormUI/MyGraphics/NewGraphics.cs
Normal file
49
Source/ryControls/Gdu.WinFormUI/MyGraphics/NewGraphics.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI.MyGraphics
|
||||
{
|
||||
public class NewSmoothModeGraphics : IDisposable
|
||||
{
|
||||
SmoothingMode _oldMode;
|
||||
Graphics _graphics;
|
||||
|
||||
public NewSmoothModeGraphics(Graphics g, SmoothingMode newMode)
|
||||
{
|
||||
_oldMode = g.SmoothingMode;
|
||||
g.SmoothingMode = newMode;
|
||||
_graphics = g;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_graphics.SmoothingMode = _oldMode;
|
||||
}
|
||||
}
|
||||
|
||||
public class NewClipGraphics : IDisposable
|
||||
{
|
||||
Region _oldClip;
|
||||
Region _newClip;
|
||||
Graphics _graphics;
|
||||
bool _shouldDispose;
|
||||
|
||||
public NewClipGraphics(Graphics g, Region newClip, bool disposeNewClip)
|
||||
{
|
||||
_oldClip = g.Clip;
|
||||
_graphics = g;
|
||||
_shouldDispose = disposeNewClip;
|
||||
_newClip = newClip;
|
||||
g.Clip = newClip;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_graphics.Clip = _oldClip;
|
||||
if (_shouldDispose)
|
||||
_newClip.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
35
Source/ryControls/Gdu.WinFormUI/MyGraphics/RoundStyle.cs
Normal file
35
Source/ryControls/Gdu.WinFormUI/MyGraphics/RoundStyle.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
namespace MGdu.WinFormUI.MyGraphics
|
||||
{
|
||||
/// <summary>
|
||||
/// 圆角样式
|
||||
/// </summary>
|
||||
public enum RoundStyle
|
||||
{
|
||||
/// <summary>
|
||||
/// 无
|
||||
/// </summary>
|
||||
None,
|
||||
/// <summary>
|
||||
/// 所有
|
||||
/// </summary>
|
||||
All,
|
||||
/// <summary>
|
||||
/// 上
|
||||
/// </summary>
|
||||
Top,
|
||||
/// <summary>
|
||||
/// 下
|
||||
/// </summary>
|
||||
Bottom,
|
||||
/// <summary>
|
||||
/// 左
|
||||
/// </summary>
|
||||
Left,
|
||||
/// <summary>
|
||||
/// 右
|
||||
/// </summary>
|
||||
Right
|
||||
}
|
||||
}
|
228
Source/ryControls/Gdu.WinFormUI/Painter/BasicBlockPainter.cs
Normal file
228
Source/ryControls/Gdu.WinFormUI/Painter/BasicBlockPainter.cs
Normal file
|
@ -0,0 +1,228 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class BasicBlockPainter
|
||||
{
|
||||
|
||||
#region static method
|
||||
|
||||
public static void RenderFlatBackground(Graphics g, Rectangle rect, Color backColor,
|
||||
ButtonBorderType borderType, int radius, RoundStyle roundType)
|
||||
{
|
||||
SmoothingMode newMode;
|
||||
bool simpleRect = (borderType == ButtonBorderType.Rectangle && (roundType == RoundStyle.None || radius < 2));
|
||||
if (simpleRect)
|
||||
{
|
||||
newMode = SmoothingMode.HighSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
newMode = SmoothingMode.AntiAlias;
|
||||
rect.Width--;
|
||||
rect.Height--;
|
||||
}
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, newMode))
|
||||
{
|
||||
using (SolidBrush sb = new SolidBrush(backColor))
|
||||
{
|
||||
if (simpleRect)
|
||||
{
|
||||
g.FillRectangle(sb, rect);
|
||||
}
|
||||
else if (borderType == ButtonBorderType.Ellipse)
|
||||
{
|
||||
g.FillEllipse(sb, rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
using (GraphicsPath path = GraphicsPathHelper.CreateRoundedRect(rect, radius, roundType, false))
|
||||
{
|
||||
g.FillPath(sb, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RenderBorder(Graphics g, Rectangle rect, Color borderColor,
|
||||
ButtonBorderType borderType, int radius, RoundStyle roundType)
|
||||
{
|
||||
rect.Width--;
|
||||
rect.Height--;
|
||||
|
||||
bool simpleRect = (borderType == ButtonBorderType.Rectangle && (roundType == RoundStyle.None || radius < 2));
|
||||
SmoothingMode newMode = simpleRect ? SmoothingMode.HighSpeed : SmoothingMode.AntiAlias;
|
||||
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, newMode))
|
||||
{
|
||||
using (Pen p = new Pen(borderColor))
|
||||
{
|
||||
if (simpleRect)
|
||||
{
|
||||
g.DrawRectangle(p, rect);
|
||||
}
|
||||
else if (borderType == ButtonBorderType.Ellipse)
|
||||
{
|
||||
g.DrawEllipse(p, rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
using (GraphicsPath path = GraphicsPathHelper.CreateRoundedRect(rect, radius, roundType, false))
|
||||
{
|
||||
g.DrawPath(p, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region rectangle glass
|
||||
|
||||
public static void RenderRectangleGlass(Graphics g, Rectangle ownerRect,
|
||||
int ownerRadius, RoundStyle ownerRoundTye, RectangleGlassPosition position,
|
||||
float angle, float glassLengthFactor, Color glassColor, int alpha1, int alpha2)
|
||||
{
|
||||
if (!(glassLengthFactor > 0 && glassLengthFactor < 1))
|
||||
throw new ArgumentException("glassLengthFactor must be between 0 and 1, but not include 0 and 1. ",
|
||||
"glassLengthFactor");
|
||||
|
||||
Rectangle rect = CalcGlassRect(ownerRect, position, glassLengthFactor);
|
||||
RoundStyle round = CalcRoundStyle(position, ownerRadius, ownerRoundTye);
|
||||
|
||||
//if (angle == 0 || angle == 90 || angle == 180 || angle == 270)
|
||||
// angle++;
|
||||
|
||||
bool simpleRect = (round == RoundStyle.None);
|
||||
SmoothingMode newMode;
|
||||
if (simpleRect)
|
||||
{
|
||||
newMode = SmoothingMode.HighSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
newMode = SmoothingMode.AntiAlias;
|
||||
rect.Width--;
|
||||
rect.Height--;
|
||||
}
|
||||
|
||||
if (rect.Width < 1 || rect.Height < 1)
|
||||
return;
|
||||
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, newMode))
|
||||
{
|
||||
using (LinearGradientBrush lb = new LinearGradientBrush(rect,
|
||||
Color.FromArgb(alpha1, glassColor), Color.FromArgb(alpha2, glassColor), angle))
|
||||
{
|
||||
if (simpleRect)
|
||||
{
|
||||
g.FillRectangle(lb, rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
using (GraphicsPath path = GraphicsPathHelper.CreateRoundedRect(rect,
|
||||
ownerRadius, round, false))
|
||||
{
|
||||
g.FillPath(lb, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Rectangle CalcGlassRect(Rectangle ownerRect, RectangleGlassPosition pos, float factor)
|
||||
{
|
||||
Point location = ownerRect.Location;
|
||||
int width = ownerRect.Width;
|
||||
int height = ownerRect.Height;
|
||||
|
||||
switch (pos)
|
||||
{
|
||||
case RectangleGlassPosition.Fill:
|
||||
break;
|
||||
case RectangleGlassPosition.Top:
|
||||
height = (int)(ownerRect.Height * factor);
|
||||
break;
|
||||
case RectangleGlassPosition.Bottom:
|
||||
height = (int)(ownerRect.Height * factor);
|
||||
location.Offset(0, ownerRect.Height - height);
|
||||
break;
|
||||
case RectangleGlassPosition.Left:
|
||||
width = (int)(ownerRect.Width * factor);
|
||||
break;
|
||||
case RectangleGlassPosition.Right:
|
||||
width = (int)(ownerRect.Width * factor);
|
||||
location.Offset(ownerRect.Width - width, 0);
|
||||
break;
|
||||
}
|
||||
return new Rectangle(location, new Size(width, height));
|
||||
}
|
||||
|
||||
private static RoundStyle CalcRoundStyle(RectangleGlassPosition pos, int radius, RoundStyle ownerStyle)
|
||||
{
|
||||
if (radius < 2 || ownerStyle == RoundStyle.None)
|
||||
return RoundStyle.None;
|
||||
switch (pos)
|
||||
{
|
||||
case RectangleGlassPosition.Fill:
|
||||
return ownerStyle;
|
||||
case RectangleGlassPosition.Top:
|
||||
if (ownerStyle == RoundStyle.All || ownerStyle == RoundStyle.Top)
|
||||
return RoundStyle.Top;
|
||||
else
|
||||
return RoundStyle.None;
|
||||
case RectangleGlassPosition.Bottom:
|
||||
if (ownerStyle == RoundStyle.All || ownerStyle == RoundStyle.Bottom)
|
||||
return RoundStyle.Bottom;
|
||||
else
|
||||
return RoundStyle.None;
|
||||
case RectangleGlassPosition.Left:
|
||||
if (ownerStyle == RoundStyle.All || ownerStyle == RoundStyle.Left)
|
||||
return RoundStyle.Left;
|
||||
else
|
||||
return RoundStyle.None;
|
||||
case RectangleGlassPosition.Right:
|
||||
if (ownerStyle == RoundStyle.All || ownerStyle == RoundStyle.Right)
|
||||
return RoundStyle.Right;
|
||||
else
|
||||
return RoundStyle.None;
|
||||
default:
|
||||
return RoundStyle.None;
|
||||
}
|
||||
}
|
||||
|
||||
public static void RenderRectangleGlass(Graphics g, Rectangle ownerRect, int ownerRadius, RoundStyle ownerRoundTye)
|
||||
{
|
||||
RenderRectangleGlass(g, ownerRect, ownerRadius, ownerRoundTye, RectangleGlassPosition.Top, 90f);
|
||||
}
|
||||
|
||||
public static void RenderRectangleGlass(Graphics g, Rectangle ownerRect, int ownerRadius, RoundStyle ownerRoundTye,
|
||||
RectangleGlassPosition position, float angle)
|
||||
{
|
||||
RenderRectangleGlass(g, ownerRect, ownerRadius, ownerRoundTye, position, angle, 0.5f);
|
||||
}
|
||||
|
||||
public static void RenderRectangleGlass(Graphics g, Rectangle ownerRect, int ownerRadius, RoundStyle ownerRoundTye,
|
||||
RectangleGlassPosition position, float angle, float glassLengthFactor)
|
||||
{
|
||||
RenderRectangleGlass(g, ownerRect, ownerRadius, ownerRoundTye,
|
||||
position, angle, glassLengthFactor, Color.White, 220, 60);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
|
||||
public enum RectangleGlassPosition
|
||||
{
|
||||
Fill,
|
||||
Top,
|
||||
Right,
|
||||
Left,
|
||||
Bottom,
|
||||
}
|
||||
}
|
149
Source/ryControls/Gdu.WinFormUI/Painter/RollingBarPainter.cs
Normal file
149
Source/ryControls/Gdu.WinFormUI/Painter/RollingBarPainter.cs
Normal file
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* 本代码受中华人民共和国著作权法保护,作者仅授权下载代码之人在学习和交流范围内
|
||||
* 自由使用与修改代码;欲将代码用于商业用途的,请与作者联系。
|
||||
* 使用本代码请保留此处信息。作者联系方式:ping3108@163.com, 欢迎进行技术交流
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class RollingBarPainter
|
||||
{
|
||||
public static void RenderDefault(Graphics g, Rectangle rect, Color backColor, float startAngle,
|
||||
int radius1, int radius2, int spokeNum, float penWidth, Color[] colorArray)
|
||||
{
|
||||
|
||||
if (spokeNum < 1)
|
||||
throw new ArgumentException("spokeNum must bigger than 0", "spokeNum");
|
||||
if (spokeNum > colorArray.Length)
|
||||
throw new ArgumentException("spokeNum must NOT bigger than the length of colorArray. ", "spokeNum");
|
||||
using (SolidBrush sb = new SolidBrush(backColor))
|
||||
{
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.HighSpeed))
|
||||
{
|
||||
g.FillRectangle(sb, rect);
|
||||
}
|
||||
}
|
||||
Point NYPD = new Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
|
||||
PointF p1, p2;
|
||||
p1 = new PointF(0f, 0f);
|
||||
p2 = p1;
|
||||
double cra = 2 * Math.PI / spokeNum;
|
||||
startAngle = (float)(startAngle * 2 * Math.PI / 360f);
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.AntiAlias))
|
||||
{
|
||||
using (Pen p = new Pen(Color.White, penWidth))
|
||||
{
|
||||
p.StartCap = LineCap.Round;
|
||||
p.EndCap = LineCap.Round;
|
||||
for (int i = 0; i < spokeNum; i++)
|
||||
{
|
||||
double angle = startAngle + cra * i;
|
||||
p1.X = NYPD.X + (float)(radius1 / 2 * Math.Cos(angle));
|
||||
p1.Y = NYPD.Y + (float)(radius1 / 2 * Math.Sin(angle));
|
||||
p2.X = NYPD.X + (float)(radius2 / 2 * Math.Cos(angle));
|
||||
p2.Y = NYPD.Y + (float)(radius2 / 2 * Math.Sin(angle));
|
||||
p.Color = colorArray[i];
|
||||
g.DrawLine(p, p1, p2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RenderChromeOneQuarter(Graphics g, Rectangle rect, Color backColor,
|
||||
float startAngle, int radius, Color baseColor)
|
||||
{
|
||||
using (SolidBrush sb = new SolidBrush(backColor))
|
||||
{
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.HighSpeed))
|
||||
{
|
||||
g.FillRectangle(sb, rect);
|
||||
}
|
||||
}
|
||||
Rectangle rectgc = new Rectangle(
|
||||
rect.X + (rect.Width - radius) / 2, rect.Y + (rect.Height - radius) / 2, radius, radius);
|
||||
using (Pen p = new Pen(baseColor, 3))
|
||||
{
|
||||
p.StartCap = LineCap.Round;
|
||||
p.EndCap = LineCap.Round;
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.AntiAlias))
|
||||
{
|
||||
g.DrawArc(p, rectgc, startAngle, 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RenderDiamondRing(Graphics g, Rectangle rect, Color backColor, float startAngle,
|
||||
int radius, Color baseColor, Color diamondColor)
|
||||
{
|
||||
using (SolidBrush sb = new SolidBrush(backColor))
|
||||
{
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.HighSpeed))
|
||||
{
|
||||
g.FillRectangle(sb, rect);
|
||||
}
|
||||
}
|
||||
Point NYPD = new Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
|
||||
startAngle = (float)(startAngle * 2 * Math.PI / 360f);
|
||||
PointF pslute = PointF.Empty;
|
||||
pslute.X = NYPD.X + (float)(Math.Cos(startAngle) * radius / 2);
|
||||
pslute.Y = NYPD.Y + (float)(Math.Sin(startAngle) * radius / 2);
|
||||
|
||||
Rectangle rectce = new Rectangle(
|
||||
rect.X + (rect.Width - radius) / 2, rect.Y + (rect.Height - radius) / 2, radius, radius);
|
||||
float width = 4f;
|
||||
RectangleF rectpf = new RectangleF(pslute.X - width / 2, pslute.Y - width / 2, width, width);
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.AntiAlias))
|
||||
{
|
||||
using (Pen p = new Pen(baseColor))
|
||||
{
|
||||
g.DrawEllipse(p, rectce);
|
||||
}
|
||||
using (SolidBrush sb = new SolidBrush(diamondColor))
|
||||
{
|
||||
g.FillEllipse(sb, rectpf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RenderTheseGuys(Graphics g, Rectangle rect, Color backColor, float startAngle,
|
||||
int radius, Color baseColor)
|
||||
{
|
||||
using (SolidBrush sb = new SolidBrush(backColor))
|
||||
{
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.HighSpeed))
|
||||
{
|
||||
g.FillRectangle(sb, rect);
|
||||
}
|
||||
}
|
||||
Point NYPD = new Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
|
||||
startAngle = (float)(startAngle * 2 * Math.PI / 360f);
|
||||
PointF CIA = PointF.Empty;
|
||||
double crs = 2 * Math.PI / 10;
|
||||
RectangleF FBI = RectangleF.Empty;
|
||||
float[] theFeds = new float[] { 5f, 4f, 3f, 2f, 2f };
|
||||
Color[] DoD = ColorHelper.GetLighterArrayColors(baseColor, 5, 50f);
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.AntiAlias))
|
||||
{
|
||||
using (SolidBrush sb = new SolidBrush(baseColor))
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
CIA.X = NYPD.X + (float)(Math.Cos(startAngle - i * crs) * radius / 2);
|
||||
CIA.Y = NYPD.Y + (float)(Math.Sin(startAngle - i * crs) * radius / 2);
|
||||
FBI = new RectangleF(
|
||||
CIA.X - theFeds[i] / 2, CIA.Y - theFeds[i] / 2, theFeds[i], theFeds[i]);
|
||||
sb.Color = DoD[4 - i];
|
||||
g.FillEllipse(sb, FBI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
/// <summary>
|
||||
/// SimpleObject指的是只有一种状态(不像普通按钮一样有三种状态),并且其上的元素
|
||||
/// 布局比较简单的Object
|
||||
/// </summary>
|
||||
public class SimpleObjectPainter
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="g"></param>
|
||||
/// <param name="rect"></param>
|
||||
/// <param name="coveredColor"></param>
|
||||
/// <param name="borderColor"></param>
|
||||
/// <param name="backColor"></param>
|
||||
/// <param name="drawInnerBorder"></param>
|
||||
/// <param name="startAngle"></param>
|
||||
/// <param name="percentage"></param>
|
||||
/// <param name="drawText"></param>
|
||||
/// <param name="textFont"></param>
|
||||
public static void RenderCircleProgressBar(Graphics g, Rectangle rect, Color coveredColor, Color borderColor,
|
||||
Color backColor, bool drawInnerBorder, int startAngle, int percentage, bool drawText, Font textFont)
|
||||
{
|
||||
using (NewSmoothModeGraphics ng = new NewSmoothModeGraphics(g, SmoothingMode.AntiAlias))
|
||||
{
|
||||
Rectangle backup = rect;
|
||||
rect.Width--;
|
||||
rect.Height--;
|
||||
|
||||
if (percentage < 0)
|
||||
percentage = 0;
|
||||
if (percentage > 360)
|
||||
percentage = 360;
|
||||
|
||||
SolidBrush brushBack = new SolidBrush(backColor);
|
||||
Pen penBorder = new Pen(borderColor);
|
||||
|
||||
// fill background
|
||||
g.FillEllipse(brushBack, rect);
|
||||
|
||||
// outter most circle
|
||||
g.DrawEllipse(penBorder, rect);
|
||||
|
||||
// pie covered region
|
||||
rect.Inflate(-1, -1);
|
||||
if (drawInnerBorder)
|
||||
rect.Inflate(-1, -1);
|
||||
using (SolidBrush sb = new SolidBrush(coveredColor))
|
||||
{
|
||||
g.FillPie(sb, rect, startAngle, 360 * percentage / 100);
|
||||
}
|
||||
|
||||
// inner circle background
|
||||
rect = backup;
|
||||
rect.Inflate(-rect.Width / 4, -rect.Width / 4);
|
||||
g.FillEllipse(brushBack, rect);
|
||||
|
||||
// inner circle line
|
||||
rect.Inflate(-1, -1);
|
||||
if (drawInnerBorder)
|
||||
rect.Inflate(-1, -1);
|
||||
g.DrawEllipse(penBorder, rect);
|
||||
|
||||
// text
|
||||
if (drawText)
|
||||
{
|
||||
string text = percentage.ToString() + "%";
|
||||
TextRenderer.DrawText(g, text, textFont, backup, Color.Black,
|
||||
TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter);
|
||||
}
|
||||
|
||||
brushBack.Dispose();
|
||||
penBorder.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
/// <summary>
|
||||
/// DevExpress风格皮肤
|
||||
/// </summary>
|
||||
public class ThemeFormDevExpress : ThemeFormBase
|
||||
{
|
||||
/// <summary>
|
||||
/// DevExpress风格皮肤
|
||||
/// </summary>
|
||||
public ThemeFormDevExpress()
|
||||
: base()
|
||||
{
|
||||
ThemeName = "DevExpress Default";
|
||||
|
||||
BorderWidth = 2;
|
||||
CaptionHeight = 30;
|
||||
IconSize = new Size(16, 16);
|
||||
ControlBoxOffset = new Point(8, 8);
|
||||
ControlBoxSpace = 2;
|
||||
SideResizeWidth = 4;
|
||||
UseDefaultTopRoundingFormRegion = false;
|
||||
|
||||
CaptionBackColorBottom = Color.White;
|
||||
CaptionBackColorTop = Color.White;
|
||||
|
||||
RoundedStyle = RoundStyle.None;
|
||||
|
||||
FormBorderOutterColor = Color.FromArgb(0, 144, 198);
|
||||
FormBorderInnerColor = Color.White;
|
||||
SetClientInset = false;
|
||||
|
||||
CaptionTextCenter = true;
|
||||
CaptionTextColor = Color.FromArgb(102, 102, 102);
|
||||
FormBackColor = Color.White;
|
||||
}
|
||||
}
|
||||
}
|
41
Source/ryControls/Gdu.WinFormUI/Theme/Form/ThemeFormNew.cs
Normal file
41
Source/ryControls/Gdu.WinFormUI/Theme/Form/ThemeFormNew.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
/// <summary>
|
||||
/// 新风格皮肤
|
||||
/// </summary>
|
||||
public class ThemeFormNew : ThemeFormBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 新风格皮肤
|
||||
/// </summary>
|
||||
public ThemeFormNew()
|
||||
: base()
|
||||
{
|
||||
// about theme
|
||||
ThemeName = "A New Look Theme";
|
||||
|
||||
UseDefaultTopRoundingFormRegion = false;
|
||||
BorderWidth = 2;
|
||||
CaptionHeight = 36;
|
||||
IconSize = new Size(24, 24);
|
||||
ControlBoxOffset = new Point(6, 9);
|
||||
ControlBoxSpace = 2;
|
||||
MaxBoxSize = MinBoxSize = CloseBoxSize = new Size(32, 18);
|
||||
SideResizeWidth = 4;
|
||||
|
||||
CaptionBackColorBottom = Color.LightSlateGray;
|
||||
CaptionBackColorTop = ColorHelper.GetLighterColor(CaptionBackColorBottom, 40);
|
||||
|
||||
RoundedStyle = RoundStyle.None;
|
||||
|
||||
FormBorderOutterColor = Color.Black;
|
||||
FormBorderInnerColor = Color.FromArgb(200, Color.White);
|
||||
SetClientInset = false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using MGdu.WinFormUI.MyGraphics;
|
||||
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础皮肤
|
||||
/// </summary>
|
||||
public class ThemeFormVS2013 : ThemeFormBase
|
||||
{
|
||||
/// <summary>
|
||||
/// VS2013风格皮肤
|
||||
/// </summary>
|
||||
public ThemeFormVS2013()
|
||||
: base()
|
||||
{
|
||||
ThemeName = "A VS2013 Look";
|
||||
|
||||
BorderWidth = 1;
|
||||
CaptionHeight = 38;
|
||||
IconSize = new Size(22, 22);
|
||||
CloseBoxSize = MaxBoxSize = MinBoxSize = new Size(34, 27);
|
||||
ControlBoxOffset = new Point(1, 1);
|
||||
ControlBoxSpace = 1;
|
||||
SideResizeWidth = 6;
|
||||
UseDefaultTopRoundingFormRegion = false;
|
||||
|
||||
CaptionBackColorBottom = CaptionBackColorTop = Color.FromArgb(214, 219, 233);
|
||||
|
||||
RoundedStyle = RoundStyle.None;
|
||||
|
||||
FormBorderOutterColor = Color.FromArgb(0, 0, 0);
|
||||
SetClientInset = false;
|
||||
|
||||
CaptionTextColor = Color.FromArgb(0, 0, 0);
|
||||
FormBackColor = Color.FromArgb(42, 58, 86);
|
||||
|
||||
CloseBoxColor = ButtonColorTable.GetColorTableVs2013Theme();
|
||||
MaxBoxColor = MinBoxColor = CloseBoxColor;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class ThemeProgressBarBlue : ThemeProgressBarGreen
|
||||
{
|
||||
public ThemeProgressBarBlue()
|
||||
{
|
||||
CoveredColor = Color.FromArgb(181, 205, 242);
|
||||
LeadingEdgeColor = Color.FromArgb(153, 163, 180);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class ThemeProgressBarGreen : GMProgessBarThemeBase
|
||||
{
|
||||
public ThemeProgressBarGreen()
|
||||
{
|
||||
DrawInnerBorder = false;
|
||||
DrawCoveredColorGlass = true;
|
||||
DrawLeadingEdge = true;
|
||||
DrawBackColorGlass = true;
|
||||
|
||||
CoveredColor = Color.FromArgb(176, 229, 124);
|
||||
BorderColor = Color.FromArgb(165, 178, 152);
|
||||
LeadingEdgeColor = Color.FromArgb(188, 203, 173);
|
||||
BackColor = Color.FromArgb(211, 220, 226);
|
||||
|
||||
BorderRadius = 2;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class ThemeProgressBarSoftGreen : GMProgessBarThemeBase
|
||||
{
|
||||
public ThemeProgressBarSoftGreen()
|
||||
{
|
||||
CoveredColor = Color.FromArgb(23, 143, 54);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
/// <summary>
|
||||
/// this theme is just for chrome one quarter style
|
||||
/// </summary>
|
||||
public class ThemeRollingBarChromeGreen : GMRollingBarThemeBase
|
||||
{
|
||||
public ThemeRollingBarChromeGreen()
|
||||
{
|
||||
Radius1 = 14;
|
||||
BaseColor = System.Drawing.Color.LightSeaGreen;
|
||||
BackColor = System.Drawing.Color.White;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class ThemeRollingBarCircleDots : GMRollingBarThemeBase
|
||||
{
|
||||
public ThemeRollingBarCircleDots()
|
||||
{
|
||||
Radius1 = 12;
|
||||
Radius2 = 14;
|
||||
PenWidth = 4f;
|
||||
SpokeNum = 9;
|
||||
|
||||
BaseColor = Color.LightSeaGreen;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
//忽略没有注释警告
|
||||
#pragma warning disable 1591
|
||||
namespace MGdu.WinFormUI
|
||||
{
|
||||
public class ThemeRollingBarFullCircle : GMRollingBarThemeBase
|
||||
{
|
||||
public ThemeRollingBarFullCircle()
|
||||
{
|
||||
SpokeNum = 36;
|
||||
Radius1 = 16;
|
||||
Radius2 = 18;
|
||||
PenWidth = 4;
|
||||
|
||||
BaseColor = Color.DarkGray;
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user