private WinCtrlRoot GetRootControl() { var root = new WinCtrlRoot(this.winGLCanvas1.Width, this.winGLCanvas1.Height); var bitmap = new Bitmap(@"particle.png"); { var control = new CtrlImage(bitmap, false); control.Location = new GUIPoint(10, 10); control.Width = 100; control.Height = 50; bitmap.Dispose(); root.Children.Add(control); } { var control = new CtrlButton() { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 70); control.Width = 100; control.Height = 50; root.Children.Add(control); control.Focused = true; } return(root); }
private WinCtrlRoot GetRootControl() { var root = new WinCtrlRoot(this.winGLCanvas1.Width, this.winGLCanvas1.Height); string folder = System.Windows.Forms.Application.StartupPath; var bitmap = new Bitmap(System.IO.Path.Combine(folder, @"particle.png")); { var control = new CtrlImage(bitmap, false); control.Location = new GUIPoint(10, 10); control.Width = 100; control.Height = 50; bitmap.Dispose(); root.Children.Add(control); } { var control = new CtrlButton() { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 70); control.Width = 100; control.Height = 50; root.Children.Add(control); control.Focused = true; } return(root); }
private GLControl GetRootControl() { var bitmap = new Bitmap(@"particle.png"); var control = new CtrlImage(bitmap, false); control.Left = 10; control.Bottom = 10; control.Width = 100; control.Height = 50; bitmap.Dispose(); return(control); }
private WinCtrlRoot GetRootControl() { var root = new WinCtrlRoot(this.winGLCanvas1.Width, this.winGLCanvas1.Height); string folder = System.Windows.Forms.Application.StartupPath; var bitmap = new Bitmap(System.IO.Path.Combine(folder, @"particle.png")); { var control = new CtrlImage(bitmap, false) { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 10); control.Width = 100; control.Height = 50; bitmap.Dispose(); control.MouseUp += control_MouseUp; root.Children.Add(control); } { var control = new CtrlButton() { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 70); control.Width = 100; control.Height = 50; control.Focused = true; control.MouseUp += control_MouseUp; root.Children.Add(control); } { var control = new CtrlLabel(100) { Anchor = GUIAnchorStyles.Left | GUIAnchorStyles.Bottom }; control.Location = new GUIPoint(10, 130); control.Width = 100; control.Height = 30; control.Text = "Hello CSharpGL!"; control.RenderBackground = true; control.BackgroundColor = new vec4(1, 0, 0, 1); control.MouseUp += control_MouseUp; root.Children.Add(control); } return(root); }
private WinCtrlRoot GetRootControl() { var root = new WinCtrlRoot(this.winGLCanvas1.Width, this.winGLCanvas1.Height); var bitmap = new Bitmap(@"particle.png"); { var control = new CtrlImage(bitmap, false); control.Left = 10; control.Bottom = 10; control.Width = 100; control.Height = 50; bitmap.Dispose(); root.Children.Add(control); } { var control = new CtrlButton(); control.Left = 10; control.Bottom = 70; control.Width = 100; control.Height = 50; root.Children.Add(control); } return(root); }