some background code for manager workspaces
This commit is contained in:
@@ -1,11 +1,41 @@
|
||||
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
|
||||
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 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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user