This repository was archived by the owner on May 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathActHook.cs
More file actions
47 lines (38 loc) · 1.2 KB
/
ActHook.cs
File metadata and controls
47 lines (38 loc) · 1.2 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
using Advanced_Combat_Tracker;
using Ricimon.FFXIV_PraeCastrum_Timer.Util;
using System;
using System.Windows.Forms;
namespace Ricimon.FFXIV_PraeCastrum_Timer
{
public class ActHook : IActPluginV1
{
public TabPage PluginScreenSpace { get; private set; }
public Label PluginStatusText { get; private set; }
private RunManager _runManager;
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
{
try
{
PluginScreenSpace = pluginScreenSpace;
PluginStatusText = pluginStatusText;
_runManager = new RunManager(this);
pluginStatusText.Text = "Ready!";
Log.Trace("Plugin Ready!");
}
catch(Exception e)
{
Log.Error(e.ToString());
SetPluginStatusError(e.ToString());
}
}
public void DeInitPlugin()
{
_runManager.Dispose();
}
public void SetPluginStatusError(string error)
{
PluginStatusText.Text = $"Plugin errored: {error}";
}
private readonly Logger Log = Logger.GetLogger();
}
}