2021-03-04 04:34:52 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace NoSoliciting.Interface {
|
|
|
|
|
public class PluginUi : IDisposable {
|
|
|
|
|
private Plugin Plugin { get; }
|
|
|
|
|
|
|
|
|
|
public Settings Settings { get; }
|
|
|
|
|
public Report Report { get; }
|
|
|
|
|
|
|
|
|
|
public PluginUi(Plugin plugin) {
|
|
|
|
|
this.Plugin = plugin;
|
|
|
|
|
|
|
|
|
|
this.Settings = new Settings(plugin, this);
|
|
|
|
|
this.Report = new Report(plugin);
|
|
|
|
|
|
2021-08-22 22:07:28 +00:00
|
|
|
|
this.Plugin.Interface.UiBuilder.Draw += this.Draw;
|
2021-03-04 04:34:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispose() {
|
2021-08-22 22:07:28 +00:00
|
|
|
|
this.Plugin.Interface.UiBuilder.Draw -= this.Draw;
|
2021-03-04 04:34:52 +00:00
|
|
|
|
this.Settings.Dispose();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Draw() {
|
|
|
|
|
this.Settings.Draw();
|
|
|
|
|
this.Report.Draw();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|