| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- namespace Core.LgMes.Client.LgJobMgt
- {
- public partial class frmInputDecimal : Form
- {
- public frmInputDecimal()
- {
- InitializeComponent();
- }
- private void frmInputDecimal_Load(object sender, EventArgs e)
- {
- try
- {
- this.ultraCalculator1.Text = _defaultValue;
- }
- catch
- {
- this.ultraCalculator1.Text = "";
- }
- }
- public string _defaultValue = "";
- public bool _IsUpdate = false;
- private void button1_Click(object sender, System.EventArgs e)
- {
- try
- {
- float f = Convert.ToSingle(this.ultraCalculator1.Text) * 1;
- }
- catch
- {
- MessageBox.Show("数字输入不正确,请修正。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- this._defaultValue = this.ultraCalculator1.Text;
- _IsUpdate = true;
- this.Close();
- }
- private void button2_Click(object sender, System.EventArgs e)
- {
- this.Close();
- }
- }
- }
|