Beispiel #1
0
        private static void ReAssignFolderBack(ProfileInfo profileInfo, String folderLocation)
        {
            var streamDeckType = SDUtil.GetStreamDeckTypeFromProfile(profileInfo);

            SDUtil.DisplayKeyLayout(streamDeckType);
            int maxCols = SDUtil.GetColumnsForStreamDeckType(streamDeckType);
            int maxRows = SDUtil.GetRowsForStreamDeckType(streamDeckType);

            Console.WriteLine($"Moving the back location for the folder in location: {folderLocation}");
            Console.WriteLine("Choose where you would like the Back button to move to. If that position is already used, it will be moved to the Top-Left (0,0) position\r\n");
            Console.Write($"Enter the Column to put the back folder on [0-{maxCols - 1}]:");
            int?col = SanitizeNumericInput(maxCols);

            if (col == null || !col.HasValue)
            {
                return;
            }

            Console.Write($"Enter the Row to put the back folder on [0-{maxRows - 1}]:");
            int?row = SanitizeNumericInput(maxRows);

            if (row == null || !row.HasValue)
            {
                return;
            }
            pe.MoveFolderBackLocation(profileInfo, folderLocation, $"{col.Value},{row.Value}");
        }
Beispiel #2
0
        private static string GetFolderLocationToEdit(ProfileInfo profileInfo)
        {
            int idx = 1;
            int?folderNum;
            var folders = pe.FindProfileFolderActions(profileInfo);

            if (folders == null || folders.Count == 0)
            {
                Console.WriteLine("Profile does not have any top-level folders");
                return(null);
            }

            var streamDeckType = SDUtil.GetStreamDeckTypeFromProfile(profileInfo);

            SDUtil.DisplayKeyLayout(streamDeckType);

            Console.WriteLine("\r\nFolders in profile:");
            foreach (var location in folders)
            {
                Console.WriteLine($"[{idx}]   Location: {location}");
                idx++;
            }

            Console.WriteLine("The key location is the physical location of the folder on the Stream Deck.\r\nSo 0,0 is the top left key. Only actual folders are shown above.");
            Console.Write("Enter the number (NUMBER in the square brackets NOT the location) of the folder to edit: ");

            folderNum = SanitizeNumericInput(idx - 1);
            if (folderNum == null || !folderNum.HasValue)
            {
                return(null);
            }

            return(folders[folderNum.Value - 1]);
        }