Exemplo n.º 1
0
        private void InitFolderPath(FileDialog dialog, FilterIndex filterIndex)
        {
            var folderPath = string.Empty;

            if (!string.IsNullOrWhiteSpace(dialog.FileName))
            {
                folderPath = Path.GetDirectoryName(dialog.FileName);
            }
            if (string.IsNullOrWhiteSpace(folderPath))
            {
                dialog.InitialDirectory = AppController.GetDefaultFolder(filterIndex);
            }
        }