示例#1
0
        private void addVolumeItem(string title, AudioFile audio)
        {
            ListViewItem l;

            l = new ListViewItem();
            l.Text = title;
            l.SubItems.Add(audio.Volume.ToString());
            l.ToolTipText = audio.Name;
            l.ImageIndex = 0;
            l.Tag = audio;
            lstVolume.Items.Add(l);
        }
示例#2
0
        internal void AudioFileListChanged(AudioFileList sender, AudioFileChangeType type, AudioFile from, AudioFile to, int index)
        {
            this.LastChanged = DateTime.Now;

            if (type == AudioFileChangeType.Removed || type == AudioFileChangeType.Changed)
            {
                FileHelper.Delete(_rawFiles[from.Name]);
                _rawFiles.Remove(from.Name);
                _rawLengths.Remove(from.Name);
            }

            if (type == AudioFileChangeType.Added || type == AudioFileChangeType.Changed)
            {
                string filename = string.Format(@"{0}\{1}_{2}.wav", _project.GetWorkingPath(WorkingFileType.RawWav), _name, QbKey.Create(to.Name).Crc.ToString("X").PadLeft(8, '0'));

                //if we have no record of the file and it exists then delete it. It may not match what we need
                FileHelper.Delete(filename);

                _rawFiles.Add(to.Name, filename);
                _rawLengths.Add(to.Name, 0);
            }
        }