/Samples/ExampleToolForm/ExampleForm.cs
C# | 37 lines | 25 code | 3 blank | 9 comment | 0 complexity | 8ed995119b5d497df99af207b82602ea MD5 | raw file
Possible License(s): Apache-2.0
- using System.Windows.Forms;
- using Application = Delta.Engine.Application;
-
- namespace Delta.Tools.ExampleToolForm
- {
- /// <summary>
- /// Example form, will just hock up some Windows Forms events.
- /// </summary>
- public partial class ExampleForm : Form
- {
- #region Constructor
- /// <summary>
- /// Create example form
- /// </summary>
- public ExampleForm()
- {
- InitializeComponent();
-
- // The update button click event
- statusUpdateButton.Click += delegate
- {
- // How big is the viewportPanel
- viewportLabel.Text =
- "Viewport: " + viewportPanel.ClientSize +
- ", Graphic=" + Application.Window.ViewportPixelWidth + ", " +
- Application.Window.ViewportPixelHeight;
- };
-
- // Quit with the extra quit button (rest happens in Program.cs)
- menuExitItem.Click += delegate
- {
- Application.Quit();
- };
- }
- #endregion
- }
- }