Пример #1
0
 public SyncLocationCollectionPropertyDescriptor(SyncLocationCollection coll, int idx)
     :
     base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index      = idx;
 }
Пример #2
0
 public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
 {
     if (destType == typeof(string) && value is SyncLocationCollection)
     {
         SyncLocationCollection col = value as SyncLocationCollection;
         if (col != null)
         {
             return(col.Count.ToString() + " Sync Locations");
         }
         // Return department and department role separated by comma.
         return("Sync Locations data");
     }
     return(base.ConvertTo(context, culture, value, destType));
 }