Subject:
Delete Specified Region Posted by: jetdv
Date:3/22/2005 10:25:37 PM
This routine will search for a region with a specific name and will remove that marker from all specified files. The file will be saved over the top of itself. Once again, it assumes variables set by other areas of the complete program. private void btnConvert_Click(object sender, System.EventArgs e) { foreach (string file in filearray) { txtStatus.Text = "Checking: " + file; //Open the file ISfFileHost forgefile = forge.OpenFile(file, false, false); foreach (SfAudioMarker mk in forgefile.Markers) { if (mk.IsRegion && (mk.Name.ToUpper() == txtRegName.Text.ToUpper())) { forgefile.Markers.Remove(mk); break; } } //save and close the file forgefile.Close(CloseOptions.SaveChanges); txtStatus.Text = txtStatus.Text + " Done..."; } } Message last edited on3/22/2005 10:27:27 PM byjetdv. |