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.Controls.Sulf { public partial class NumberControl : Form { public NumberControl() { InitializeComponent(); } private void button13_Click(object sender, EventArgs e) { if (textBox1.Text == "0") return; else { textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1 < 0 ? 0 : textBox1.Text.Length - 1); } } private void button11_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.OK; } private void button12_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; } private void btn_Click(object sender, EventArgs e) { Button btn = sender as Button; if (this.textBox1.Text == "0") this.textBox1.Text = btn.Text; else this.textBox1.Text += btn.Text; } } }