Exemple #1
0
 /// <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));
     }
 }
Exemple #2
0
        /// <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);
            }
        }
Exemple #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="item"></param>
 public void AddItem(Tab item)
 {
     this.Items.Add(item);
     this.Call("add", new JRawValue(new ClientConfig().Serialize(item)));
 }
Exemple #4
0
 /// <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)));
 }
Exemple #5
0
 private void Items_AfterItemAdd(Tab item)
 {
     item.Owner = this;
 }