Beispiel #1
0
 public static void keyboardHook_OnKeyDownEvent(object sender, KeyEventArgs e)
 {
     if (sender != null)
     {
         DebugTextBox.DebugText(sender.ToString());
     }
     if (e != null)
     {
         DebugTextBox.DebugText(e.ToString());
     }
 }
Beispiel #2
0
 //鼠标事件处理程序
 public static void mouseHook_OnMouseActivity(object sender, MouseEventArgs e)
 {
     if (sender != null)
     {
         DebugTextBox.DebugText(sender.ToString());
         ExceptionLog.Log(sender.ToString());
     }
     if (e != null)
     {
         DebugTextBox.DebugText(e.Button.ToString());
         ExceptionLog.Log(e.Button.ToString());
     }
 }
        /// <summary>
        /// 绘制截图编辑选中的画笔
        /// </summary>
        /// <param name="g"></param>
        /// <param name="pen"></param>
        /// <param name="brush"></param>
        public static void DrawSelectedBrush(ref Graphics g, ref ToolsRuntimeStyle currentToolStyle, System.Collections.ArrayList pointList)
        {
            if (Program.debugMode)
            {
                DebugTextBox.DebugText("DrawEditSelected_Brush>this.pointList.Count=" + pointList.Count.ToString());
            }
            if (pointList.Count == 0)
            {
                return;
            }

            g.SmoothingMode = SmoothingMode.AntiAlias;
            SolidBrush sbrush = new SolidBrush(currentToolStyle.BorderColor);

            for (int i = 0; i < pointList.Count; i++)
            {
                System.Drawing.Point point = (Point)pointList[i];
                g.FillEllipse(sbrush, point.X, point.Y, currentToolStyle.BorderWidth, currentToolStyle.BorderWidth);
            }
        }