示例#1
0
        /// <summary>
        /// Picks the file.
        /// </summary>
        public static void PickDirectory(this SpecialFolder startDirectory, string dialogmsg, Action <string> directorySelected_Action)
        {
            DirectoryPicker pck = new DirectoryPicker();

            pck.InitialDirectory = startDirectory;
            string pth;

            if (pck.PickPath(dialogmsg, out pth) && Directory.Exists(pth))
            {
                directorySelected_Action(pth);
            }
        }