Beispiel #1
0
        private static void ModifyWallpaperOrder(ref string[] wallpapersToModify)
        {
            /* TODO
             * // request next 3 wallpapers, determine their preferred setting
             * // set first display with said preferred setting
             * // request next 3 wallpapers
             * // set second display with preferred setting
             * // no request
             * // set first wallpaper to next wallpaper (Using second set of requested wallpapers)
             * // request next 3 wallpapers, this changes the third wallpaper setting
             * // set third display, this will use the *second* preferred setting (Using third set of requested wallpapers)
             * // essentially, there will always be an upcoming set of preferred wallpapers, once that set surpassed, a new set will be made that all displays will have to follow
             */

            if (IsWallpapersValid(wallpapersToModify))
            {
                string[] reorderedWallpapers = new string[0];
                if (OptionsData.ThemeOptions.HigherRankedImagesOnLargerDisplays || OptionsData.ThemeOptions.LargerImagesOnLargerDisplays)
                {
                    int[] largestMonitorIndexOrder = DisplayData.GetLargestDisplayIndexOrder();

                    if (OptionsData.ThemeOptions.HigherRankedImagesOnLargerDisplays)
                    {
                        reorderedWallpapers = (from f in wallpapersToModify orderby WallpaperData.GetImageRank(f) descending select f).ToArray();

                        // both ranking and size are now a factor so first an image's rank will determine their index and then afterwards
                        // any ranking conflicts have their indexes determined by size rather than being random
                        if (OptionsData.ThemeOptions.LargerImagesOnLargerDisplays)
                        {
                            ConflictResolveIdenticalRanks(ref reorderedWallpapers);
                        }
                    }
                    else if (OptionsData.ThemeOptions.LargerImagesOnLargerDisplays)
                    {
                        reorderedWallpapers = LargestImagesWithCustomFilePath(wallpapersToModify);
                    }

                    //? Applies the final modification
                    wallpapersToModify = ApplyModifiedPathOrder(reorderedWallpapers, largestMonitorIndexOrder);
                }
            }
        }