コード例 #1
0
        public OrderSelLiveSiren()
        {
            InitializeComponent();

            label2.Text = LangPack.GetSelSiren();
            btnMic.Text = LangPack.GetSiren1();
            btnRec.Text = LangPack.GetSiren2();

            try
            {
                if (AdengUtil.INIReadValueString(this.setting, "siren1", this.IniFilePath) != string.Empty)
                {
                    msgTime[0] = AdengUtil.INIReadValueString(this.setting, "siren1", this.IniFilePath);
                }

                if (AdengUtil.INIReadValueString(this.setting, "siren2", this.IniFilePath) != string.Empty)
                {
                    msgTime[1] = AdengUtil.INIReadValueString(this.setting, "siren2", this.IniFilePath);
                }

                if (!(System.IO.File.Exists(Util.file_Siren + "siren_1.wav")))
                {
                    this.LameMp3ToWav(Util.file_Siren + "siren_1.mp3", Util.file_Siren + "siren_1.wav");
                }

                if (!(System.IO.File.Exists(Util.file_Siren + "siren_2.wav")))
                {
                    this.LameMp3ToWav(Util.file_Siren + "siren_2.mp3", Util.file_Siren + "siren_2.wav");
                }
            }
            catch (Exception ex)
            {
                AdengUtil.INIWriteValueString(this.setting, "siren1", msgTime[0], IniFilePath);
                AdengUtil.INIWriteValueString(this.setting, "siren2", msgTime[1], IniFilePath);
            }
        }