Пример #1
0
        private void textBoxImpedance_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!(Char.IsNumber(e.KeyChar)) && e.KeyChar != (char)8)
            {
                e.Handled = true;
            }

            if (e.KeyChar == (char)Keys.Enter)
            {
                if (textBoxImpedance.Text == "")
                {
                    MessageShow.show("Warn:Please input data!",
                                     "警告:请输入数字!");
                    return;
                }
                uint dampingValue = Convert.ToUInt32(textBoxImpedance.Text);
                SetReceiverDAQ.DampingValue(SelectAscan.sessionIndex, SelectAscan.port, dampingValue);
            }
        }
Пример #2
0
        private void textBoxImpedance_Leave(object sender, EventArgs e)
        {
            uint dampingValue = Convert.ToUInt32(textBoxImpedance.Text);

            SetReceiverDAQ.DampingValue(SelectAscan.sessionIndex, SelectAscan.port, dampingValue);
        }