protected void RenameInstrumentEnsureUnique(Instrument instrument, string baseName) { string name = baseName; var j = 2; while (!project.IsInstrumentNameUnique(name)) name = baseName + "-" + j++; project.RenameInstrument(instrument, name); }
protected void RenameInstrumentEnsureUnique(Instrument instrument, string baseName) { string name = baseName; var j = 2; while (!project.IsInstrumentNameUnique(name)) name = baseName + "-" + j++; project.RenameInstrument(instrument, name); }