|
|
@ -639,8 +639,11 @@ namespace QMAPP.WinForm.Forms.Operation |
|
|
|
{ |
|
|
|
txtCode.Text = ""; |
|
|
|
//PlaySound.PlaySounds.Play(@errorSoundPath);
|
|
|
|
if (File.Exists(errorSoundPath)) |
|
|
|
{ |
|
|
|
System.Media.SoundPlayer media = new System.Media.SoundPlayer(errorSoundPath); |
|
|
|
media.Play(); |
|
|
|
} |
|
|
|
this.lblError.Text = "请先选择设备!"; |
|
|
|
this.lblError.ForeColor = Color.White; |
|
|
|
this.lblError.BackColor = Color.Red; |
|
|
@ -654,8 +657,11 @@ namespace QMAPP.WinForm.Forms.Operation |
|
|
|
{ |
|
|
|
txtCode.Text = ""; |
|
|
|
//PlaySound.PlaySounds.Play(@errorSoundPath);
|
|
|
|
if (File.Exists(errorSoundPath)) |
|
|
|
{ |
|
|
|
System.Media.SoundPlayer media = new System.Media.SoundPlayer(errorSoundPath); |
|
|
|
media.Play(); |
|
|
|
} |
|
|
|
this.lblError.Text = "请输入条码!"; |
|
|
|
this.lblError.ForeColor = Color.White; |
|
|
|
this.lblError.BackColor = Color.Red; |
|
|
@ -676,8 +682,13 @@ namespace QMAPP.WinForm.Forms.Operation |
|
|
|
{ |
|
|
|
txtCode.Text = ""; |
|
|
|
//PlaySound.PlaySounds.Play(@errorSoundPath);
|
|
|
|
|
|
|
|
if (File.Exists(errorSoundPath)) |
|
|
|
{ |
|
|
|
System.Media.SoundPlayer media = new System.Media.SoundPlayer(errorSoundPath); |
|
|
|
media.Play(); |
|
|
|
} |
|
|
|
|
|
|
|
this.lblError.Text = "输入条码不是本工序可接受格式!"; |
|
|
|
this.lblError.ForeColor = Color.White; |
|
|
|
this.lblError.BackColor = Color.Red; |
|
|
@ -766,8 +777,11 @@ namespace QMAPP.WinForm.Forms.Operation |
|
|
|
if (!result.Success) //如果采集数据输入失败
|
|
|
|
{ |
|
|
|
//PlaySound.PlaySounds.Play(@errorSoundPath);
|
|
|
|
if (File.Exists(errorSoundPath)) |
|
|
|
{ |
|
|
|
System.Media.SoundPlayer media = new System.Media.SoundPlayer(errorSoundPath); |
|
|
|
media.Play(); |
|
|
|
} |
|
|
|
this.lblError.Text = result.Message; |
|
|
|
this.lblError.ForeColor = Color.White; |
|
|
|
this.lblError.BackColor = Color.Red; |
|
|
@ -805,10 +819,13 @@ namespace QMAPP.WinForm.Forms.Operation |
|
|
|
|
|
|
|
//PlaySound.PlaySounds.Play(@okSoundPath);
|
|
|
|
if (!"770,018,278".Contains(productCode.Substring(0, 3))) |
|
|
|
{ |
|
|
|
if(File.Exists(@okSoundPath)) |
|
|
|
{ |
|
|
|
System.Media.SoundPlayer media = new System.Media.SoundPlayer(@okSoundPath); |
|
|
|
media.Play(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.lblLock.Tag.ToString().Equals("0")) |
|
|
|