Exemple #1
0
        private void lblPumpSpeed_Click(object sender, EventArgs e)
        {
            Label tb = (Label)sender;

            UserCtrl.numPad _numPad = new UserCtrl.numPad(tb.Text);
            if (DialogResult.OK == _numPad.ShowDialog())
            {
                tb.Text = _numPad.Value.ToString("f1");
                //计算预计流量
                int ts = 0;
                if (m_modc != null)
                {
                    ts = (int)m_modc.timeSpan;
                }
                double min   = Math.Round(ts / 60.0, 3);
                double speed = Convert.ToDouble(this.lblPumpSpeed.Text);
                this.lblml.Text = (speed * min).ToString("0.0");
            }
        }
Exemple #2
0
        private void lblHour_Click(object sender, EventArgs e)
        {
            Label lbl = (Label)sender;

            UserCtrl.numPad _numPad = new UserCtrl.numPad(lbl.Text);
            _numPad.btnDot.Visible    = false;
            _numPad.btnNegPos.Visible = false;
            if (DialogResult.OK == _numPad.ShowDialog())
            {
                //if (lbl.Name == "lblMMin" || lbl.Name == "lblSec")
                //{
                //    if (_numPad.Value >= 60)
                //    {
                //        MessageBox.Show("请输入小于60的整数");
                //        return;
                //    }
                //}
                lbl.Text = _numPad.Value.ToString("00");
            }
        }