Esempio n. 1
0
 private void m_Items_InsertItem(TuxBarItem item, int index)
 {
     item.Theme   = m_TuxTheme;
     item.Resize += new EventHandler(item_Resize);
     item.Toogle += new EventHandler(item_Toogle);
     this.Controls.RemoveAt(index);
     AlignControls();
 }
Esempio n. 2
0
		public void Insert(int index, TuxBarItem value)
		{
			m_List.Insert(index,value);
			if(InsertItem != null)
				InsertItem(value,index);
			if(LayoutChanged != null)
				LayoutChanged(value,new EventArgs());	
			value.Toogle+=new EventHandler(LayoutChanged);
		}
Esempio n. 3
0
 private void m_Items_AddItem(TuxBarItem item)
 {
     item.Theme   = m_TuxTheme;
     item.Resize += new EventHandler(item_Resize);
     item.Toogle += new EventHandler(item_Toogle);
     this.Controls.Add(item);
     AlignControls();
     this.Refresh();
 }
Esempio n. 4
0
 public void Remove(TuxBarItem value)
 {
     if (RemoveItem != null)
     {
         RemoveItem(value);
     }
     m_List.Remove(value);
     if (LayoutChanged != null)
     {
         LayoutChanged(value, new EventArgs());
     }
 }
Esempio n. 5
0
            internal void ResetWidth()
            {
                this.SuspendLayout();

                for (int i = 0; i < m_Items.Count; i++)
                {
                    TuxBarItem current = m_Items[i];

                    current.Width = this.ClientSize.Width - (ITEM_LATERAL_SPACING * 2);
                }

                this.ResumeLayout();
            }
Esempio n. 6
0
 public void Insert(int index, TuxBarItem value)
 {
     m_List.Insert(index, value);
     if (InsertItem != null)
     {
         InsertItem(value, index);
     }
     if (LayoutChanged != null)
     {
         LayoutChanged(value, new EventArgs());
     }
     value.Toogle += new EventHandler(LayoutChanged);
 }
Esempio n. 7
0
        public int Add(TuxBarItem value)
        {
            int i = m_List.Add(value);

            if (AddItem != null)
            {
                AddItem(value);
            }
            if (LayoutChanged != null)
            {
                LayoutChanged(value, new EventArgs());
            }
            value.Toogle += new EventHandler(LayoutChanged);
            return(i);
        }
Esempio n. 8
0
            private void AlignControls()
            {
                this.SuspendLayout();


                for (int i = 0; i < m_Items.Count; i++)
                {
                    TuxBarItem current = m_Items[i];

                    if (i == 0)
                    {
                        current.Top = ITEM_TOP_SPACING;
                    }
                    else
                    {
                        TuxBarItem prev = m_Items[i - 1];

                        current.Top = ITEM_TOP_SPACING + prev.Top + prev.Height;
                    }

                    current.Width = this.ClientSize.Width - (ITEM_LATERAL_SPACING * 2);

                    /*if (((Panel)this.Parent).VerticalScroll.Visible)
                     * {
                     *      current.Width -= SystemInformation.VerticalScrollBarWidth - ITEM_LATERAL_SPACING;
                     * }*/

                    current.Left = ITEM_LATERAL_SPACING;
                }
                if (m_Items.Count > 0)
                {
                    TuxBarItem last = m_Items[m_Items.Count - 1];

                    this.Height = last.Top + last.Height + (ITEM_TOP_SPACING * 2);
                }

                this.ResumeLayout();
            }
Esempio n. 9
0
			private void m_Items_InsertItem(TuxBarItem item, int index)
			{
                item.Theme = m_TuxTheme;
                item.Resize += new EventHandler(item_Resize);
				item.Toogle += new EventHandler(item_Toogle);
				this.Controls.RemoveAt(index);
				AlignControls();
			}
Esempio n. 10
0
			private void m_Items_RemoveItem(TuxBarItem item)
			{
				this.Controls.Remove(item);
				AlignControls();
                this.Refresh();
			}
Esempio n. 11
0
			private void m_Items_AddItem(TuxBarItem item)
			{
                item.Theme = m_TuxTheme;
                item.Resize += new EventHandler(item_Resize);
				item.Toogle += new EventHandler(item_Toogle);
				this.Controls.Add(item);
				AlignControls();
                this.Refresh();
			}
Esempio n. 12
0
		public bool Contains(TuxBarItem value)
		{
			return m_List.Contains(value);
		}
Esempio n. 13
0
		public void Remove(TuxBarItem value)
		{
			if(RemoveItem != null)
				RemoveItem(value);
			m_List.Remove(value);
			if(LayoutChanged != null)
				LayoutChanged(value,new EventArgs());
		}
Esempio n. 14
0
		public int Add(TuxBarItem value)
		{
			int i = m_List.Add(value);
			if(AddItem != null)
				AddItem(value);
			if(LayoutChanged != null)
				LayoutChanged(value,new EventArgs());
			value.Toogle+=new EventHandler(LayoutChanged);
			return i;
		}
Esempio n. 15
0
		public int IndexOf(TuxBarItem value)
		{
			return m_List.IndexOf(value);
		}
Esempio n. 16
0
 public bool Contains(TuxBarItem value)
 {
     return(m_List.Contains(value));
 }
Esempio n. 17
0
 private void m_Items_RemoveItem(TuxBarItem item)
 {
     this.Controls.Remove(item);
     AlignControls();
     this.Refresh();
 }
Esempio n. 18
0
        public void RemoveAt(int index)
        {
            TuxBarItem item = (TuxBarItem)m_List[index];

            Remove(item);
        }
Esempio n. 19
0
 public int IndexOf(TuxBarItem value)
 {
     return(m_List.IndexOf(value));
 }