Example #1
0
        private void textBoxPulseWidth_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!(Char.IsNumber(e.KeyChar)) && e.KeyChar != (char)8)
            {
                e.Handled = true;
            }

            if (e.KeyChar == (char)Keys.Enter)
            {
                if (textBoxPulseWidth.Text == "")
                {
                    MessageShow.show("Warn:Please input data!",
                                     "警告:请输入数字!");
                    return;
                }

                double pulseWidth = Convert.ToDouble(textBoxPulseWidth.Text);
                SetPulserTransmitDAQ.Width(SelectAscan.sessionIndex, SelectAscan.port, pulseWidth);
            }
        }
Example #2
0
        private void textBoxPulseWidth_Leave(object sender, EventArgs e)
        {
            uint pulseWidth = Convert.ToUInt32(textBoxPulseWidth.Text);

            SetPulserTransmitDAQ.Width(SelectAscan.sessionIndex, SelectAscan.port, pulseWidth);
        }