MiningDetailForm.cs 664 B

123456789101112131415161718192021222324
  1. namespace Server.MirForms.VisualMapInfo.Control.Forms
  2. {
  3. public partial class MiningDetailForm : Form
  4. {
  5. public MiningDetailForm()
  6. {
  7. InitializeComponent();
  8. }
  9. private void DoneButton_Click(object sender, EventArgs e)
  10. {
  11. if (X.Text == string.Empty) X.Text = "0";
  12. if (Y.Text == string.Empty) Y.Text = "0";
  13. if (Range.Text == string.Empty) Range.Text = "0";
  14. this.Close();
  15. }
  16. private void Insert(object sender, KeyPressEventArgs e)
  17. {
  18. e.Handled = (!char.IsDigit(e.KeyChar)) && (!char.IsControl(e.KeyChar));
  19. }
  20. }
  21. }