• C# 数字语音wav 提示。。。。。。。。。。。


    https://files.cnblogs.com/Fooo/Net-数字语音wav.rar

     

    https://files.cnblogs.com/Fooo/wav.rar

    ///////////***************************

    using System.Media;

           SoundPlayer win;
            public Form1()
            {
                InitializeComponent();
            }

            private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
            {
                win = null;
                int keyAscii = (int)e.KeyChar;
                this.label1.Text = keyAscii.ToString();
                switch (keyAscii)
                {
                   //win = new SoundPlayer(Application.StartupPath + @"\2.wav");  //相对路径写法 
                    case 48:
                        win=new SoundPlayer(Properties.Resources._0);
                        break;
                    case 49:
                        win = new SoundPlayer(Properties.Resources._1);                  
                        break;
                    case 50:
                        win = new SoundPlayer(Properties.Resources._2);
                        break;
                    case 51:
                        win = new SoundPlayer(Properties.Resources._3);
                        break;
                    case 52:
                        win = new SoundPlayer(Properties.Resources._4);
                        break;
                    case 53:
                        win = new SoundPlayer(Properties.Resources._5);
                        break;

                    case 54:
                        win = new SoundPlayer(Properties.Resources._6);
                        break;
                    case 55:
                        win = new SoundPlayer(Properties.Resources._7);
                        break;
                    case 56:
                        win = new SoundPlayer(Properties.Resources._8);
                        break;
                    case 57:
                        win = new SoundPlayer(Properties.Resources._9);
                        break;
                    default:
                        break;

                }
                if (win != null)
                win.Play();
            }

  • 相关阅读:
    oc获得设备类型
    oc代码规范
    图片下载进度
    Nsdate的各种常用操作
    学习视频
    ios 编码转换 保存文件
    免费代码托管网站
    两年JAVA程序员的面试总结
    Java 性能优化的 45 个细节
    7年Java游戏后端,被淘汰辛酸史
  • 原文地址:https://www.cnblogs.com/Fooo/p/1432672.html
Copyright © 2020-2023  润新知