-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
68 lines (59 loc) · 1.59 KB
/
Plugin.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
// Decompiled with JetBrains decompiler
// Type: SimpleCamera.Plugin
// Assembly: SimpleCamera, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
using ReplaySeeker;
using ReplaySeeker.Plugins;
using System;
namespace SimpleCamera
{
public class Plugin : IReplaySeekerPlugin
{
private PluginForm form;
private IReplaySeekerCore core;
private IReplayManager replay;
public string Name
{
get
{
return "Deer Camera v4";
}
}
public string Description
{
get
{
return "Adds functionality to the ingame camera";
}
}
public bool Initialize(IReplaySeekerCore Core)
{
this.core = Core;
this.core.ReplayFound += new ReplayEventHandler(this.Core_ReplayFound);
this.core.ReplayNotFound += new ReplayEventHandler(this.core_ReplayNotFound);
this.core.AppClose += new EventHandler(this.core_AppClose);
this.form = new PluginForm();
this.form.Owner = Core.AppForm;
return true;
}
private void Core_ReplayFound(IReplayManager replay)
{
this.replay = replay;
this.form.SetReplay(replay);
}
private void core_ReplayNotFound(IReplayManager replay)
{
this.replay = (IReplayManager) null;
this.form.SetReplay((IReplayManager) null);
}
private void core_AppClose(object sender, EventArgs e)
{
this.form.StopUpdate();
this.form = (PluginForm) null;
}
public void OnClick()
{
this.form.StartUpdate();
this.form.Show();
}
}
}