public void Assign(GarnetTabStripItem item) { Visible = item.Visible; Text = item.Text; CanClose = item.CanClose; Tag = item.Tag; }
public virtual GarnetTabStripItem MoveTo(int newIndex, GarnetTabStripItem item) { int currentIndex = List.IndexOf(item); if (currentIndex >= 0) { RemoveAt(currentIndex); Insert(0, item); return item; } return null; }
public virtual void Remove(GarnetTabStripItem item) { if (List.Contains(item)) List.Remove(item); }
public virtual int IndexOf(GarnetTabStripItem item) { return List.IndexOf(item); }
public virtual void Insert(int index, GarnetTabStripItem item) { if (Contains(item)) return; List.Insert(index, item); }
public virtual void Assign(GarnetTabStripItemCollection collection) { BeginUpdate(); try { Clear(); for (int n = 0; n < collection.Count; n++) { GarnetTabStripItem item = collection[n]; GarnetTabStripItem newItem = new GarnetTabStripItem(); newItem.Assign(item); Add(newItem); } } finally { EndUpdate(); } }
public virtual bool Contains(GarnetTabStripItem item) { return List.Contains(item); }
public virtual void AddRange(GarnetTabStripItem[] items) { BeginUpdate(); try { foreach (GarnetTabStripItem item in items) { List.Add(item); } } finally { EndUpdate(); } }
public virtual int Add(GarnetTabStripItem item) { int res = IndexOf(item); if (res == -1) res = List.Add(item); return res; }
public override void Initialize(IComponent component) { base.Initialize(component); TabStrip = component as GarnetTabStripItem; }
public TabStripItemClosingEventArgs(GarnetTabStripItem item) { _item = item; }
public TabStripItemChangedEventArgs(GarnetTabStripItem item, GarnetTabStripItemChangeTypes type) { changeType = type; itm = item; }