-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathVoiceAttackProxy.cs
92 lines (72 loc) · 2.34 KB
/
VoiceAttackProxy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using EliteVA.Abstractions;
using EliteVA.Audio;
using EliteVA.Commands;
using EliteVA.Logging;
using EliteVA.Options;
using EliteVA.Paths;
using EliteVA.Variables;
using EliteVA.Versions;
namespace EliteVA;
public class VoiceAttackProxy : IVoiceAttackProxy
{
private readonly dynamic _vaProxy;
public VoiceAttackProxy(dynamic vaProxy)
{
_vaProxy = vaProxy;
Variables = new VoiceAttackVariables(vaProxy);
Versions = new VoiceAttackVersions(vaProxy);
Log = new VoiceAttackLog(vaProxy);
Paths = new VoiceAttackPaths(vaProxy);
Options = new VoiceAttackOptions(vaProxy);
Speech = new VoiceAttackSpeech(vaProxy);
Command = new VoiceAttackCommand(vaProxy);
Commands = new VoiceAttackCommands(vaProxy);
}
/// <inheritdoc />
public string Context => _vaProxy.Context;
/// <inheritdoc />
public bool HasStopped => _vaProxy.Stopped;
/// <inheritdoc />
public IReadOnlyCollection<string> Profiles => _vaProxy.ProfileNames();
/// <inheritdoc />
public IntPtr Handle => _vaProxy.MainWindowHandle;
/// <inheritdoc />
public VoiceAttackVariables Variables { get; init; }
/// <inheritdoc />
public VoiceAttackVersions Versions { get; init; }
/// <inheritdoc />
public VoiceAttackLog Log { get; init; }
/// <inheritdoc />
public VoiceAttackPaths Paths { get; init; }
/// <inheritdoc />
public VoiceAttackOptions Options { get; init; }
/// <inheritdoc />
public VoiceAttackSpeech Speech { get; init; }
/// <inheritdoc />
public VoiceAttackCommands Commands { get; init; }
/// <inheritdoc />
public VoiceAttackCommand Command { get; init; }
/// <inheritdoc />
public Task<IReadOnlyCollection<string>> GeneratePhrases(string query, bool trimSpaces = false, bool lowercase = false)
{
return Task.FromResult(_vaProxy.ExtractPhrases(query, trimSpaces, lowercase));
}
/// <inheritdoc />
public Task Opacity(int percentage)
{
_vaProxy.SetOpacity(percentage);
return Task.CompletedTask;
}
/// <inheritdoc />
public Task ResetStopFlag()
{
_vaProxy.ResetStopFlag();
return Task.CompletedTask;
}
/// <inheritdoc />
public Task Close()
{
_vaProxy.Close();
return Task.CompletedTask;
}
}