Exemple #1
0
        internal static string GetTreeViewSelectedSummary(TreeViewSelection selection, string[] names)
        {
            var selectedStrings = selection.GetSelectedStrings(names, true);
            var numStrings = selectedStrings.Length;

            if (numStrings == 0)
                return "None";

            if (numStrings == 1)
                return selectedStrings[0];

            return string.Join(", ", selectedStrings);
        }
        private string GetSelectedSummary(TreeViewSelection selection, string[] names)
        {
            string[] selectedStrings = selection.GetSelectedStrings(names, true);
            int      numStrings      = selectedStrings.Length;

            if (numStrings == 0)
            {
                return("None");
            }

            if (numStrings == 1)
            {
                return(selectedStrings[0]);
            }

            return(string.Join(", ", selectedStrings));
        }