- Improve code structure

- Improve log output format
This commit is contained in:
Stone-Red-Code
2021-10-24 19:38:45 +02:00
parent 77a1383e7b
commit 520f145eb0
30 changed files with 216 additions and 129 deletions
@@ -28,9 +28,14 @@
- [Font](#P-DesktopMagicPluginAPI-IPluginData-Font 'DesktopMagicPluginAPI.IPluginData.Font')
- [PluginName](#P-DesktopMagicPluginAPI-IPluginData-PluginName 'DesktopMagicPluginAPI.IPluginData.PluginName')
- [PluginPath](#P-DesktopMagicPluginAPI-IPluginData-PluginPath 'DesktopMagicPluginAPI.IPluginData.PluginPath')
- [Theme](#P-DesktopMagicPluginAPI-IPluginData-Theme 'DesktopMagicPluginAPI.IPluginData.Theme')
- [WindowPosition](#P-DesktopMagicPluginAPI-IPluginData-WindowPosition 'DesktopMagicPluginAPI.IPluginData.WindowPosition')
- [WindowSize](#P-DesktopMagicPluginAPI-IPluginData-WindowSize 'DesktopMagicPluginAPI.IPluginData.WindowSize')
- [UpdateWindow()](#M-DesktopMagicPluginAPI-IPluginData-UpdateWindow 'DesktopMagicPluginAPI.IPluginData.UpdateWindow')
- [ITheme](#T-DesktopMagicPluginAPI-ITheme 'DesktopMagicPluginAPI.ITheme')
- [Font](#P-DesktopMagicPluginAPI-ITheme-Font 'DesktopMagicPluginAPI.ITheme.Font')
- [PrimaryColor](#P-DesktopMagicPluginAPI-ITheme-PrimaryColor 'DesktopMagicPluginAPI.ITheme.PrimaryColor')
- [SecondaryColor](#P-DesktopMagicPluginAPI-ITheme-SecondaryColor 'DesktopMagicPluginAPI.ITheme.SecondaryColor')
- [IntegerUpDown](#T-DesktopMagicPluginAPI-Inputs-IntegerUpDown 'DesktopMagicPluginAPI.Inputs.IntegerUpDown')
- [#ctor(min,max,value)](#M-DesktopMagicPluginAPI-Inputs-IntegerUpDown-#ctor-System-Int32,System-Int32,System-Int32- 'DesktopMagicPluginAPI.Inputs.IntegerUpDown.#ctor(System.Int32,System.Int32,System.Int32)')
- [Maximum](#P-DesktopMagicPluginAPI-Inputs-IntegerUpDown-Maximum 'DesktopMagicPluginAPI.Inputs.IntegerUpDown.Maximum')
@@ -323,14 +328,14 @@ Defines properties and methods that provide information about the main applicati
##### Summary
Gets the color of the main application.
Gets the current color of the main application.
<a name='P-DesktopMagicPluginAPI-IPluginData-Font'></a>
### Font `property`
##### Summary
Gets the font of the main application.
Gets the current font of the main application.
<a name='P-DesktopMagicPluginAPI-IPluginData-PluginName'></a>
### PluginName `property`
@@ -346,6 +351,13 @@ Gets the name of the plugin.
Gets the path of the parent directory of the plugin.
<a name='P-DesktopMagicPluginAPI-IPluginData-Theme'></a>
### Theme `property`
##### Summary
Gets the current theme setting of the main application.
<a name='P-DesktopMagicPluginAPI-IPluginData-WindowPosition'></a>
### WindowPosition `property`
@@ -371,6 +383,38 @@ Updates the plugin window.
This method has no parameters.
<a name='T-DesktopMagicPluginAPI-ITheme'></a>
## ITheme `type`
##### Namespace
DesktopMagicPluginAPI
##### Summary
The theme settings of the main application.
<a name='P-DesktopMagicPluginAPI-ITheme-Font'></a>
### Font `property`
##### Summary
Gets the font of the main application.
<a name='P-DesktopMagicPluginAPI-ITheme-PrimaryColor'></a>
### PrimaryColor `property`
##### Summary
Gets the primary color of the main application.
<a name='P-DesktopMagicPluginAPI-ITheme-SecondaryColor'></a>
### SecondaryColor `property`
##### Summary
Gets the secondary color of the main application.
<a name='T-DesktopMagicPluginAPI-Inputs-IntegerUpDown'></a>
## IntegerUpDown `type`
@@ -588,7 +632,7 @@ Occurs when the user rotates the mouse wheel while the mouse pointer is over thi
##### Summary
Occurs once when the pugin gets activated.
Occurs once when the plugin gets activated.
##### Parameters
@@ -283,12 +283,17 @@
</member>
<member name="P:DesktopMagicPluginAPI.IPluginData.Font">
<summary>
Gets the font of the main application.
Gets the current font of the main application.
</summary>
</member>
<member name="P:DesktopMagicPluginAPI.IPluginData.Color">
<summary>
Gets the color of the main application.
Gets the current color of the main application.
</summary>
</member>
<member name="P:DesktopMagicPluginAPI.IPluginData.Theme">
<summary>
Gets the current theme setting of the main application.
</summary>
</member>
<member name="P:DesktopMagicPluginAPI.IPluginData.WindowSize">
@@ -316,6 +321,26 @@
Updates the plugin window.
</summary>
</member>
<member name="T:DesktopMagicPluginAPI.ITheme">
<summary>
The theme settings of the main application.
</summary>
</member>
<member name="P:DesktopMagicPluginAPI.ITheme.PrimaryColor">
<summary>
Gets the primary color of the main application.
</summary>
</member>
<member name="P:DesktopMagicPluginAPI.ITheme.SecondaryColor">
<summary>
Gets the secondary color of the main application.
</summary>
</member>
<member name="P:DesktopMagicPluginAPI.ITheme.Font">
<summary>
Gets the font of the main application.
</summary>
</member>
<member name="T:DesktopMagicPluginAPI.Plugin">
<summary>
The plugin class.
@@ -338,7 +363,7 @@
</member>
<member name="M:DesktopMagicPluginAPI.Plugin.Start">
<summary>
Occurs once when the pugin gets activated.
Occurs once when the plugin gets activated.
</summary>
</member>
<member name="M:DesktopMagicPluginAPI.Plugin.Main">
+11 -3
View File
@@ -1,4 +1,5 @@
using System.Drawing;
using System;
using System.Drawing;
namespace DesktopMagicPluginAPI
{
@@ -8,15 +9,22 @@ namespace DesktopMagicPluginAPI
public interface IPluginData
{
/// <summary>
/// Gets the font of the main application.
/// Gets the current font of the main application.
/// </summary>
[Obsolete("Use the \"Theme\" property instead")]
string Font { get; }
/// <summary>
/// Gets the color of the main application.
/// Gets the current color of the main application.
/// </summary>
[Obsolete("Use the \"Theme\" property instead")]
Color Color { get; }
/// <summary>
/// Gets the current theme setting of the main application.
/// </summary>
ITheme Theme { get; }
/// <summary>
/// Gets the window size of the plugin window.
/// </summary>
+25
View File
@@ -0,0 +1,25 @@
using System.Drawing;
namespace DesktopMagicPluginAPI
{
/// <summary>
/// The theme settings of the main application.
/// </summary>
public interface ITheme
{
/// <summary>
/// Gets the primary color of the main application.
/// </summary>
Color PrimaryColor { get; }
/// <summary>
/// Gets the secondary color of the main application.
/// </summary>
Color SecondaryColor { get; }
/// <summary>
/// Gets the font of the main application.
/// </summary>
string Font { get; }
}
}
+1 -1
View File
@@ -43,7 +43,7 @@ namespace DesktopMagicPluginAPI
public virtual RenderQuality RenderQuality { get; set; } = RenderQuality.High;
/// <summary>
/// Occurs once when the pugin gets activated.
/// Occurs once when the plugin gets activated.
/// </summary>
public virtual void Start()
{