Added themes
This commit is contained in:
@@ -1,27 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DiscordBotUI_Windows.WindowsForms
|
||||
namespace DiscordBotUI_Windows.WindowsForms
|
||||
{
|
||||
public partial class MainWindow : Form
|
||||
{
|
||||
public MainWindow()
|
||||
internal MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Load += (_, _) => MainWindowLoad();
|
||||
FormClosed += async (_, _) =>
|
||||
{
|
||||
await Config.ApplicationSettings.SaveToFile();
|
||||
};
|
||||
}
|
||||
|
||||
private void MainWindowLoad()
|
||||
{
|
||||
pluginListToolStripMenuItem.Click += (_, _) => new PluginListWindow().Show();
|
||||
pluginListToolStripMenuItem.Click += (_, _) =>
|
||||
{
|
||||
var form = new PluginListWindow();
|
||||
Config.ThemeManager.SetFormTheme(Config.ThemeManager.CurrentTheme, form);
|
||||
form.Show();
|
||||
};
|
||||
themesToolStripMenuItem.Click += (_, _) => {
|
||||
themesToolStripMenuItem.DropDownItems.Clear();
|
||||
foreach(var theme in Config.ThemeManager._InstalledThemes)
|
||||
{
|
||||
themesToolStripMenuItem.DropDownItems.Add(theme.Name, null, (_, _) => Config.ThemeManager.SetFormTheme(theme, this));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user