public static List <IntPtr> GetAllWindows(string appName)
        {
            List <IntPtr> visibleWindows = new List <IntPtr>();

            SetHandles();
            List <Process> visibleProcesses = ProcessManager.GetVisibleProcesses();

            foreach (IntPtr window in VisibleWindows)
            {
                ProcessManager.GetStartingFileAndName(window, visibleProcesses, out string path, out string name);
                if (appName == name)
                {
                    visibleWindows.Add(window);
                }
            }
            return(visibleWindows);
        }
        public static List <AppModel> GetVisibleApps(out List <string> titles, out List <IntPtr> windows)
        {
            List <AppModel> visibleApps = new List <AppModel>();

            SetHandles();
            titles  = new List <string>();
            windows = new List <IntPtr>();
            List <Process> visibleProcesses = ProcessManager.GetVisibleProcesses();

            foreach (IntPtr window in VisibleWindows)
            {
                if (FilterWindow(window, visibleProcesses, out string startingFile, out string name))
                {
                    visibleApps.Add(CreateAppModel(startingFile, name, window));
                    windows.Add(window);
                    titles.Add(GetWindowText(window));
                }
            }
            return(visibleApps);
        }