예제 #1
0
        /// <summary>
        ///     Prompts the user to choose their user id
        /// </summary>
        /// <param name="owner">Console IP Address</param>
        /// <returns></returns>
        public static string GetUserId(Form owner)
        {
            var userIds = GetFolderNames("/dev_hdd0/home/");

            if (userIds.Count >= 1)
            {
                return(DialogExtensions.ShowListInputDialog(owner, "User Profile IDs", userIds));
            }
            _ = DarkMessageBox.Show(owner,
                                    "Could not find any users on your console. Make sure you have at least one user profile and then try again.",
                                    "No Users Found", MessageBoxIcon.Error);
            return(null);
        }
예제 #2
0
        /// <summary>
        /// Prompts the user to choose their profile user id.
        /// </summary>
        /// <param name="owner"> Console IP Address </param>
        /// <returns> </returns>
        public static string GetUserProfileId(Form owner)
        {
            List <string> userIds = GetFolderNames("/dev_hdd0/home/", false);

            List <string> userNames = (from userId in userIds
                                       select $"{userId} ({GetUserNameFromUserId(userId)})").ToList();

            if (userIds.Count > 0)
            {
                string userId = DialogExtensions.ShowListInputDialog(owner, "User Profile IDs", userNames).Split()[0];

                if (userId != null)
                {
                    return(userId);
                }
            }

            XtraMessageBox.Show("Could not find any users. Make sure you have created at least one user profile.", "No Users Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
            return(null);
        }