comparison ARClient/frmTextInput.cs @ 0:90ea68d4f92f

First release
author Ivo Smits <Ivo@UCIS.nl>
date Sat, 08 Nov 2014 22:43:51 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:90ea68d4f92f
1 using System;
2 using System.Windows.Forms;
3
4 namespace ARClient {
5 public partial class frmTextInput : Form {
6 public frmTextInput() {
7 InitializeComponent();
8 }
9 public String Description { get { return lblDescription.Text; } set { lblDescription.Text = value; } }
10 public String Value { get { return textBox1.Text; } set { textBox1.Text = value; } }
11
12 private void btnOk_Click(object sender, EventArgs e) {
13 DialogResult = DialogResult.OK;
14 Close();
15 }
16
17 private void btnCancel_Click(object sender, EventArgs e) {
18 DialogResult = DialogResult.Cancel;
19 Close();
20 }
21
22 private void textBox1_KeyUp(object sender, KeyEventArgs e) {
23 if (e.KeyCode == Keys.Enter) {
24 e.Handled = true;
25 btnOk_Click(sender, e);
26 } else if (e.KeyCode == Keys.Escape) {
27 DialogResult = DialogResult.Cancel;
28 Close();
29 }
30 }
31 }
32 }