finally more structure
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
using System.Windows.Forms;
|
||||
using OwnChar.Manager;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OwnChar.App.Desktop.Api
|
||||
{
|
||||
public interface IMainWindowApi
|
||||
{
|
||||
void OpenTab(Control content);
|
||||
OwnCharManager? Manager { get; }
|
||||
void OpenTab(Control content, string title);
|
||||
void CloseTab(Control content);
|
||||
bool IsTabOpen(Control content);
|
||||
bool IsTabOpen<T>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Pilz.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -8,7 +9,7 @@ namespace OwnChar.App.Desktop.Api
|
||||
{
|
||||
public interface IOwnCharApi
|
||||
{
|
||||
public static IOwnCharApi Instance { get; } = new AppApi();
|
||||
public IMainWindowApi? MainWindow { get; internal set; }
|
||||
public abstract IMainWindowApi? MainWindow { get; }
|
||||
public abstract ISettings? Settings { get; }
|
||||
}
|
||||
}
|
||||
|
||||
14
OwnChar.App.Desktop/Api/Parameters/AppInitParams.cs
Normal file
14
OwnChar.App.Desktop/Api/Parameters/AppInitParams.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using OwnChar.Plugins;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OwnChar.App.Desktop.Api.Parameters
|
||||
{
|
||||
public class AppInitParams(IOwnCharApi api) : OwnCharPluginInitParams
|
||||
{
|
||||
public IOwnCharApi Api { get; set; } = api;
|
||||
}
|
||||
}
|
||||
14
OwnChar.App.Desktop/Api/Parameters/MainWindowParams.cs
Normal file
14
OwnChar.App.Desktop/Api/Parameters/MainWindowParams.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Pilz.Plugins.Advanced;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OwnChar.App.Desktop.Api.Parameters
|
||||
{
|
||||
public class MainWindowParams(IMainWindowApi api) : PluginFunctionParameter
|
||||
{
|
||||
public IMainWindowApi Api { get; } = api;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user