code cleanup

This commit is contained in:
2024-06-11 06:59:17 +02:00
parent 07cacbfbda
commit ac3cfc270c
21 changed files with 317 additions and 414 deletions

View File

@@ -1,15 +1,14 @@
using OwnChar.Manager;
using System.Windows.Forms;
namespace OwnChar.App.Desktop.Api
namespace OwnChar.App.Desktop.Api;
public interface IMainWindowApi
{
public interface IMainWindowApi
{
Form Window { get; }
OwnCharManager? Manager { get; }
void OpenTab(Control content, string title);
void CloseTab(Control content);
bool IsTabOpen(Control content);
bool IsTabOpen<T>();
}
Form Window { get; }
OwnCharManager? Manager { get; }
void OpenTab(Control content, string title);
void CloseTab(Control content);
bool IsTabOpen(Control content);
bool IsTabOpen<T>();
}

View File

@@ -1,8 +1,7 @@
namespace OwnChar.App.Desktop.Api
namespace OwnChar.App.Desktop.Api;
public interface IMainWindowTab
{
public interface IMainWindowTab
{
string Name { get; }
IMainWindowApi MaindWindow { get; internal set; }
}
string Name { get; }
IMainWindowApi MaindWindow { get; internal set; }
}

View File

@@ -1,15 +1,9 @@
using Pilz.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OwnChar.App.Desktop.Api
namespace OwnChar.App.Desktop.Api;
public interface IOwnCharApi
{
public interface IOwnCharApi
{
public abstract IMainWindowApi? MainWindow { get; }
public abstract ISettings? Settings { get; }
}
public abstract IMainWindowApi? MainWindow { get; }
public abstract ISettings? Settings { get; }
}

View File

@@ -1,14 +1,8 @@
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
namespace OwnChar.App.Desktop.Api.Parameters;
public class AppInitParams(IOwnCharApi api) : OwnCharPluginInitParams
{
public class AppInitParams(IOwnCharApi api) : OwnCharPluginInitParams
{
public IOwnCharApi Api { get; set; } = api;
}
public IOwnCharApi Api { get; set; } = api;
}

View File

@@ -1,14 +1,8 @@
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
namespace OwnChar.App.Desktop.Api.Parameters;
public class MainWindowParams(IMainWindowApi api) : PluginFunctionParameter
{
public class MainWindowParams(IMainWindowApi api) : PluginFunctionParameter
{
public IMainWindowApi Api { get; } = api;
}
public IMainWindowApi Api { get; } = api;
}