52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using ModpackUpdater.Apps.Manager.Api.Model;
|
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
|
using Pilz.Plugins.Advanced;
|
|
using Pilz.Plugins.Advanced.UI.Telerik;
|
|
using Telerik.WinControls.UI;
|
|
|
|
namespace ModpackUpdater.Apps.Manager;
|
|
|
|
public partial class Form1 : RadForm, IMainApi
|
|
{
|
|
public IWorkspace? Workspace { get; set; }
|
|
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
|
|
PluginFeatureController.Instance.Functions.Get(FeatureTypes.Workspace).InsertItemsTo(radMenuItem_OpenNewWorkspace.Items, customClickHandler: RadMenuItem_OpenNewWorkspace_Click);
|
|
PluginFeatureController.Instance.Functions.Get(FeatureTypes.Tools).InsertItemsTo(radMenuItem_OpenNewWorkspace.Items, customClickHandler: RadMenuItem_ToolsItem_Click);
|
|
}
|
|
|
|
private void LoadRecentWorkspaces()
|
|
{
|
|
// ...
|
|
}
|
|
|
|
private void LoadWorkspace()
|
|
{
|
|
// ...
|
|
}
|
|
|
|
private void LoadActionSet()
|
|
{
|
|
// ...
|
|
}
|
|
|
|
private void RadMenuItem_OpenNewWorkspace_Click(object? sender, EventArgs e)
|
|
{
|
|
// ...
|
|
}
|
|
|
|
private void RadMenuItem_OpenRecentWorkspace_Click(object? sender, EventArgs e)
|
|
{
|
|
// ...
|
|
}
|
|
|
|
private void RadMenuItem_ToolsItem_Click(object? sender, EventArgs e)
|
|
{
|
|
if (sender is RadMenuItem item && item.Tag is PluginFunction func)
|
|
func.Execute(new MainApiParameters(this));
|
|
}
|
|
}
|