private void ShowResult(Result result) { currentResult = result; // RefreshLastText(); if (this.Catched != null && m_bInCatch == true) { if (result.Text == m_strLastText) { // 重复的捕捉,被忽略。图像瞬间绘制红色 PaintColor(Color.Red); motionLevel = 0F; } else { // 捕捉成功。图像瞬间绘制绿色 PaintColor(Color.Green); CatchedEventArgs e = new CatchedEventArgs(); e.BarcodeFormat = result.BarcodeFormat; e.Text = result.Text; this.Catched(this, e); this.LastText = result.Text; motionLevel = 0F; } } }