public SpiderView(SpiderHost host) { this.Host = host; this.Scripting = new Scripting.LuaInterpreter(this); this.Preprocessor = new Preprocessor.LuaMako(this); this.Scripting.RegisterFunction("refresh", GetType().GetMethod("refresh"), this); this.timer = new Timer(); InitializeComponent(); this.tabBar = new TabBar(this); this.deck = new Panel(); tabBar.Dock = DockStyle.Top; tabBar.Height = 23; this.Controls.Add(deck); this.Controls.Add(tabBar); deck.Dock = DockStyle.Fill; this.tabBar.Dock = DockStyle.Top; Block = Stylesheet.Blocks["Body"]; this.BackColor = Block.BackColor; this.ForeColor = Block.ForeColor; this.tabBar.TabChange += tabBar_TabChange; this.timer.Tick += timer_Tick; this.timer.Interval = 1000; this.Click += SpiderView_Click; }
void tabBar_TabChange(object sender, TabBar.TabChangedEventArgs e) { SectionView board = Sections[e.Tab.ID]; this.deck.Controls.Clear(); this.deck.Controls.Add(board); board.Show(); board.Dock = DockStyle.Fill; activeBoard = board; }