Browse Source

修改用户登陆权限

KWD 3 tháng trước cách đây
mục cha
commit
c885d894ba
1 tập tin đã thay đổi với 12 bổ sung12 xóa
  1. 12 12
      TeamAAS-VM/ViewModels/MainWindowViewModel.cs

+ 12 - 12
TeamAAS-VM/ViewModels/MainWindowViewModel.cs

@@ -58,7 +58,7 @@ namespace TeamAAS_VP.ViewModels
         /// 工程师和管理员权限的无操作超时时长。
         /// 超过该时长后自动切回操作员权限。
         /// </summary>
-        private readonly TimeSpan PermissionIdleTimeout = TimeSpan.FromMinutes(3);
+        private readonly TimeSpan PermissionIdleTimeout = TimeSpan.FromMinutes(0.5);
 
         /// <summary>
         /// 权限空闲检测计时器。
@@ -404,7 +404,7 @@ namespace TeamAAS_VP.ViewModels
         private void OnClose()
         {
             StopPermissionIdleMonitor();
-            Stop();
+            //Stop();
         }
 
         private void SendTaskMessage(string msg, MessageLevel level)
@@ -499,16 +499,16 @@ namespace TeamAAS_VP.ViewModels
         /// <param name="e">输入事件参数。</param>
         private void OnUserInput(object sender, ProcessInputEventArgs e)
         {
-            //var input = e?.StagingItem?.Input;
-            //if (input is KeyEventArgs ||
-            //    input is MouseButtonEventArgs ||
-            //    input is MouseWheelEventArgs ||
-            //    input is MouseEventArgs ||
-            //    input is TouchEventArgs ||
-            //    input is StylusEventArgs)
-            //{
-            //    _lastPermissionActivityTime = DateTime.Now;
-            //}
+            var input = e?.StagingItem?.Input;
+            if (input is KeyEventArgs ||
+                input is MouseButtonEventArgs ||
+                input is MouseWheelEventArgs ||
+                input is MouseEventArgs ||
+                input is TouchEventArgs ||
+                input is StylusEventArgs)
+            {
+                _lastPermissionActivityTime = DateTime.Now;
+            }
         }
 
         /// <summary>