Skip to content

Commit

Permalink
菜单栏去除Part一项
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYunPlayer committed May 19, 2024
1 parent c764721 commit ba1e4ed
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions TuneLab/Views/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -669,43 +669,6 @@ Menu CreateMenu()
menu.Items.Add(menuBarItem);
}

{
var menuBarItem = new MenuItem { Header = "Part", Foreground = Style.TEXT_LIGHT.ToBrush(), Focusable = false };
{
var menuItem = new MenuItem() { Header = "Set Voice" };
var allEngines = VoicesManager.GetAllVoiceEngines();
for (int i = 0; i < allEngines.Count; i++)
{
var type = allEngines[i];
var infos = VoicesManager.GetAllVoiceInfos(type);
if (infos == null)
continue;

var engine = new MenuItem() { Header = string.IsNullOrEmpty(type) ? "Built-In" : type };
{
foreach (var info in infos)
{
var voice = new MenuItem().
SetName(info.Value.Name).
SetAction(() =>
{
var part = PianoWindow.Part;
if (part == null)
return;
part.Voice.Set(new VoiceInfo() { Type = type, ID = info.Key });
part.Commit();
});
engine.Items.Add(voice);
}
}
menuItem.Items.Add(engine);
}
menuBarItem.Items.Add(menuItem);
}
menu.Items.Add(menuBarItem);
}

{
var menuBarItem = new MenuItem { Header = "Transport", Foreground = Style.TEXT_LIGHT.ToBrush(), Focusable = false };
{
Expand Down

0 comments on commit ba1e4ed

Please sign in to comment.