예제 #1
0
 private void tick()
 {
     try
     {
         uint ProcessId;
         WindowHandles.GetWindowThreadProcessId(WindowHandles.GetForegroundWindow(), out ProcessId);
         using (Process processById = Process.GetProcessById((int)ProcessId))
             base.Value = (object)processById.MainModule.FileName;
     }
     catch (Exception ex)
     {
         base.Unavailable();
     }
 }
예제 #2
0
 private void tick()
 {
     try
     {
         uint ProcessId;
         WindowHandles.GetWindowThreadProcessId(WindowHandles.GetForegroundWindow(), out ProcessId);
         using (Process processById = Process.GetProcessById((int)ProcessId))
             base.Value = !processById.Responding ? (object)"INACTIVE" : (object)"ACTIVE";
     }
     catch (Exception ex)
     {
         base.Unavailable();
     }
 }