aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oeqa/runtime/files/helloworldform.cs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oeqa/runtime/files/helloworldform.cs')
-rw-r--r--lib/oeqa/runtime/files/helloworldform.cs109
1 files changed, 109 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/files/helloworldform.cs b/lib/oeqa/runtime/files/helloworldform.cs
new file mode 100644
index 0000000..2549b91
--- /dev/null
+++ b/lib/oeqa/runtime/files/helloworldform.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Timers;
+
+namespace HelloWorldForm
+{
+ static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+
+ partial class Form1
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(108, 113);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "Exit";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 261);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Hello World";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ }
+
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+
+ System.Timers.Timer timer1 = new System.Timers.Timer();
+ timer1.Elapsed+=new ElapsedEventHandler(OnTimedEvent);
+ timer1.Interval=3000;
+ timer1.Enabled=true;
+ }
+
+ private void OnTimedEvent(object source, ElapsedEventArgs e)
+ {
+ Console.WriteLine("Time's up!");
+ button1_Click(source, e);
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ Application.Exit();
+ }
+ }
+}
+