You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.2 KiB
C#

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;
}
}
}