// (c) 2006 Richard Grimes // www.grimes.demon.co.uk using System; using System.Drawing; using System.Collections; using System.Windows.Forms; namespace Fusion { public class MainForm : System.Windows.Forms.Form { private System.Windows.Forms.Button btnLoad; private System.Windows.Forms.TextBox txtResults; private System.Windows.Forms.Button btnExit; private System.Windows.Forms.MainMenu mainMenu; public MainForm() { InitializeComponent(); } protected override void Dispose(bool disposing) { base.Dispose(disposing); } #region Windows Form Designer generated code private void InitializeComponent() { this.mainMenu = new System.Windows.Forms.MainMenu(); this.btnLoad = new System.Windows.Forms.Button(); this.txtResults = new System.Windows.Forms.TextBox(); this.btnExit = new System.Windows.Forms.Button(); // // btnLoad // this.btnLoad.Location = new System.Drawing.Point(8, 8); this.btnLoad.Size = new System.Drawing.Size(88, 20); this.btnLoad.Text = "Load Library"; this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click); // // txtResults // this.txtResults.Location = new System.Drawing.Point(8, 40); this.txtResults.Multiline = true; this.txtResults.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtResults.Size = new System.Drawing.Size(224, 224); this.txtResults.Text = ""; // // btnExit // this.btnExit.Location = new System.Drawing.Point(160, 8); this.btnExit.Text = "Exit"; this.btnExit.Click += new System.EventHandler(this.btnExit_Click); // // MainForm // this.Controls.Add(this.btnExit); this.Controls.Add(this.txtResults); this.Controls.Add(this.btnLoad); this.Menu = this.mainMenu; this.Text = "Fusion Test"; } #endregion static void Main() { Application.Run(new MainForm()); } private void btnLoad_Click(object sender, System.EventArgs e) { try { lib.LibraryCode lib = new lib.LibraryCode(); this.txtResults.Text += String.Concat(lib.GetVersion(), "\r\n"); } catch(Exception ex) { this.txtResults.Text += String.Concat("Exception:\r\n", ex.ToString(), "\r\n"); } } private void btnExit_Click(object sender, System.EventArgs e) { Application.Exit(); } } }