コード例 #1
0
        protected void RenameInstrumentEnsureUnique(Instrument instrument, string baseName)
        {
            string name = baseName;
            var j = 2;

            while (!project.IsInstrumentNameUnique(name))
                name = baseName + "-" + j++;

            project.RenameInstrument(instrument, name);
        }