public Window(Base parent) : base(parent) { rand = new Random(); Control.Button button1 = new Control.Button(this); button1.SetText("Open a Window"); button1.Clicked += OpenWindow; Control.Button button2 = new Control.Button(this); button2.SetText("Open a MessageBox"); button2.Clicked += OpenMsgbox; Align.PlaceRightBottom(button2, button1, 10); m_WindowCount = 1; }
public ScrollControl(ControlBase parent) : base(parent) { { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 10, 100, 100); ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 10, 100, 100); ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horizontal"); pTestButton.SetBounds(0, 0, 200, 200); } // Bottom Row { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horinzontal"); pTestButton.SetBounds(0, 0, 200, 200); } }
public ScrollControl(Base parent) : base(parent) { { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 10, 100, 100); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 10, 100, 100); ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 10, 100, 100); ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horizontal"); pTestButton.SetBounds(0, 0, 200, 200); } // Bottom Row { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(10, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(110, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(210, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(310, 110, 100, 100); ctrl.AutoHideBars = true; Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(410, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(false, true); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Control.ScrollControl ctrl = new Control.ScrollControl(this); ctrl.SetBounds(510, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(true, false); Control.Button pTestButton = new Control.Button(ctrl); pTestButton.SetText("Horinzontal"); pTestButton.SetBounds(0, 0, 200, 200); } }
public CrossSplitter(ControlBase parent) : base(parent) { m_CurZoom = 0; m_Splitter = new Control.CrossSplitter(this); m_Splitter.SetPosition(0, 0); m_Splitter.Dock = Pos.Fill; { VerticalSplitter splitter = new VerticalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Vertical left"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Vertical right"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(0, splitter); } { HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Horizontal up"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Horizontal down"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(1, splitter); } { HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Horizontal up"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Horizontal down"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(2, splitter); } { VerticalSplitter splitter = new VerticalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Vertical left"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Vertical right"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(3, splitter); } //Status bar to hold unit testing buttons Control.StatusBar pStatus = new Control.StatusBar(this); pStatus.Dock = Pos.Bottom; { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("Zoom"); pButton.Clicked += ZoomTest; pStatus.AddControl(pButton, false); } { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("UnZoom"); pButton.Clicked += UnZoomTest; pStatus.AddControl(pButton, false); } { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("CenterPanels"); pButton.Clicked += CenterPanels; pStatus.AddControl(pButton, true); } { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("Splitters"); pButton.Clicked += ToggleSplitters; pStatus.AddControl(pButton, true); } }
public CrossSplitter(Base parent) : base(parent) { m_CurZoom = 0; m_Splitter = new Control.CrossSplitter(this); m_Splitter.SetPosition(0, 0); m_Splitter.Dock = Pos.Fill; { VerticalSplitter splitter = new VerticalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Vertical left"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Vertical right"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(0, splitter); } { HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Horizontal up"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Horizontal down"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(1, splitter); } { HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Horizontal up"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Horizontal down"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(2, splitter); } { VerticalSplitter splitter = new VerticalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.SetText("Vertical left"); Control.Button button2 = new Control.Button(splitter); button2.SetText("Vertical right"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(3, splitter); } //Status bar to hold unit testing buttons Control.StatusBar pStatus = new Control.StatusBar(this); pStatus.Dock = Pos.Bottom; { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("Zoom"); pButton.Clicked += ZoomTest; pStatus.AddControl(pButton, false); } { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("UnZoom"); pButton.Clicked += UnZoomTest; pStatus.AddControl(pButton, false); } { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("CenterPanels"); pButton.Clicked += CenterPanels; pStatus.AddControl(pButton, true); } { Control.Button pButton = new Control.Button(pStatus); pButton.SetText("Splitters"); pButton.Clicked += ToggleSplitters; pStatus.AddControl(pButton, true); } }