public int Add(ImageIndexMapping day) { int i; i = InnerList.Add(day); // Must be refres control //if (OnAddNewButton != null) { // OnAddNewButton(Button); //} return(i); }
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(InstanceDescriptor)) { try { ImageIndexMapping m = (ImageIndexMapping)value; ConstructorInfo cInfo = typeof(ImageIndexMapping).GetConstructor(new Type[] { typeof(SpecialDay), typeof(int) }); return(new InstanceDescriptor(cInfo, new object[] { m.Owner, m.ImageIndex }, true)); } catch (Exception ex) { MessageBox.Show("Poo : " + ex.ToString()); return(base.ConvertTo(context, culture, value, destinationType)); } //m = new ImageIndexMapping(SpecialDay, int); //ConstructorInfo cInfo = typeof(ImageIndexMapping).GetConstructor(new Type[] { typeof(int) }); //return new InstanceDescriptor(cInfo, new object[] {m.ImageIndex}, true); //ConstructorInfo cInfo = typeof(ImageIndexMapping).GetConstructor(System.Type.EmptyTypes); //return new InstanceDescriptor(cInfo, null, false); } return(base.ConvertTo(context, culture, value, destinationType)); }
public void Remove(ImageIndexMapping day) { InnerList.Remove(day); }
public bool Contains(ImageIndexMapping day) { return(InnerList.Contains(day)); }
public int IndexOf(ImageIndexMapping day) { return(InnerList.IndexOf(day)); }