Exemple #1
0
 private void btnAnaly_Click(object sender, EventArgs e)
 {
     AnalyByHand.Analy(txtInput.Text, workBook, raw);
     raw += 2;
     lblTimePrev.Text = "上次:" + txtInput.Text.Substring(0, txtInput.Text.IndexOf("###"));
     txtInput.Clear();
 }
Exemple #2
0
        private void txtInput_TextChanged(object sender, EventArgs e)
        {
            btnAnaly.Enabled = false;
            if (txtInput.Text.Length == 0)
            {
                lblTip.Text      = "请复制数据进输入框";
                lblTimeThis.Text = "此次:##:##:##";
                return;
            }

            StringBuilder reason;

            if (AnalyByHand.Check(txtInput.Text, out reason))
            {
                lblTip.Text      = "数据格式正确";
                btnAnaly.Enabled = true;
                lblTimeThis.Text = "此次:" + txtInput.Text.Substring(0, txtInput.Text.IndexOf("###"));;
                return;
            }
            else
            {
                lblTip.Text      = reason.ToString();
                lblTimeThis.Text = "此次:##:##:##";
                return;
            }
        }