Skip to content

Commit 9b7784a

Browse files
committed
add AkariMindController (wip)
1 parent 1e40e62 commit 9b7784a

19 files changed

Lines changed: 1147 additions & 0 deletions
Binary file not shown.
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Base
2+
{
3+
public enum ConnectStatus
4+
{
5+
NotConnect,
6+
Connected,
7+
Disconnected,
8+
}
9+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
3+
namespace OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Base
4+
{
5+
public struct NotesManagerData
6+
{
7+
public TimeSpan PlayEndTime { get; set; }
8+
public TimeSpan NoteEndTime { get; set; }
9+
public TimeSpan PlayStartTime { get; set; }
10+
public TimeSpan NoteStartTime { get; set; }
11+
public TimeSpan VisibleTime { get; set; }
12+
public TimeSpan InvisibleTime { get; set; }
13+
public TimeSpan CurrentTime { get; set; }
14+
15+
public float PlayProgress { get; set; }
16+
public bool IsPlaying { get; set; }
17+
public bool IsPlayEnd { get; set; }
18+
19+
public string OgkrFilePath { get; set; }
20+
21+
public bool IsAutoPlay { get; set; }
22+
public bool IsPauseIfMissBellOrDamaged { get; set; }
23+
}
24+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Gemini.Framework.Commands;
2+
3+
namespace OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Commands
4+
{
5+
[CommandDefinition]
6+
public class OngekiGamePlayControllerViewerCommandDefinition : CommandDefinition
7+
{
8+
public const string CommandName = "View.OngekiGamePlayControllerViewer";
9+
10+
public override string Name
11+
{
12+
get { return CommandName; }
13+
}
14+
15+
public override string Text
16+
{
17+
get { return "Akariの控制器"; }
18+
}
19+
20+
public override string ToolTip
21+
{
22+
get { return Text; }
23+
}
24+
}
25+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.ComponentModel.Composition;
2+
using System.Threading.Tasks;
3+
using Caliburn.Micro;
4+
using Gemini.Framework.Commands;
5+
using Gemini.Framework.Services;
6+
using Gemini.Framework.Threading;
7+
8+
namespace OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Commands
9+
{
10+
[CommandHandler]
11+
public class OngekiGamePlayControllerViewerCommandHandler : CommandHandlerBase<OngekiGamePlayControllerViewerCommandDefinition>
12+
{
13+
public override Task Run(Command command)
14+
{
15+
IoC.Get<IShell>().ShowTool<IOngekiGamePlayControllerViewer>();
16+
return TaskUtility.Completed;
17+
}
18+
}
19+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Gemini.Framework.Commands;
2+
using System.ComponentModel.Composition;
3+
using System.Windows.Input;
4+
5+
namespace OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Commands.QuickPlayPause
6+
{
7+
[CommandDefinition]
8+
public class QuickPlayPauseCommandDefinition : CommandDefinition
9+
{
10+
public const string CommandName = "OngekiFumenEditor.QuickPlayPause";
11+
12+
public override string Name
13+
{
14+
get { return CommandName; }
15+
}
16+
17+
public override string Text
18+
{
19+
get { return "快速控制游戏暂停或播放"; }
20+
}
21+
22+
public override string ToolTip
23+
{
24+
get { return Text; }
25+
}
26+
27+
[Export]
28+
public static CommandKeyboardShortcut KeyGesture = new CommandKeyboardShortcut<QuickPlayPauseCommandDefinition>(new(Key.Space, ModifierKeys.Control));
29+
}
30+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel.Composition;
4+
using System.Diagnostics;
5+
using System.IO;
6+
using System.Linq;
7+
using System.Text.Json;
8+
using System.Text.RegularExpressions;
9+
using System.Threading.Tasks;
10+
using System.Windows;
11+
using System.Xml;
12+
using System.Xml.Linq;
13+
using System.Xml.XPath;
14+
using Caliburn.Micro;
15+
using Gemini.Framework.Commands;
16+
using Gemini.Framework.Services;
17+
using Gemini.Framework.Threading;
18+
using Microsoft.Win32;
19+
using OngekiFumenEditor.Base;
20+
using OngekiFumenEditor.Base.OngekiObjects.ConnectableObject;
21+
using OngekiFumenEditor.Base.OngekiObjects.Lane.Base;
22+
using OngekiFumenEditor.Kernel.Audio;
23+
using OngekiFumenEditor.Modules.FumenVisualEditor;
24+
using OngekiFumenEditor.Modules.FumenVisualEditor.Base;
25+
using OngekiFumenEditor.Modules.FumenVisualEditor.Kernel;
26+
using OngekiFumenEditor.Modules.FumenVisualEditor.Models;
27+
using OngekiFumenEditor.Modules.FumenVisualEditor.ViewModels;
28+
using OngekiFumenEditor.Parser;
29+
using OngekiFumenEditor.Utils;
30+
using OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer;
31+
using OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Base;
32+
33+
namespace OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Commands.QuickPlayPause
34+
{
35+
[CommandHandler]
36+
public class QuickPlayPauseCommandHandler : CommandHandlerBase<QuickPlayPauseCommandDefinition>
37+
{
38+
public override async Task Run(Command command)
39+
{
40+
var controller = IoC.Get<IOngekiGamePlayControllerViewer>();
41+
42+
if (await controller.IsPlaying())
43+
await controller.Pause();
44+
else
45+
await controller.Play();
46+
}
47+
}
48+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Caliburn.Micro;
2+
using OngekiFumenEditor.Modules.FumenVisualEditor;
3+
using OngekiFumenEditor.Modules.FumenVisualEditor.Base;
4+
using OngekiFumenEditor.Modules.FumenVisualEditor.ViewModels;
5+
using OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.Base;
6+
using System;
7+
using System.Collections.Generic;
8+
using System.ComponentModel.Composition;
9+
using System.Linq;
10+
using System.Text;
11+
using System.Threading.Tasks;
12+
13+
namespace OngekiFumenEditor.Modules.OngekiGamePlayControllerViewer.ExtraEditorMenuItems
14+
{
15+
[Export(typeof(IFumenVisualEditorExtraMenuItemHandler))]
16+
public class PlayOrPauseMenuItem : IFumenVisualEditorExtraMenuItemHandler
17+
{
18+
public string[] RegisterMenuPath { get; } = new[] { "脚本", "AkariMindController", "播放/暂停" };
19+
20+
public async void Handle(FumenVisualEditorViewModel editor, EventArgs args)
21+
{
22+
var controller = IoC.Get<IOngekiGamePlayControllerViewer>();
23+
//if ((await controller.GetNotesManagerData()) is not NotesManagerData data)
24+
// return;
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)