public RelativeMouseEmulator(Window window) { this.window = window; }
public static Window Create(SmartProcess process, HWND handle) { var wnd = new Window(process, handle); var title = wnd.Title; if (wnd.ProcessName == "explorer") { if (title == "Start") { //start window wnd.Type = WindowType.Windows; } else if (title == "Run") { wnd.Type = WindowType.Run; } else { var ie = _explorer_monitor.Object.FirstOrDefault(_ie => _ie.hWnd == handle); if (ie != null) { wnd.Type = WindowType.Explorer; wnd.Data.Add("Path", ie.Location); } } } else if (wnd.ProcessName == "chrome" || wnd.ProcessName == "firefox" || wnd.ProcessName == "opera" || wnd.ProcessName == "iexplorer") { wnd.Type = WindowType.Explorer; } return wnd; }