增加音乐播放器

This commit is contained in:
2026-03-29 19:18:33 +08:00
parent 78bda7c118
commit 3a9ff9c70f
6 changed files with 521 additions and 5 deletions

View File

@@ -250,6 +250,10 @@ namespace CMLeonOS.Gui.Apps
{
ProcessManager.AddProcess(this, new MarkItViewer(path)).Start();
}
else if (extension == ".mus")
{
ProcessManager.AddProcess(this, new MusicEditor(path)).Start();
}
else
{
ShowOpenWithPrompt(path);
@@ -279,6 +283,9 @@ namespace CMLeonOS.Gui.Apps
case "MarkIt Viewer":
ProcessManager.AddProcess(this, new MarkItViewer(path)).Start();
break;
case "Music Editor":
ProcessManager.AddProcess(this, new MusicEditor(path)).Start();
break;
default:
Logger.Logger.Instance.Warning("Files", $"Unsupported open-with app: {appName}");
break;
@@ -333,6 +340,15 @@ namespace CMLeonOS.Gui.Apps
};
wm.AddWindow(markItButton);
Button musicButton = new Button(openWithWindow, 108, 98, 84, 24);
musicButton.Text = "Music";
musicButton.OnClick = (_, _) =>
{
wm.RemoveWindow(openWithWindow);
OpenWithApp(path, "Music Editor");
};
wm.AddWindow(musicButton);
Button cancelButton = new Button(openWithWindow, openWithWindow.Width - 80 - 12, openWithWindow.Height - 20 - 12, 80, 20);
cancelButton.Text = "Cancel";
cancelButton.OnClick = (_, _) =>