public PropertiesView() { var props = new ProjectProperties(); props.Dock = System.Windows.Forms.DockStyle.Fill; var tp = new TabPage(); tp.Controls.Add(new System.Windows.Forms.Button()); var ti = new TabItem("General", tp); props.TabItems.Add(ti); props.TabItems.Add(new TabItem("Signing")); props.TabItems.Add(new TabItem("Reference Paths")); props.TabItems.Add(new TabItem("Build Events")); props.TabItems.Add(new TabItem("Build")); props.TabItems.Add(new TabItem("Debug")); foreach (TabItem item in props.TabItems) { item.ForeColor = System.Drawing.Color.FromArgb(37, 37, 38); } _view = props; }
/// <summary> /// Add a TabItem object to the collection /// </summary> /// <param name="item"></param> public void Add(TabItem item) { item.Click += item_Click; m_Items.Add(item); m_Parent.TabStrip.ReAlignItems(); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public void Remove(TabItem item) { m_Items.Remove(item); ; }
/// <summary> /// /// </summary> /// <param name="index"></param> /// <param name="item"></param> public void Insert(int index, TabItem item) { m_Items.Insert(index, item); }
/// <summary> /// Get the index on the collection the specified TabItem /// </summary> /// <param name="item"></param> /// <returns></returns> public int IndexOf(TabItem item) { return m_Items.IndexOf(item); }
/// <summary> /// /// </summary> /// <param name="array"></param> /// <param name="arrayIndex"></param> public void CopyTo(TabItem[] array, int arrayIndex) { m_Items.CopyTo(array, arrayIndex); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public bool Contains(TabItem item) { return m_Items.Contains(item); }