/// <summary> /// /// </summary> /// <param name="item"></param> public void SetActiveTab(Tab item) { if (item.TabID.IsNotEmpty()) { this.Call("setActiveTab", item.TabID); } else { this.Call("setActiveTab", this.Items.IndexOf(item)); } }
/// <summary> /// /// </summary> /// <param name="item"></param> public void Remove(Tab item) { if (item.TabID.IsNotEmpty()) { this.Call("remove", item.TabID); } else { this.Call("remove", this.Items.IndexOf(item)); } if (this.Items.Contains(item)) { this.Items.Remove(item); } }
/// <summary> /// /// </summary> /// <param name="item"></param> public void AddItem(Tab item) { this.Items.Add(item); this.Call("add", new JRawValue(new ClientConfig().Serialize(item))); }
/// <summary> /// /// </summary> /// <param name="index"></param> /// <param name="item"></param> public void InsertItem(int index, Tab item) { this.Items.Add(item); this.Call("insert", index, new JRawValue(new ClientConfig().Serialize(item))); }
private void Items_AfterItemAdd(Tab item) { item.Owner = this; }