Exemple #1
0
 public OptionPageGrid()
 {
     MSBuildPath = @"c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe";
     DeployFolders = new DeployFolderCollection();
     AutoDeploy = true;
     DisableCA = true;
     DisableOptimize = true;
 }
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            if (value is string)
            {
                string s = value.ToString();
                string[] allfolders = s.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);

                DeployFolderCollection collection = new DeployFolderCollection();

                foreach (var item in allfolders)
                {
                    collection.Add(new DeployFolder(item.Trim(new char[] {'|', '*'}), item.EndsWith("*")));
                }

                return collection;
            }

            return base.ConvertFrom(context, culture, value);
        }
 public DeployFolderCollectionPropertyDescriptor(DeployFolderCollection coll, int idx)
     : base("#"+idx.ToString(), null)
 {
     this.collection = coll;
     this.index = idx;
 }