-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8798ed1
commit 444499e
Showing
6 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...itorLayout/Commands/ApplySuggestEditorLayout/ApplySuggestEditorLayoutCommandDefinition.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Gemini.Framework.Commands; | ||
using OngekiFumenEditor.Properties; | ||
|
||
namespace OngekiFumenEditor.Kernel.EditorLayout.Commands.About | ||
{ | ||
[CommandDefinition] | ||
public class ApplySuggestEditorLayoutCommandDefinition : CommandDefinition | ||
{ | ||
public const string CommandName = "EditorLayout.ApplySuggestEditorLayout"; | ||
|
||
public override string Name | ||
{ | ||
get { return CommandName; } | ||
} | ||
|
||
public override string Text | ||
{ | ||
get { return "使用推荐的布局"; } | ||
} | ||
|
||
public override string ToolTip | ||
{ | ||
get { return Text; } | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
.../EditorLayout/Commands/ApplySuggestEditorLayout/ApplySuggestEditorLayoutCommandHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Caliburn.Micro; | ||
using Gemini.Framework.Commands; | ||
using Gemini.Framework.Threading; | ||
using OngekiFumenEditor.Kernel.EditorLayout; | ||
using OngekiFumenEditor.Kernel.EditorLayout.Commands.About; | ||
using OngekiFumenEditor.Modules.FumenVisualEditor.Kernel; | ||
using OngekiFumenEditor.UI.Dialogs; | ||
using System.Threading.Tasks; | ||
|
||
namespace OngekiFumenEditor.Kernel.MiscMenu.Commands.About | ||
{ | ||
[CommandHandler] | ||
public class ApplySuggestEditorLayoutCommandHandler : CommandHandlerBase<ApplySuggestEditorLayoutCommandDefinition> | ||
{ | ||
public override async Task Run(Command command) | ||
{ | ||
await IoC.Get<IEditorLayoutManager>().ApplyDefaultSuggestEditorLayout(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Gemini.Framework.Menus; | ||
using OngekiFumenEditor.Kernel.EditorLayout.Commands.About; | ||
using OngekiFumenEditor.Kernel.MiscMenu.Commands.About; | ||
using OngekiFumenEditor.Kernel.MiscMenu.Commands.CallFullGC; | ||
using OngekiFumenEditor.Kernel.MiscMenu.Commands.OpenUrlCommon; | ||
using OngekiFumenEditor.Properties; | ||
using System.ComponentModel.Composition; | ||
|
||
namespace OngekiFumenEditor.Kernel.EditorLayout | ||
{ | ||
public static class MenuDefinitions | ||
{ | ||
[Export] | ||
public static MenuItemGroupDefinition EditorLayoutMenuGroup = new MenuItemGroupDefinition(Gemini.Modules.MainMenu.MenuDefinitions.WindowMenu, 999); | ||
|
||
[Export] | ||
public static MenuItemDefinition ApplySuggestEditorLayoutMenuItem = new CommandMenuItemDefinition<ApplySuggestEditorLayoutCommandDefinition>( | ||
EditorLayoutMenuGroup, 0); | ||
} | ||
} |