예제 #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();
 }
예제 #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);
		}
예제 #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();
 }
예제 #4
0
 public void Remove(TuxBarItem value)
 {
     if (RemoveItem != null)
     {
         RemoveItem(value);
     }
     m_List.Remove(value);
     if (LayoutChanged != null)
     {
         LayoutChanged(value, new EventArgs());
     }
 }
예제 #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();
            }
예제 #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);
 }
예제 #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);
        }
예제 #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();
            }
예제 #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();
			}
예제 #10
0
			private void m_Items_RemoveItem(TuxBarItem item)
			{
				this.Controls.Remove(item);
				AlignControls();
                this.Refresh();
			}
예제 #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();
			}
예제 #12
0
		public bool Contains(TuxBarItem value)
		{
			return m_List.Contains(value);
		}
예제 #13
0
		public void Remove(TuxBarItem value)
		{
			if(RemoveItem != null)
				RemoveItem(value);
			m_List.Remove(value);
			if(LayoutChanged != null)
				LayoutChanged(value,new EventArgs());
		}
예제 #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;
		}
예제 #15
0
		public int IndexOf(TuxBarItem value)
		{
			return m_List.IndexOf(value);
		}
예제 #16
0
 public bool Contains(TuxBarItem value)
 {
     return(m_List.Contains(value));
 }
예제 #17
0
 private void m_Items_RemoveItem(TuxBarItem item)
 {
     this.Controls.Remove(item);
     AlignControls();
     this.Refresh();
 }
예제 #18
0
        public void RemoveAt(int index)
        {
            TuxBarItem item = (TuxBarItem)m_List[index];

            Remove(item);
        }
예제 #19
0
 public int IndexOf(TuxBarItem value)
 {
     return(m_List.IndexOf(value));
 }