diff --git a/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeBehavior.cs b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeBehavior.cs index f18f845d..2240e32d 100644 --- a/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeBehavior.cs +++ b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeBehavior.cs @@ -9,8 +9,6 @@ using Caliburn.Micro; using Microsoft.Xaml.Behaviors; using OngekiFumenEditor.Base; -using OngekiFumenEditor.Kernel.KeyBinding; -using OngekiFumenEditor.Modules.FumenObjectPropertyBrowser; using OngekiFumenEditor.Modules.FumenVisualEditor.Base; using OngekiFumenEditor.Modules.FumenVisualEditor.Kernel; using OngekiFumenEditor.Modules.FumenVisualEditor.ViewModels; @@ -26,25 +24,25 @@ namespace OngekiFumenEditor.Modules.FumenVisualEditor.Behaviors.BatchMode; public class BatchModeBehavior : Behavior { - private static readonly ImmutableDictionary CommandDefinitions = - new Dictionary + public static readonly ImmutableList Submodes = + new List { - [KeyBindingDefinitions.KBD_Batch_ModeWallLeft] = typeof(BatchModeInputWallLeft), - [KeyBindingDefinitions.KBD_Batch_ModeLaneLeft] = typeof(BatchModeInputLaneLeft), - [KeyBindingDefinitions.KBD_Batch_ModeLaneCenter] = typeof(BatchModeInputLaneCenter), - [KeyBindingDefinitions.KBD_Batch_ModeLaneRight] = typeof(BatchModeInputLaneRight), - [KeyBindingDefinitions.KBD_Batch_ModeWallRight] = typeof(BatchModeInputWallRight), - [KeyBindingDefinitions.KBD_Batch_ModeLaneColorful] = typeof(BatchModeInputLaneColorful), - [KeyBindingDefinitions.KBD_Batch_ModeTap] = typeof(BatchModeInputTap), - [KeyBindingDefinitions.KBD_Batch_ModeHold] = typeof(BatchModeInputHold), - [KeyBindingDefinitions.KBD_Batch_ModeFlick] = typeof(BatchModeInputFlick), - [KeyBindingDefinitions.KBD_Batch_ModeLaneBlock] = typeof(BatchModeInputLaneBlock), - [KeyBindingDefinitions.KBD_Batch_ModeNormalBell] = typeof(BatchModeInputNormalBell), - [KeyBindingDefinitions.KBD_Batch_ModeClipboard] = typeof(BatchModeInputClipboard), - [KeyBindingDefinitions.KBD_Batch_ModeFilterLanes] = typeof(BatchModeFilterLanes), - [KeyBindingDefinitions.KBD_Batch_ModeFilterDockableObjects] = typeof(BatchModeFilterDockableObjects), - [KeyBindingDefinitions.KBD_Batch_ModeFilterFloatingObjects] = typeof(BatchModeFilterFloatingObjects), - }.ToImmutableDictionary(kv => kv.Key, kv => (BatchModeSubmode)Activator.CreateInstance(kv.Value)); + new BatchModeInputClipboard(), + new BatchModeInputWallLeft(), + new BatchModeInputLaneLeft(), + new BatchModeInputLaneCenter(), + new BatchModeInputLaneRight(), + new BatchModeInputWallRight(), + new BatchModeInputLaneColorful(), + new BatchModeInputTap(), + new BatchModeInputHold(), + new BatchModeInputFlick(), + new BatchModeInputLaneBlock(), + new BatchModeInputNormalBell(), + new BatchModeFilterLanes(), + new BatchModeFilterDockableObjects(), + new BatchModeFilterFloatingObjects(), + }.ToImmutableList(); private static readonly ImmutableDictionary> ClickTriggers = new Dictionary>() @@ -63,10 +61,6 @@ public BatchModeSubmode CurrentSubmode private readonly List OldKeyTriggers = new(); private readonly List NewKeyTriggers = new(); - public BatchModeBehavior() - { - } - protected override void OnAttached() { if (AssociatedObject.DataContext is not FumenVisualEditorViewModel editor) @@ -76,11 +70,11 @@ protected override void OnAttached() // Create brush key triggers on the FumenVisualEditorView. // Temporarily delete existing ones that clash with brush keys. - var allCommands = CommandDefinitions.SelectMany - , ((Key, ModifierKeys), BatchModeSubmode)>(kv => + var allCommands = Submodes.SelectMany + (submode => [ - ((kv.Key.Key, kv.Key.Modifiers), kv.Value), - ((kv.Key.Key, kv.Key.Modifiers | ModifierKeys.Shift), kv.Value) + ((submode.KeyBinding.Key, submode.KeyBinding.Modifiers), submode), + ((submode.KeyBinding.Key, submode.KeyBinding.Modifiers | ModifierKeys.Shift), submode) ]); foreach (var ((key, modifiers), submodeType) in allCommands) { @@ -128,7 +122,7 @@ protected override void OnDetaching() NewKeyTriggers.Clear(); OldKeyTriggers.Clear(); - + var glTriggers = Interaction.GetTriggers(AssociatedObject.glView); foreach (var (eventName, action) in GeneratedClickTriggerActions) { var glTrigger = glTriggers.First(t => t is EventTrigger et && et.EventName == eventName); @@ -357,7 +351,7 @@ private static void ConsumeAlt(object sender, KeyEventArgs e) #region Dependency property - public static readonly DependencyProperty CurrentSubmodeProperty = DependencyProperty.RegisterAttached(nameof(CurrentSubmode), typeof(BatchModeSubmode), typeof(BatchModeBehavior), new(CommandDefinitions[KeyBindingDefinitions.KBD_Batch_ModeClipboard])); + public static readonly DependencyProperty CurrentSubmodeProperty = DependencyProperty.RegisterAttached(nameof(CurrentSubmode), typeof(BatchModeSubmode), typeof(BatchModeBehavior), new(Submodes.First())); #endregion diff --git a/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeCommandHandlers.cs b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeCommandHandlers.cs new file mode 100644 index 00000000..b3ed2436 --- /dev/null +++ b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeCommandHandlers.cs @@ -0,0 +1,62 @@ +using System; +using System.ComponentModel.Composition; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms.VisualStyles; +using System.Windows.Input; +using Caliburn.Micro; +using Gemini.Framework.Commands; +using OngekiFumenEditor.Kernel.KeyBinding; +using OngekiFumenEditor.Modules.FumenVisualEditor.Kernel; +using OngekiFumenEditor.Utils; + +namespace OngekiFumenEditor.Modules.FumenVisualEditor.Behaviors.BatchMode; + +public abstract class BatchModeSubmodeCommandHandler : CommandHandlerBase + where TCommandDefinition : BatchModeSubmode +{ + private IEditorDocumentManager Editor; + private BatchModeSubmode Submode; + + public BatchModeSubmodeCommandHandler() + { + Editor = IoC.Get(); + Submode = BatchModeBehavior.Submodes.OfType().Single(); + } + + public override void Update(Command command) + { + base.Update(command); + + if (Editor.CurrentActivatedEditor is not null && Editor.CurrentActivatedEditor.IsBatchMode) { + command.Enabled = true; + command.Checked = Editor.CurrentActivatedEditor.BatchModeBehavior.CurrentSubmode == Submode; + } + else { + command.Enabled = false; + command.Checked = false; + } + } + + public override Task Run(Command command) + { + Editor.CurrentActivatedEditor.BatchModeBehavior.CurrentSubmode = Submode; + return Task.CompletedTask; + } +} + +[CommandHandler] public class BatchModeLaneLeftCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeLaneCenterCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeLaneRightCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeWallLeftCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeWallRightCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeLaneColorfulCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeTapCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeHoldCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeFlickCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeBellCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeLaneBlockCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeClipboardCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeFilterLanesCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeFilterDockableObjectsCommandHandler : BatchModeSubmodeCommandHandler; +[CommandHandler] public class BatchModeFilterFloatingObjectsCommandHandler : BatchModeSubmodeCommandHandler; \ No newline at end of file diff --git a/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeSubmode.cs b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeSubmode.cs index bde3a49e..bbef2e28 100644 --- a/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeSubmode.cs +++ b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeSubmode.cs @@ -3,13 +3,17 @@ using System.Collections.Generic; using System.Linq; using Caliburn.Micro; +using Gemini.Framework.Commands; +using Gemini.Framework.Services; using OngekiFumenEditor.Base; using OngekiFumenEditor.Base.OngekiObjects; using OngekiFumenEditor.Base.OngekiObjects.Lane; using OngekiFumenEditor.Base.OngekiObjects.Lane.Base; using OngekiFumenEditor.Base.OngekiObjects.Wall; +using OngekiFumenEditor.Kernel.KeyBinding; using OngekiFumenEditor.Modules.FumenVisualEditor.Kernel; using OngekiFumenEditor.Properties; +using OngekiFumenEditor.Utils; namespace OngekiFumenEditor.Modules.FumenVisualEditor.Behaviors.BatchMode; @@ -19,9 +23,19 @@ namespace OngekiFumenEditor.Modules.FumenVisualEditor.Behaviors.BatchMode; /// Sub-modes are selected via Batch Mode shortcuts. /// Only one sub-mode can be active at a time. /// -public abstract class BatchModeSubmode +public abstract class BatchModeSubmode : CommandDefinition { - public abstract string DisplayName { get; } + public abstract KeyBindingDefinition KeyBinding { get; } + public abstract string ResourceKey { get; } + + public string HelperText => $"{DisplayName} ({KeyBindingDefinition.FormatToExpression(KeyBinding)})"; + public string DisplayName => Resources.ResourceManager.GetString(ResourceKey)!; + + public override string Name => $"BatchMode.{GetType().Name}"; + public override Uri IconSource => + new Uri($"pack://application:,,,/OngekiFumenEditor;component/Resources/Icons/Batch/{ResourceKey}.png"); + + public override string Text => DisplayName; } /// @@ -29,11 +43,14 @@ public abstract class BatchModeSubmode /// public abstract class BatchModeFilterSubmode : BatchModeSubmode { + public sealed override string ToolTip => Resources.BatchModeFilterTooltipFormat.Format(HelperText); public abstract Func FilterFunction { get; } } public abstract class BatchModeInputSubmode : BatchModeSubmode { + public override string ToolTip => HelperText; + public abstract IEnumerable GenerateObject(); public virtual bool AutoSelect => false; public virtual BatchModeObjectModificationAction? ModifyObjectCtrl { get; } = null; @@ -43,6 +60,7 @@ public abstract class BatchModeInputSubmode : BatchModeSubmode : null; } +[CommandDefinition] public class BatchModeInputClipboard : BatchModeInputSubmode { private IFumenEditorClipboard Clipboard; @@ -52,7 +70,8 @@ public BatchModeInputClipboard() Clipboard = IoC.Get(); } - public override string DisplayName => Resources.Clipboard; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeClipboard; + public override string ResourceKey => nameof(Resources.Clipboard); public override IEnumerable GenerateObject() { return Clipboard.CurrentCopiedObjects.Select(obj => (OngekiTimelineObjectBase)obj.CopyNew()); @@ -61,7 +80,7 @@ public override IEnumerable GenerateObject() public abstract class BatchModeSingleInputSubmode : BatchModeInputSubmode { - public abstract Type ObjectType { get;} + public abstract Type ObjectType { get; } } public abstract class BatchModeInputSubmode : BatchModeSingleInputSubmode @@ -81,34 +100,46 @@ public abstract class BatchModeInputLane : BatchModeInputSubmode public override bool AutoSelect => true; } +[CommandDefinition] public class BatchModeInputLaneLeft : BatchModeInputLane { - public override string DisplayName => Resources.LaneLeft; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeLaneLeft; + public override string ResourceKey => nameof(Resources.LaneLeft); } +[CommandDefinition] public class BatchModeInputLaneCenter : BatchModeInputLane { - public override string DisplayName => Resources.LaneCenter; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeLaneCenter; + public override string ResourceKey => nameof(Resources.LaneCenter); } +[CommandDefinition] public class BatchModeInputLaneRight : BatchModeInputLane { - public override string DisplayName => Resources.LaneRight; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeLaneRight; + public override string ResourceKey => nameof(Resources.LaneRight); } +[CommandDefinition] public class BatchModeInputWallRight : BatchModeInputLane { - public override string DisplayName => Resources.WallRight; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeWallRight; + public override string ResourceKey => nameof(Resources.WallRight); } +[CommandDefinition] public class BatchModeInputWallLeft : BatchModeInputLane { - public override string DisplayName => Resources.WallLeft; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeWallLeft; + public override string ResourceKey => nameof(Resources.WallLeft); } +[CommandDefinition] public class BatchModeInputLaneColorful : BatchModeInputLane { - public override string DisplayName => Resources.LaneColorful; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeLaneColorful; + public override string ResourceKey => nameof(Resources.LaneColorful); } public abstract class BatchModeInputHitSubmode : BatchModeInputSubmode @@ -122,19 +153,25 @@ private static void CritObject(OngekiObjectBase baseObject) } } +[CommandDefinition] public class BatchModeInputTap : BatchModeInputHitSubmode { - public override string DisplayName => Resources.Tap; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeTap; + public override string ResourceKey => nameof(Resources.Tap); } +[CommandDefinition] public class BatchModeInputHold : BatchModeInputHitSubmode { - public override string DisplayName => Resources.Hold; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeHold; + public override string ResourceKey => nameof(Resources.Hold); public override bool AutoSelect => true; } +[CommandDefinition] public class BatchModeInputFlick : BatchModeInputHitSubmode { + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeFlick; public override BatchModeObjectModificationAction ModifyObjectShift { get; } = new(SwitchFlick, Resources.BatchModeModifierSwitchDirection); private static void SwitchFlick(OngekiObjectBase baseObject) @@ -142,11 +179,13 @@ private static void SwitchFlick(OngekiObjectBase baseObject) ((Flick)baseObject).Direction = Flick.FlickDirection.Right; } - public override string DisplayName => Resources.Flick; + public override string ResourceKey => nameof(Resources.Flick); } +[CommandDefinition] public class BatchModeInputLaneBlock : BatchModeInputSubmode { + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeLaneBlock; public override BatchModeObjectModificationAction ModifyObjectCtrl { get; } = new BatchModeObjectModificationAction(SwitchDirection, Resources.BatchModeModifierSwitchDirection); @@ -155,29 +194,37 @@ private static void SwitchDirection(OngekiObjectBase baseObject) ((LaneBlockArea)baseObject).Direction = LaneBlockArea.BlockDirection.Right; } - public override string DisplayName => Resources.LaneBlock; + public override string ResourceKey => nameof(Resources.LaneBlock); } +[CommandDefinition] public class BatchModeInputNormalBell : BatchModeInputSubmode { - public override string DisplayName => Resources.Bell; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeNormalBell; + public override string ResourceKey => nameof(Resources.Bell); } +[CommandDefinition] public class BatchModeFilterLanes : BatchModeFilterSubmode { - public override string DisplayName => Resources.ObjectFilterLanes; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeFilterLanes; + public override string ResourceKey => nameof(Resources.ObjectFilterLanes); public override Func FilterFunction => obj => obj is LaneStartBase or LaneNextBase; } +[CommandDefinition] public class BatchModeFilterDockableObjects : BatchModeFilterSubmode { - public override string DisplayName => Resources.ObjectFilterDockables; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeFilterDockableObjects; + public override string ResourceKey => nameof(Resources.ObjectFilterDockables); public override Func FilterFunction => obj => obj is Tap or Hold or HoldEnd; } +[CommandDefinition] public class BatchModeFilterFloatingObjects : BatchModeFilterSubmode { - public override string DisplayName => Resources.ObjectFilterFloating; + public override KeyBindingDefinition KeyBinding => KeyBindingDefinitions.KBD_Batch_ModeFilterFloatingObjects; + public override string ResourceKey => nameof(Resources.ObjectFilterFloating); public override Func FilterFunction => obj => obj is Bell or Bullet or Flick; } diff --git a/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeToolbar.cs b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeToolbar.cs new file mode 100644 index 00000000..97fb83e4 --- /dev/null +++ b/OngekiFumenEditor/Modules/FumenVisualEditor/Behaviors/BatchMode/BatchModeToolbar.cs @@ -0,0 +1,32 @@ +using System.ComponentModel.Composition; +using Gemini.Framework.ToolBars; +using Microsoft.CodeAnalysis.CodeRefactorings; +using OngekiFumenEditor.Modules.FumenVisualEditor.Commands; +using OngekiFumenEditor.Modules.FumenVisualEditor.Commands.BatchModeToggle; + +namespace OngekiFumenEditor.Modules.FumenVisualEditor.Behaviors.BatchMode; + +public class BatchModeToolbar +{ + [Export] + public static ToolBarDefinition BatchModeToolbarDefinition = new ToolBarDefinition(9, "Batch Mode"); + + [Export] + public static ToolBarItemGroupDefinition BatchModeToolBarGroup = new ToolBarItemGroupDefinition(BatchModeToolbarDefinition, 0); + + [Export] public static ToolBarItemDefinition BatchModeWallLeftItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 0); + [Export] public static ToolBarItemDefinition BatchModeLaneLeftItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 1); + [Export] public static ToolBarItemDefinition BatchModeLaneCenterItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 2); + [Export] public static ToolBarItemDefinition BatchModeLaneRightItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 3); + [Export] public static ToolBarItemDefinition BatchModeWallRightItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 4); + [Export] public static ToolBarItemDefinition BatchModeLaneColorfulItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 5); + [Export] public static ToolBarItemDefinition BatchModeInputTapItemDefinition = new CommandToolBarItemDefinition( BatchModeToolBarGroup, 6); + [Export] public static ToolBarItemDefinition BatchModeHoldItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 7); + [Export] public static ToolBarItemDefinition BatchModeFlickItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 8); + [Export] public static ToolBarItemDefinition BatchModeBellItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 9); + [Export] public static ToolBarItemDefinition BatchModeLaneBlockItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 10); + [Export] public static ToolBarItemDefinition BatchModeClipboardItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 11); + [Export] public static ToolBarItemDefinition BatchModeFilterLanesItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 100); + [Export] public static ToolBarItemDefinition BatchModeFilterDockableItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 101); + [Export] public static ToolBarItemDefinition BatchModeFilterFloatingItemDefinition = new CommandToolBarItemDefinition(BatchModeToolBarGroup, 102); +} \ No newline at end of file diff --git a/OngekiFumenEditor/Modules/FumenVisualEditor/ViewModels/FumenVisualEditorViewModel.UserInteractionActions.cs b/OngekiFumenEditor/Modules/FumenVisualEditor/ViewModels/FumenVisualEditorViewModel.UserInteractionActions.cs index ef37d32b..8507011b 100644 --- a/OngekiFumenEditor/Modules/FumenVisualEditor/ViewModels/FumenVisualEditorViewModel.UserInteractionActions.cs +++ b/OngekiFumenEditor/Modules/FumenVisualEditor/ViewModels/FumenVisualEditorViewModel.UserInteractionActions.cs @@ -1788,8 +1788,8 @@ public void ToastNotify(string message) if (tX.TGrid != obj.TGrid) return false; if (obj is OngekiMovableObjectBase movable) { - var mX = (OngekiMovableObjectBase)x; - if (movable.XGrid != mX.XGrid) return false; + var mX = x as OngekiMovableObjectBase; + if (movable.XGrid != mX?.XGrid) return false; } return obj switch diff --git a/OngekiFumenEditor/Modules/FumenVisualEditor/Views/BatchModeOverlayView.xaml b/OngekiFumenEditor/Modules/FumenVisualEditor/Views/BatchModeOverlayView.xaml index c7c5c055..7b718905 100644 --- a/OngekiFumenEditor/Modules/FumenVisualEditor/Views/BatchModeOverlayView.xaml +++ b/OngekiFumenEditor/Modules/FumenVisualEditor/Views/BatchModeOverlayView.xaml @@ -21,7 +21,7 @@ - + diff --git a/OngekiFumenEditor/OngekiFumenEditor.csproj b/OngekiFumenEditor/OngekiFumenEditor.csproj index 251f31bc..0a126071 100644 --- a/OngekiFumenEditor/OngekiFumenEditor.csproj +++ b/OngekiFumenEditor/OngekiFumenEditor.csproj @@ -49,6 +49,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OngekiFumenEditor/Properties/Resources.Designer.cs b/OngekiFumenEditor/Properties/Resources.Designer.cs index e2498713..21915b8d 100644 --- a/OngekiFumenEditor/Properties/Resources.Designer.cs +++ b/OngekiFumenEditor/Properties/Resources.Designer.cs @@ -1,10 +1,9 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // -// 此代码由工具生成。 -// 运行时版本:4.0.30319.42000 +// This code was generated by a tool. // -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -13,12 +12,12 @@ namespace OngekiFumenEditor.Properties { /// - /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// A strongly-typed resource class, for looking up localized strings, etc. /// - // 此类是由 StronglyTypedResourceBuilder - // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 - // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen - // (以 /str 作为命令选项),或重新生成 VS 项目。 + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +32,7 @@ internal Resources() { } /// - /// 返回此类使用的缓存的 ResourceManager 实例。 + /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +46,8 @@ internal Resources() { } /// - /// 重写当前线程的 CurrentUICulture 属性,对 - /// 使用此强类型资源类的所有资源查找执行重写。 + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { @@ -384,6 +383,15 @@ public static string BatchModeDeleteRangeOfObjectType { } } + /// + /// 查找类似 Filter {0} 的本地化字符串。 + /// + public static string BatchModeFilterTooltipFormat { + get { + return ResourceManager.GetString("BatchModeFilterTooltipFormat", resourceCulture); + } + } + /// /// 查找类似 Add to selection 的本地化字符串。 /// @@ -4858,7 +4866,7 @@ public static string SelectMusicXmlFile { } /// - /// 查找类似 的本地化字符串。 + /// Looks up a localized string similar to . /// public static string SelectOneDockableLaneOnly { get { diff --git a/OngekiFumenEditor/Properties/Resources.resx b/OngekiFumenEditor/Properties/Resources.resx index 852dc9a9..4c6fced8 100644 --- a/OngekiFumenEditor/Properties/Resources.resx +++ b/OngekiFumenEditor/Properties/Resources.resx @@ -1998,4 +1998,7 @@ + + Filter {0} + \ No newline at end of file diff --git a/OngekiFumenEditor/Resources/Icons/Batch/Bell.png b/OngekiFumenEditor/Resources/Icons/Batch/Bell.png new file mode 100644 index 00000000..feea8ae7 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/Bell.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/Clipboard.png b/OngekiFumenEditor/Resources/Icons/Batch/Clipboard.png new file mode 100644 index 00000000..ee7abd05 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/Clipboard.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/Flick.png b/OngekiFumenEditor/Resources/Icons/Batch/Flick.png new file mode 100644 index 00000000..8563115a Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/Flick.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/Hold.png b/OngekiFumenEditor/Resources/Icons/Batch/Hold.png new file mode 100644 index 00000000..28f0c875 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/Hold.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/LaneBlock.png b/OngekiFumenEditor/Resources/Icons/Batch/LaneBlock.png new file mode 100644 index 00000000..238dcc0e Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/LaneBlock.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/LaneCenter.png b/OngekiFumenEditor/Resources/Icons/Batch/LaneCenter.png new file mode 100644 index 00000000..440d82ca Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/LaneCenter.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/LaneColorful.png b/OngekiFumenEditor/Resources/Icons/Batch/LaneColorful.png new file mode 100644 index 00000000..9b88f983 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/LaneColorful.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/LaneLeft.png b/OngekiFumenEditor/Resources/Icons/Batch/LaneLeft.png new file mode 100644 index 00000000..c358c56c Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/LaneLeft.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/LaneRight.png b/OngekiFumenEditor/Resources/Icons/Batch/LaneRight.png new file mode 100644 index 00000000..a288ef72 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/LaneRight.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterDockables.png b/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterDockables.png new file mode 100644 index 00000000..d8d7c6c5 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterDockables.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterFloating.png b/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterFloating.png new file mode 100644 index 00000000..9a7dda96 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterFloating.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterLanes.png b/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterLanes.png new file mode 100644 index 00000000..53145bf1 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/ObjectFilterLanes.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/Tap.png b/OngekiFumenEditor/Resources/Icons/Batch/Tap.png new file mode 100644 index 00000000..984c9618 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/Tap.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/WallLeft.png b/OngekiFumenEditor/Resources/Icons/Batch/WallLeft.png new file mode 100644 index 00000000..30f540c4 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/WallLeft.png differ diff --git a/OngekiFumenEditor/Resources/Icons/Batch/WallRight.png b/OngekiFumenEditor/Resources/Icons/Batch/WallRight.png new file mode 100644 index 00000000..0b1c2156 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/Batch/WallRight.png differ diff --git a/OngekiFumenEditor/Resources/Icons/clipboard.png b/OngekiFumenEditor/Resources/Icons/clipboard.png new file mode 100644 index 00000000..ea906438 Binary files /dev/null and b/OngekiFumenEditor/Resources/Icons/clipboard.png differ