using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Mesnac.Gui.Common { public partial class KeyBoard : Form { public KeyBoard() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.OK; } private void keyboardButton43_Click(object sender, EventArgs e) { Button btn = sender as Button; if (btn.Text == "大写") btn.Text = "小写"; else btn.Text = "大写"; } private void btn_Click(object sender, EventArgs e) { Button btn = sender as Button; if (btnUper.Text == "小写") { this.textBox1.Text += btn.Text.ToLower(); } else this.textBox1.Text += btn.Text; } private void keyboardButton43_Click_1(object sender, EventArgs e) { if (string.IsNullOrEmpty(textBox1.Text)) return; if (textBox1.Text.Length == 1) { textBox1.Text = string.Empty; return; } textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1); } private void button45_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; } } }