43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using OwnChar.App.Desktop.Api;
|
|
using Pilz.Plugins.Advanced;
|
|
using Pilz.Plugins.Advanced.UI.Telerik;
|
|
using System;
|
|
using System.Windows.Forms;
|
|
using Telerik.WinControls.UI;
|
|
|
|
namespace OwnChar.App.Desktop.UI.Windows
|
|
{
|
|
public partial class MainWindow : RadTabbedForm
|
|
{
|
|
public MainWindowApi Api { get; }
|
|
|
|
public MainWindow()
|
|
{
|
|
Api = new(this);
|
|
InitializeComponent();
|
|
PluginFeatureController.Instance.Features.Get(FeatureCodes.MainTab).InsertItemsTo(radMenuItem2.Items, customClickHandler: MainTabItem_Clicked);
|
|
}
|
|
|
|
public class MainWindowApi(MainWindow mainWindow) : IMainWindowApi
|
|
{
|
|
public MainWindow MainWindow { get; } = mainWindow;
|
|
|
|
public void CloseTab(Control content)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public void OpenTab(Control content)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
|
|
private void MainTabItem_Clicked(object? sender, EventArgs e)
|
|
{
|
|
//if (sender is RadMenuItem item && item.Tag is PluginModule module)
|
|
//...Add() ... module.CreateUI(), "Titel", null);
|
|
}
|
|
}
|
|
}
|