-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVTSComponent.cs
More file actions
56 lines (45 loc) · 1.27 KB
/
Copy pathVTSComponent.cs
File metadata and controls
56 lines (45 loc) · 1.27 KB
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
using LiveSplit.Model;
using LiveSplit.UI;
using LiveSplit.UI.Components;
using System.Windows.Forms;
using System.Xml;
namespace LiveSplit.VTS
{
class VTSComponent : LogicComponent
{
public override string ComponentName
{
get { return "VTube Studio Connection"; }
}
public VTSSettings Settings { get; set; }
public bool Disposed { get; private set; }
private TimerModel _timer;
private LiveSplitState _state;
public VTSComponent(LiveSplitState state)
{
_state = state;
_timer = new TimerModel { CurrentState = state };
VTS_Connection.GetInstance().RegisterEvents(_state);
this.Settings = new VTSSettings();
}
public override void Dispose()
{
this.Disposed = true;
VTS_Connection.GetInstance().UnregisterEvents(_state);
}
public override XmlNode GetSettings(XmlDocument document)
{
return this.Settings.GetSettings(document);
}
public override Control GetSettingsControl(LayoutMode mode)
{
return this.Settings;
}
public override void SetSettings(XmlNode settings)
{
this.Settings.SetSettings(settings);
}
public override void Update(IInvalidator invalidator, LiveSplitState state, float width, float height, LayoutMode mode) { }
//public override void RenameComparison(string oldName, string newName) { }
}
}