public int Add(ThreadedListViewGroup value)
 {
     NativeMethods.API.AddListViewGroup(_owner.Handle, value.GroupText, value.GroupIndex);
     if (GroupAdded != null)
     {
         GroupAdded(this, new ListViewGroupEventArgs(value));
     }
     return(List.Add(value));
 }
 public void Remove(ThreadedListViewGroup value)
 {
     NativeMethods.API.RemoveListViewGroup(_owner.Handle, value.GroupIndex);
     if (GroupRemoved != null)
     {
         GroupRemoved(this, new ListViewGroupEventArgs(value));
     }
     List.Remove(value);
 }
        public int Add(string text, int index)
        {
            ThreadedListViewGroup itm = new ThreadedListViewGroup(text, index);

            NativeMethods.API.AddListViewGroup(_owner.Handle, text, index);
            if (GroupAdded != null)
            {
                GroupAdded(this, new ListViewGroupEventArgs(itm));
            }
            return(List.Add(itm));
        }
Esempio n. 4
0
 public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
 {
     if (destinationType == typeof(InstanceDescriptor))
     {
         Type[] signature          = { typeof(string), typeof(int) };
         ThreadedListViewGroup itm = ((ThreadedListViewGroup)value);
         object[] args             = { itm.GroupText, itm.GroupIndex };
         return(new InstanceDescriptor(typeof(ThreadedListViewGroup).GetConstructor(signature), args, false));
     }
     return(base.ConvertTo(context, culture, value, destinationType));
 }
 public bool Contains(ThreadedListViewGroup value)
 {
     return(List.Contains(value));
 }
 public void Insert(int index, ThreadedListViewGroup value)
 {
     List.Insert(index, value);
 }
 public int IndexOf(ThreadedListViewGroup value)
 {
     return(List.IndexOf(value));
 }
 public ListViewGroupEventArgs(ThreadedListViewGroup item)
 {
     mItem = item;
 }