public bool ExAddSound(string filename) { if (File.Exists(filename)) { try { sound.AddSound(filename, count.ToString()); count++; return(true); } catch (Exception e) { MessageBox.Show(e.Message); return(false); } } else { MessageBox.Show("ファイルが存在しませんでした\n" + filename); return(false); } }
/// <summary> /// コンストラクタ /// </summary> /// <param name="sound"></param> /// <param name="name"></param> /// <param name="data"></param> public SoundResource(ISound sound, string name, byte[] data) { this.sound = sound; this.name = name; sound.AddSound(data, name); }