Label的textChanged事件
做一个语音提示功能,当Label的Text发生变化时做相应的提示音
switch (lblLogo.Text){ case "您好,请上秤!": PlaySound(@".\player\04.wav", IntPtr.Zero, 0x00020000 | 0x0001); break; case "等待计量中。": PlaySound(@".\player\01.wav", IntPtr.Zero, 0x00020000 | 0x0001); break; case "车辆停稳,正在计量。": PlaySound(@".\player\02.wav", IntPtr.Zero, 0x00020000 | 0x0001); break; case "计量完毕,请下秤。": PlaySound(@".\player\03.wav", IntPtr.Zero, 0x00020000 | 0x0001); break; }