private void MarkerSetIntervalCommand_Invoked(object sender, EventArgs e) { if (myVegas.Project.Markers.Count <= 0) { return; } var selectedMks = myVegas.GetSelectedMarkers(); if (selectedMks.Count == 0 && myVegas.Project.Markers.Count != 0) { MessageBox.Show("Select a range of markers using the loop selection."); return; } Timecode time = FormTimeEntry.GetUserTime(); if (time == null) { MessageBox.Show("You must enter a valid time."); return; } Timecode inc = null; using (var undo = new UndoBlock("Set marker interval")) { foreach (Marker mk in selectedMks) { if (inc == null) { inc = mk.Position; } mk.Position = inc; inc += time; } } }