예제 #1
0
        public int Add(ImageIndexMapping day)
        {
            int i;

            i = InnerList.Add(day);
            // Must be refres control
            //if (OnAddNewButton != null) {
            //    OnAddNewButton(Button);
            //}
            return(i);
        }
예제 #2
0
        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));
        }
예제 #3
0
 public void Remove(ImageIndexMapping day)
 {
     InnerList.Remove(day);
 }
예제 #4
0
 public bool Contains(ImageIndexMapping day)
 {
     return(InnerList.Contains(day));
 }
예제 #5
0
 public int IndexOf(ImageIndexMapping day)
 {
     return(InnerList.IndexOf(day));
 }