Esempio n. 1
0
 public WindowProcess(IntPtr hWnd)
 {
     this.hWnd = hWnd;
     try
     {
         this.pid           = WindowProcessor.GetProcessId(hWnd);
         this.imageFullPath = WindowProcessor.GetProcessFilePath(this.pid);
         // imageFolderName = Path.GetDirectoryName(imageFullPath);
         this.imageFileName = Path.GetFileName(imageFullPath);
         this.windowText    = WindowProcessor.GetWindowText(hWnd);
     }
     catch (Exception ex)
     {
         Console.Out.WriteLine(ex.Message);
     }
     finally
     {
         this.timeRegistered = DateTime.Now;
     }
 }
Esempio n. 2
0
 public bool isAlive()
 {
     return(WindowProcessor.GetProcessId(this.hWnd) == this.pid);
 }