diff --git a/WinFormControl/UWeightControl.cs b/WinFormControl/UWeightControl.cs index 22aff58..ef13629 100644 --- a/WinFormControl/UWeightControl.cs +++ b/WinFormControl/UWeightControl.cs @@ -203,7 +203,8 @@ namespace WinFormControl str = "0"; this.Invoke(new Action(delegate() { - var v = decimal.Parse(str); + decimal v = 0; + decimal.TryParse(str, out v); lblChengZhong.Text = string.Format(format, v); if (str != "0") { diff --git a/WinFormControl/Utils/SoundPalyUtil.cs b/WinFormControl/Utils/SoundPalyUtil.cs index 833f3d5..0348c9c 100644 --- a/WinFormControl/Utils/SoundPalyUtil.cs +++ b/WinFormControl/Utils/SoundPalyUtil.cs @@ -26,8 +26,7 @@ namespace WinFormControl if (!File.Exists(filePath)) return; player.SoundLocation = filePath; - player.Load(); - player.Play(); + player.PlaySync(); } }