public SectionView(Board board, SpiderView spiderView) { InitializeComponent(); this.Board = board; this.Controls.Add(board); board.AutoResize(); this.AutoScroll = true; board.AutoResize(); this.SpiderView = spiderView; if (overflow == null) { overflow = new Overflow(ListView); overflow.Top = -1424; this.Controls.Add(overflow); } this.Scroll += SectionView_Scroll; System.Windows.Forms.ScrollBar scrollBar = new System.Windows.Forms.VScrollBar(); /* scrollBar.Dock = DockStyle.Right; * scrollBar.Scroll += scrollBar_Scroll; * scrollBar.Maximum = this.Board.Height; * this.Controls.Add(scrollBar); * scrollBar.BringToFront();*/ }
public SectionView(Board board, SpiderView spiderView) { InitializeComponent(); this.Board = board; this.Controls.Add(board); board.AutoResize(); this.Scroll += SectionView_Scroll; board.AutoResize(); this.AutoScroll = true; this.SpiderView = spiderView; if (overflow == null) { overflow = new Overflow(ListView); overflow.Top = -1424; this.Controls.Add(overflow); } }
public void AddSection(XmlElement _section) { Tab tab = new Tab(); tab.Title = _section.GetAttribute("title"); tab.ID = _section.GetAttribute("id"); this.tabBar.Tabs.Add(tab); Board childBoard = new Board(this); SectionView sv = new SectionView(childBoard, this); childBoard.Section = sv; Sections.Add(tab.ID, sv); childBoard.LoadNodes(_section); childBoard.ScriptCalled += childBoard_ScriptCalled; childBoard.AutoResize(); childBoard.Width = 31280; //if(_section.HasAttribute("padding")) // childBoard.Padding = new Spider.Padding(_section.GetAttribute("padding")); this.deck.Controls.Add(sv); sv.Dock = DockStyle.Fill; if (_section.HasAttribute("playlist")) { sv.Board.CustomHeight = true; this.IsPlaylist = _section.GetAttribute("playlist") == "true"; } if (this.IsPlaylist) { sv.Board.MinimumSize = new Size(0, 0); if (_section.HasAttribute("height")) { if (int.Parse(_section.GetAttribute("height")) < 1) { sv.Board.Hide(); sv.Board.Height = 0; } sv.Board.Height = int.Parse(_section.GetAttribute("height")); } else { sv.Board.Height = 120; } sv.Board.Left = 0; sv.Board.Top = 0; sv.Board.Width = this.Width; sv.Board.Anchor |= AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; sv.ListView = new CListView(sv); sv.Controls.Add(sv.ListView); sv.ListView.Top = sv.Board.Height; sv.ListView.Anchor |= AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; sv.ListView.Height = 1200; sv.ListView.Width = this.Width; sv.ListView.Columns.Add("No.", 52); sv.ListView.AllowsReoreder = false; sv.ListView.Columns.Add("Title", 300); sv.ListView.Columns.Add("Artist", 100); sv.ListView.Columns.Add("Duration", 100); sv.ListView.Columns.Add("Album", 300); sv.ListView.Columns.Add("User", 100); sv.ListView.Columns.Add("Time", 100); sv.ListView.BringToFront(); } }
public void AddSection(XmlElement _section) { Tab tab = new Tab(); tab.Title = _section.GetAttribute("title"); tab.ID = _section.GetAttribute("id"); this.tabBar.Tabs.Add(tab); Board childBoard = new Board(this); SectionView sv = new SectionView(childBoard, this); childBoard.Section = sv; Sections.Add(tab.ID, sv); childBoard.LoadNodes(_section); childBoard.ScriptCalled += childBoard_ScriptCalled; childBoard.AutoResize(); childBoard.Width = 31280; //if(_section.HasAttribute("padding")) // childBoard.Padding = new Spider.Padding(_section.GetAttribute("padding")); this.deck.Controls.Add(sv); sv.Dock = DockStyle.Fill; if (_section.HasAttribute("playlist")) { sv.Board.CustomHeight = true; this.IsPlaylist = _section.GetAttribute("playlist") == "true"; } if (this.IsPlaylist) { sv.Board.MinimumSize = new Size(0, 0); if (_section.HasAttribute("height")) { if (int.Parse(_section.GetAttribute("height")) < 1) { sv.Board.Hide(); sv.Board.Height = 0; } sv.Board.Height = int.Parse(_section.GetAttribute("height")); } else { sv.Board.Height = 120; } sv.Board.Left = 0; sv.Board.Top = 0; sv.Board.Width = this.Width; sv.Board.Anchor |= AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; sv.ListView = new CListView(sv); sv.Controls.Add(sv.ListView); sv.ListView.Top = sv.Board.Height; sv.ListView.Anchor |= AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; sv.ListView.Height = 1200; sv.ListView.Width = this.Width; sv.ListView.Columns.Add("No.", 52); sv.ListView.AllowsReoreder = false; sv.ListView.Columns.Add("Title", 300); sv.ListView.Columns.Add("Artist", 100); sv.ListView.Columns.Add("Duration", 100); sv.ListView.Columns.Add("Album", 300); sv.ListView.Columns.Add("User", 100); sv.ListView.Columns.Add("Time", 100); sv.ListView.BringToFront(); } }