Ejemplo n.º 1
0
        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
        {
            if (destType == typeof(string) && value is SyncLocation)
            {
                // Cast the value to an Employee type
                SyncLocation emp = (SyncLocation)value;

                // Return department and department role separated by comma.
                return(emp.IpAddress + ", " + emp.Name);
            }
            return(base.ConvertTo(context, culture, value, destType));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Removes an employee object from the collection
 /// </summary>
 /// <param name="emp"></param>
 public void Remove(SyncLocation emp)
 {
     this.List.Remove(emp);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds an employee object to the collection
 /// </summary>
 /// <param name="emp"></param>
 public void Add(SyncLocation emp)
 {
     this.List.Add(emp);
 }