public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List <string> choices = new List <string>(); string prefix = (context.Instance is ReportOutput ? Repository.SealRepositoryKeyword + "\\Reports" : ""); choices.Add(prefix + "\\"); FileHelper.AddFolderChoices(Repository.Instance.ReportsFolder, prefix, choices); return(new StandardValuesCollection(choices)); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { List <string> choices = new List <string>(); string prefix = ""; if (context.Instance is ReportOutput) { var output = context.Instance as ReportOutput; if (output.Device is OutputFileServerDevice) { //List of subfolders defined return(new StandardValuesCollection(((OutputFileServerDevice)output.Device).DirectoriesArray)); } else { prefix = Repository.SealRepositoryKeyword + Path.DirectorySeparatorChar.ToString() + "Reports"; } } choices.Add(prefix + Path.DirectorySeparatorChar); FileHelper.AddFolderChoices(Repository.Instance.ReportsFolder, prefix, choices); return(new StandardValuesCollection(choices)); }