protected override void OnLoad(EventArgs e) { base.OnLoad(e); rand = new Random(); Alt.GUI.Temporary.Gwen.Control.Button button1 = new Alt.GUI.Temporary.Gwen.Control.Button(this); button1.SetText("Open a Window"); button1.Clicked += OpenWindow; button1.SizeToContents(); Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(this); button2.SetText("Open a MessageBox"); button2.SizeToContents(); button2.Clicked += OpenMsgbox; Alt.GUI.Temporary.Gwen.Align.PlaceRightBottom(button2, button1, 10); m_WindowCount = 1; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); m_CurZoom = 0; m_Splitter = new Alt.GUI.Temporary.Gwen.Control.CrossSplitter(this); m_Splitter.SetPosition(0, 0); m_Splitter.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; { Alt.GUI.Temporary.Gwen.Control.VerticalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(m_Splitter); Alt.GUI.Temporary.Gwen.Control.Button button1 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter); button1.SetText("Vertical left"); Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter); button2.SetText("Vertical right"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(0, splitter); } { Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter(m_Splitter); Alt.GUI.Temporary.Gwen.Control.Button button1 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter); button1.SetText("Horizontal up"); Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter); button2.SetText("Horizontal down"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(1, splitter); } { Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.HorizontalSplitter(m_Splitter); Alt.GUI.Temporary.Gwen.Control.Button button1 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter); button1.SetText("Horizontal up"); Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter); button2.SetText("Horizontal down"); splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(2, splitter); } { Alt.GUI.Temporary.Gwen.Control.VerticalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(m_Splitter); Alt.GUI.Temporary.Gwen.Control.Button button1 = new Alt.GUI.Temporary.Gwen.Control.Button(splitter); button1.SetText("Vertical left"); Alt.GUI.Temporary.Gwen.Control.Button button2 = new Alt.GUI.Temporary.Gwen.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 Alt.GUI.Temporary.Gwen.Control.StatusBar pStatus = new Alt.GUI.Temporary.Gwen.Control.StatusBar(this); pStatus.Dock = Alt.GUI.Temporary.Gwen.Pos.Bottom; { Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus); pButton.SetText("Zoom"); pButton.Clicked += ZoomTest; pStatus.AddControl(pButton, false); } { Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus); pButton.SetText("UnZoom"); pButton.Clicked += UnZoomTest; pStatus.AddControl(pButton, false); } { Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus); pButton.SetText("CenterPanels"); pButton.Clicked += CenterPanels; pStatus.AddControl(pButton, true); } { Alt.GUI.Temporary.Gwen.Control.Button pButton = new Alt.GUI.Temporary.Gwen.Control.Button(pStatus); pButton.SetText("Splitters"); pButton.Clicked += ToggleSplitters; pStatus.AddControl(pButton, true); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(10, 10, 100, 100); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(110, 10, 100, 100); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new ScrollControl(this); ctrl.SetBounds(210, 10, 100, 100); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(310, 10, 100, 100); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(410, 10, 100, 100); ctrl.EnableScroll(false, true); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(510, 10, 100, 100); ctrl.EnableScroll(true, false); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Horizontal"); pTestButton.SetBounds(0, 0, 200, 200); } // Bottom Row { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(10, 110, 100, 100); ctrl.AutoHideBars = true; Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Twice As Big"); pTestButton.SetBounds(0, 0, 200, 200); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(110, 110, 100, 100); ctrl.AutoHideBars = true; Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Same Size"); pTestButton.SetBounds(0, 0, 100, 100); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(210, 110, 100, 100); ctrl.AutoHideBars = true; Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Wide"); pTestButton.SetBounds(0, 0, 200, 50); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(310, 110, 100, 100); ctrl.AutoHideBars = true; Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Tall"); pTestButton.SetBounds(0, 0, 50, 200); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(410, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(false, true); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Vertical"); pTestButton.SetBounds(0, 0, 200, 200); } { Alt.GUI.Temporary.Gwen.Control.ScrollControl ctrl = new Alt.GUI.Temporary.Gwen.Control.ScrollControl(this); ctrl.SetBounds(510, 110, 100, 100); ctrl.AutoHideBars = true; ctrl.EnableScroll(true, false); Alt.GUI.Temporary.Gwen.Control.Button pTestButton = new Alt.GUI.Temporary.Gwen.Control.Button(ctrl); pTestButton.SetText("Horinzontal"); pTestButton.SetBounds(0, 0, 200, 200); } }