コード例 #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 public WindowSearchResult(Window window, List<int> matchesInTitle, List<int> matchesInProcessName, SearchType matchType)
 {
     this.ResultWindow = window;
     this.SearchMatchesInTitle = matchesInTitle;
     this.SearchMatchesInProcessName = matchesInProcessName;
     this.SearchResultMatchType = matchType;
     this.CalculateScore();
 }
コード例 #2
0
        /// <summary>
        /// Call back method for window enumeration
        /// </summary>
        /// <param name="hwnd">The handle to the current window being enumerated</param>
        /// <param name="lParam">Value being passed from the caller (we don't use this but might come in handy
        /// in the future</param>
        /// <returns>true to make sure to contiue enumeration</returns>
        public bool WindowEnumerationCallBack(IntPtr hwnd, IntPtr lParam)
        {
            Window newWindow = new Window(hwnd);

            if (newWindow.Visible && !newWindow.ProcessName.ToLower().Equals("iexplore.exe") ||
                (newWindow.ProcessName.ToLower().Equals("iexplore.exe") && newWindow.ClassName == "TabThumbnailWindow"))
            {
                this.windows.Add(newWindow);

                if (OnOpenWindowsUpdate != null)
                {
                    this.OnOpenWindowsUpdate(this, new Window.WindowListUpdateEventArgs());
                }
            }

            return true;
        }
コード例 #3
0
 public void OpenWindowsUpdateHandler(object sender, Window.WindowListUpdateEventArgs e)
 {
     this.SyncOpenWindowsWithModelAsync();
 }
コード例 #4
0
 /// <summary>
 /// Constructor for WindowResult
 /// </summary>
 public WindowResult(Window window)
     : base(window.Hwnd)
 {
     LettersInBetweenScore = WindowResult.NoResult;
 }