diff --git a/OpenBullet/MainWindow.xaml b/OpenBullet/MainWindow.xaml
index 6d66cc5..c5aaf99 100644
--- a/OpenBullet/MainWindow.xaml
+++ b/OpenBullet/MainWindow.xaml
@@ -88,6 +88,7 @@
+
diff --git a/OpenBullet/MainWindow.xaml.cs b/OpenBullet/MainWindow.xaml.cs
index 93348bc..02be502 100644
--- a/OpenBullet/MainWindow.xaml.cs
+++ b/OpenBullet/MainWindow.xaml.cs
@@ -19,6 +19,9 @@ using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
+using OpenBullet.Plugins;
+using System.Collections.Generic;
+using OpenBullet.Views.UserControls;
namespace OpenBullet
{
@@ -38,6 +41,7 @@ namespace OpenBullet
public HitsDB HitsDBPage { get; set; }
public Settings OBSettingsPage { get; set; }
public ToolsSection ToolsPage { get; set; }
+ public PluginsSection PluginsPage { get; set; }
public About AboutPage { get; set; }
public Rectangle Bounds { get; private set; }
@@ -59,8 +63,8 @@ namespace OpenBullet
titleLabel.Content = title;
// Make sure all folders are there or recreate them
- var folders = new string[] { "Captchas", "ChromeExtensions", "Configs", "DB", "Screenshots", "Settings", "Sounds", "Wordlists" };
- foreach (var folder in folders.Select(f => System.IO.Path.Combine(Directory.GetCurrentDirectory(), f)))
+ var folders = new string[] { "Captchas", "ChromeExtensions", "Configs", "DB", "Plugins", "Screenshots", "Settings", "Sounds", "Wordlists" };
+ foreach (var folder in folders.Select(f => Path.Combine(Directory.GetCurrentDirectory(), f)))
{
if (!Directory.Exists(folder))
Directory.CreateDirectory(folder);
@@ -140,6 +144,9 @@ namespace OpenBullet
Topmost = OB.OBSettings.General.AlwaysOnTop;
+ // Load Plugins
+ var plugins = Loader.LoadPlugins(OB.pluginsFolder);
+
// ViewModels
OB.RunnerManager = new RunnerManagerViewModel();
OB.ProxyManager = new ProxyManagerViewModel();
@@ -164,6 +171,8 @@ namespace OpenBullet
OB.Logger.LogInfo(Components.Main, "Initialized Settings");
ToolsPage = new ToolsSection();
OB.Logger.LogInfo(Components.Main, "Initialized Tools");
+ PluginsPage = new PluginsSection(plugins);
+ OB.Logger.LogInfo(Components.Main, "Initialized Plugins");
AboutPage = new About();
menuOptionRunner_MouseDown(this, null);
@@ -284,6 +293,12 @@ namespace OpenBullet
menuOptionSelected(menuOptionTools);
}
+ private void menuOptionPlugins_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ Main.Content = PluginsPage;
+ menuOptionSelected(menuOptionPlugins);
+ }
+
private void menuOptionSettings_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = OBSettingsPage;
diff --git a/OpenBullet/OB.cs b/OpenBullet/OB.cs
index 2da573d..4374134 100644
--- a/OpenBullet/OB.cs
+++ b/OpenBullet/OB.cs
@@ -47,5 +47,6 @@ namespace OpenBullet
public static readonly string licenseFile = @"Settings/License.txt";
public static readonly string logFile = @"Log.txt";
public static readonly string configFolder = @"Configs";
+ public static readonly string pluginsFolder = @"Plugins";
}
}
diff --git a/OpenBullet/OpenBullet.csproj b/OpenBullet/OpenBullet.csproj
index aee50f4..c0dd776 100644
--- a/OpenBullet/OpenBullet.csproj
+++ b/OpenBullet/OpenBullet.csproj
@@ -239,6 +239,9 @@
LoadingWindow.xaml
+
+ PluginsSection.xaml
+
ButtonContainer.xaml
@@ -412,8 +415,8 @@
True
Resources.resx
-
- Tools.xaml
+
+ ToolsSection.xaml
ListGenerator.xaml
@@ -542,6 +545,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -721,7 +728,7 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
diff --git a/OpenBullet/Plugins/Check.cs b/OpenBullet/Plugins/Check.cs
index 4a32733..2301d9d 100644
--- a/OpenBullet/Plugins/Check.cs
+++ b/OpenBullet/Plugins/Check.cs
@@ -68,12 +68,18 @@ namespace OpenBullet.Plugins
// Get the first attribute
var attribute = method.GetCustomAttribute