Ejemplo n.º 1
0
        private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            if (msg != 513 && msg != 516)
            {
                return(hwnd);
            }
            try
            {
                var w32Mouse = new Win32Point();
                GetCursorPos(ref w32Mouse);
                var realpt = PointFromScreen(w32Mouse.ToPoint());
                var cts    = InputHitTest(realpt) as FrameworkElement;
                var btn    = GetClickControl <Button>(cts); //点击的按钮

                var tapInfo = new PointTouchInfo
                {
                    ViewName      = cts?.GetType().FullName,
                    ButtonContent = btn.Name,
                    PointX        = realpt.X,
                    PointY        = realpt.Y
                };
                MongoDbLogger.Insert(LogType.LogPointTouch, LogLevel.Info, tapInfo);

                Task.Run(() => { Console.Beep(1000, 200); });
            }
            catch (Exception ex)
            {
                Logger.Main.Error($"[系统打点]打点时出现异常,详情:{ex.Message}\r\n{ex.StackTrace}");
            }

            return(hwnd);
        }
Ejemplo n.º 2
0
 public void Error(string message)
 {
     MongoDbLogger.Insert(_logType, LogLevel.Error, message);
 }
Ejemplo n.º 3
0
 public void Warn(string message)
 {
     MongoDbLogger.Insert(_logType, LogLevel.Warn, message);
 }
Ejemplo n.º 4
0
 public void Debug(string message)
 {
     MongoDbLogger.Insert(_logType, LogLevel.Info, message);
 }
Ejemplo n.º 5
0
 public static void Debug(LogType type, object obj)
 {
     MongoDbLogger.Insert(type, LogLevel.Debug, obj);
 }
Ejemplo n.º 6
0
 public static void FatalFormat(LogType type, string format, params object[] args)
 {
     MongoDbLogger.Insert(type, LogLevel.Fatal, string.Format(format, args));
 }
Ejemplo n.º 7
0
 public static void Fatal(LogType type, object obj)
 {
     MongoDbLogger.Insert(type, LogLevel.Fatal, obj);
 }
Ejemplo n.º 8
0
 public static void Error(LogType type, object obj)
 {
     MongoDbLogger.Insert(type, LogLevel.Error, obj);
 }
Ejemplo n.º 9
0
 public static void Warn(LogType type, object obj)
 {
     MongoDbLogger.Insert(type, LogLevel.Warn, obj);
 }
Ejemplo n.º 10
0
 public static void Info(LogType type, object obj)
 {
     MongoDbLogger.Insert(type, LogLevel.Info, obj);
 }
Ejemplo n.º 11
0
 public void Fatal(string message)
 {
     MongoDbLogger.Insert(_logType, LogLevel.Fatal, message);
 }