mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-04-21 19:24:00 +00:00
增加音乐播放器
This commit is contained in:
@@ -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 = (_, _) =>
|
||||
|
||||
Reference in New Issue
Block a user