mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 08:56:15 +02:00
Added GraphicsExtentions class to the plugin API
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Company>Stone_Red</Company>
|
||||
<Product>Stone_Red</Product>
|
||||
<Version>0.0.0.1</Version>
|
||||
<Version>0.0.0.2</Version>
|
||||
<RepositoryUrl>https://github.com/Stone-Red-Code/DesktopMagic</RepositoryUrl>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<AssemblyVersion>0.0.0.2</AssemblyVersion>
|
||||
<PackageProjectUrl></PackageProjectUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
- [#ctor()](#M-DesktopMagicPluginAPI-Inputs-ElementAttribute-#ctor 'DesktopMagicPluginAPI.Inputs.ElementAttribute.#ctor')
|
||||
- [Name](#P-DesktopMagicPluginAPI-Inputs-ElementAttribute-Name 'DesktopMagicPluginAPI.Inputs.ElementAttribute.Name')
|
||||
- [OrderIndex](#P-DesktopMagicPluginAPI-Inputs-ElementAttribute-OrderIndex 'DesktopMagicPluginAPI.Inputs.ElementAttribute.OrderIndex')
|
||||
- [GraphicsExtentions](#T-DesktopMagicPluginAPI-Drawing-GraphicsExtentions 'DesktopMagicPluginAPI.Drawing.GraphicsExtentions')
|
||||
- [DrawStringFixedWidth(graphics,s,font,brush,x,y,width)](#M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringFixedWidth-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Single,System-Single,System-Single- 'DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringFixedWidth(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Single,System.Single,System.Single)')
|
||||
- [DrawStringFixedWidth(graphics,s,font,brush,point,width)](#M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringFixedWidth-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Drawing-PointF,System-Single- 'DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringFixedWidth(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Drawing.PointF,System.Single)')
|
||||
- [DrawStringMonospace(graphics,s,font,brush,x,y)](#M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringMonospace-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Single,System-Single- 'DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringMonospace(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Single,System.Single)')
|
||||
- [DrawStringMonospace(graphics,s,font,brush,point)](#M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringMonospace-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Drawing-PointF- 'DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringMonospace(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Drawing.PointF)')
|
||||
- [IPluginData](#T-DesktopMagicPluginAPI-IPluginData 'DesktopMagicPluginAPI.IPluginData')
|
||||
- [Color](#P-DesktopMagicPluginAPI-IPluginData-Color 'DesktopMagicPluginAPI.IPluginData.Color')
|
||||
- [Font](#P-DesktopMagicPluginAPI-IPluginData-Font 'DesktopMagicPluginAPI.IPluginData.Font')
|
||||
@@ -130,14 +135,14 @@ DesktopMagicPluginAPI.Inputs
|
||||
|
||||
##### Summary
|
||||
|
||||
The element base class
|
||||
The element base class.
|
||||
|
||||
<a name='M-DesktopMagicPluginAPI-Inputs-Element-ValueChanged'></a>
|
||||
### ValueChanged() `method`
|
||||
|
||||
##### Summary
|
||||
|
||||
Triggers the [](#E-DesktopMagicPluginAPI-Inputs-Element-OnValueChanged 'DesktopMagicPluginAPI.Inputs.Element.OnValueChanged') event
|
||||
Triggers the [](#E-DesktopMagicPluginAPI-Inputs-Element-OnValueChanged 'DesktopMagicPluginAPI.Inputs.Element.OnValueChanged') event.
|
||||
|
||||
##### Parameters
|
||||
|
||||
@@ -206,6 +211,89 @@ The name of the element.
|
||||
|
||||
The order index of the element.
|
||||
|
||||
<a name='T-DesktopMagicPluginAPI-Drawing-GraphicsExtentions'></a>
|
||||
## GraphicsExtentions `type`
|
||||
|
||||
##### Namespace
|
||||
|
||||
DesktopMagicPluginAPI.Drawing
|
||||
|
||||
##### Summary
|
||||
|
||||
Extentions for the [Graphics](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Graphics 'System.Drawing.Graphics') class.
|
||||
|
||||
<a name='M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringFixedWidth-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Single,System-Single,System-Single-'></a>
|
||||
### DrawStringFixedWidth(graphics,s,font,brush,x,y,width) `method`
|
||||
|
||||
##### Summary
|
||||
|
||||
Draws the specified text string at the specified location with the specified [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') and [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') objects.
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| graphics | [System.Drawing.Graphics](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Graphics 'System.Drawing.Graphics') | Graphics object. |
|
||||
| s | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | String to draw. |
|
||||
| font | [System.Drawing.Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') | [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') that defines the text format of the string. |
|
||||
| brush | [System.Drawing.Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') | [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') that determines the color and texture of the drawn text. |
|
||||
| x | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | The x-coordinate of the upper-left corner of the drawn text. |
|
||||
| y | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | The y-coordinate of the upper-left corner of the drawn text. |
|
||||
| width | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | The specified width. |
|
||||
|
||||
<a name='M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringFixedWidth-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Drawing-PointF,System-Single-'></a>
|
||||
### DrawStringFixedWidth(graphics,s,font,brush,point,width) `method`
|
||||
|
||||
##### Summary
|
||||
|
||||
Draws the specified text string at the specified location with the specified [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') and [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') objects.
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| graphics | [System.Drawing.Graphics](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Graphics 'System.Drawing.Graphics') | Graphics object. |
|
||||
| s | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | String to draw. |
|
||||
| font | [System.Drawing.Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') | [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') that defines the text format of the string. |
|
||||
| brush | [System.Drawing.Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') | [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') that determines the color and texture of the drawn text. |
|
||||
| point | [System.Drawing.PointF](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.PointF 'System.Drawing.PointF') | [PointF](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.PointF 'System.Drawing.PointF') structure that specifies the upper-left corner of the drawn text. |
|
||||
| width | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | The specified width. |
|
||||
|
||||
<a name='M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringMonospace-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Single,System-Single-'></a>
|
||||
### DrawStringMonospace(graphics,s,font,brush,x,y) `method`
|
||||
|
||||
##### Summary
|
||||
|
||||
Draws the specified text string at the specified location with the specified [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') and [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') objects.
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| graphics | [System.Drawing.Graphics](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Graphics 'System.Drawing.Graphics') | Graphics object. |
|
||||
| s | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | String to draw. |
|
||||
| font | [System.Drawing.Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') | [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') that defines the text format of the string. |
|
||||
| brush | [System.Drawing.Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') | [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') that determines the color and texture of the drawn text. |
|
||||
| x | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | The x-coordinate of the upper-left corner of the drawn text. |
|
||||
| y | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | The y-coordinate of the upper-left corner of the drawn text. |
|
||||
|
||||
<a name='M-DesktopMagicPluginAPI-Drawing-GraphicsExtentions-DrawStringMonospace-System-Drawing-Graphics,System-String,System-Drawing-Font,System-Drawing-Brush,System-Drawing-PointF-'></a>
|
||||
### DrawStringMonospace(graphics,s,font,brush,point) `method`
|
||||
|
||||
##### Summary
|
||||
|
||||
Draws the specified text string at the specified location with the specified [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') and [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') objects.
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| graphics | [System.Drawing.Graphics](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Graphics 'System.Drawing.Graphics') | Graphics object. |
|
||||
| s | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | String to draw. |
|
||||
| font | [System.Drawing.Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') | [Font](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Font 'System.Drawing.Font') that defines the text format of the string. |
|
||||
| brush | [System.Drawing.Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') | [Brush](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Brush 'System.Drawing.Brush') that determines the color and texture of the drawn text. |
|
||||
| point | [System.Drawing.PointF](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.PointF 'System.Drawing.PointF') | [PointF](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.PointF 'System.Drawing.PointF') structure that specifies the upper-left corner of the drawn text. |
|
||||
|
||||
<a name='T-DesktopMagicPluginAPI-IPluginData'></a>
|
||||
## IPluginData `type`
|
||||
|
||||
@@ -331,8 +419,8 @@ Initializes a new instance of the [Label](#T-DesktopMagicPluginAPI-Inputs-Label
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | |
|
||||
| bold | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | |
|
||||
| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The text associated with this [Label](#T-DesktopMagicPluginAPI-Inputs-Label 'DesktopMagicPluginAPI.Inputs.Label') |
|
||||
| bold | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | A value indicating whether the content of the [Label](#T-DesktopMagicPluginAPI-Inputs-Label 'DesktopMagicPluginAPI.Inputs.Label') is bold or not. |
|
||||
|
||||
<a name='P-DesktopMagicPluginAPI-Inputs-Label-Bold'></a>
|
||||
### Bold `property`
|
||||
@@ -346,7 +434,7 @@ Gets or set a value indicating whether the content of the [Label](#T-DesktopMagi
|
||||
|
||||
##### Summary
|
||||
|
||||
Gets or sets the text associated with this control.
|
||||
Gets or sets the text associated with this [Label](#T-DesktopMagicPluginAPI-Inputs-Label 'DesktopMagicPluginAPI.Inputs.Label').
|
||||
|
||||
<a name='T-DesktopMagicPluginAPI-Plugin'></a>
|
||||
## Plugin `type`
|
||||
@@ -483,11 +571,11 @@ Initializes a new instance of the [TextBox](#T-DesktopMagicPluginAPI-Inputs-Text
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | |
|
||||
| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The text associated with this control. |
|
||||
|
||||
<a name='P-DesktopMagicPluginAPI-Inputs-TextBox-Value'></a>
|
||||
### Value `property`
|
||||
|
||||
##### Summary
|
||||
|
||||
Gets or sets the text associated with this control.
|
||||
Gets or sets the text associated with this [TextBox](#T-DesktopMagicPluginAPI-Inputs-TextBox 'DesktopMagicPluginAPI.Inputs.TextBox').
|
||||
|
||||
@@ -4,6 +4,55 @@
|
||||
<name>DesktopMagicPluginAPI</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:DesktopMagicPluginAPI.Drawing.GraphicsExtentions">
|
||||
<summary>
|
||||
Extentions for the <see cref="T:System.Drawing.Graphics"/> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringMonospace(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Single,System.Single)">
|
||||
<summary>
|
||||
Draws the specified text string at the specified location with the specified <see cref="T:System.Drawing.Brush"/> and <see cref="T:System.Drawing.Font"/> objects.
|
||||
</summary>
|
||||
<param name="graphics">Graphics object.</param>
|
||||
<param name="s">String to draw.</param>
|
||||
<param name="font"><see cref="T:System.Drawing.Font"/> that defines the text format of the string.</param>
|
||||
<param name="brush"><see cref="T:System.Drawing.Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
<param name="x">The x-coordinate of the upper-left corner of the drawn text.</param>
|
||||
<param name="y">The y-coordinate of the upper-left corner of the drawn text.</param>
|
||||
</member>
|
||||
<member name="M:DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringMonospace(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Drawing.PointF)">
|
||||
<summary>
|
||||
Draws the specified text string at the specified location with the specified <see cref="T:System.Drawing.Brush"/> and <see cref="T:System.Drawing.Font"/> objects.
|
||||
</summary>
|
||||
<param name="graphics">Graphics object.</param>
|
||||
<param name="s">String to draw.</param>
|
||||
<param name="font"><see cref="T:System.Drawing.Font"/> that defines the text format of the string.</param>
|
||||
<param name="brush"><see cref="T:System.Drawing.Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
<param name="point"><see cref="T:System.Drawing.PointF"/> structure that specifies the upper-left corner of the drawn text.</param>
|
||||
</member>
|
||||
<member name="M:DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringFixedWidth(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Single,System.Single,System.Single)">
|
||||
<summary>
|
||||
Draws the specified text string at the specified location with the specified <see cref="T:System.Drawing.Brush"/> and <see cref="T:System.Drawing.Font"/> objects.
|
||||
</summary>
|
||||
<param name="graphics">Graphics object.</param>
|
||||
<param name="s">String to draw.</param>
|
||||
<param name="font"><see cref="T:System.Drawing.Font"/> that defines the text format of the string.</param>
|
||||
<param name="brush"><see cref="T:System.Drawing.Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
<param name="x">The x-coordinate of the upper-left corner of the drawn text.</param>
|
||||
<param name="y">The y-coordinate of the upper-left corner of the drawn text.</param>
|
||||
/// <param name="width">The specified width.</param>
|
||||
</member>
|
||||
<member name="M:DesktopMagicPluginAPI.Drawing.GraphicsExtentions.DrawStringFixedWidth(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Brush,System.Drawing.PointF,System.Single)">
|
||||
<summary>
|
||||
Draws the specified text string at the specified location with the specified <see cref="T:System.Drawing.Brush"/> and <see cref="T:System.Drawing.Font"/> objects.
|
||||
</summary>
|
||||
<param name="graphics">Graphics object.</param>
|
||||
<param name="s">String to draw.</param>
|
||||
<param name="font"><see cref="T:System.Drawing.Font"/> that defines the text format of the string.</param>
|
||||
<param name="brush"><see cref="T:System.Drawing.Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
<param name="point"><see cref="T:System.Drawing.PointF"/> structure that specifies the upper-left corner of the drawn text.</param>
|
||||
<param name="width">The specified width.</param>
|
||||
</member>
|
||||
<member name="T:DesktopMagicPluginAPI.Inputs.Button">
|
||||
<summary>
|
||||
Represents a button control.
|
||||
@@ -48,17 +97,17 @@
|
||||
</member>
|
||||
<member name="T:DesktopMagicPluginAPI.Inputs.Element">
|
||||
<summary>
|
||||
The element base class
|
||||
The element base class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="E:DesktopMagicPluginAPI.Inputs.Element.OnValueChanged">
|
||||
<summary>
|
||||
Occurs when the value has been changed
|
||||
Occurs when the value has been changed.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DesktopMagicPluginAPI.Inputs.Element.ValueChanged">
|
||||
<summary>
|
||||
Triggers the <see cref="E:DesktopMagicPluginAPI.Inputs.Element.OnValueChanged"/> event
|
||||
Triggers the <see cref="E:DesktopMagicPluginAPI.Inputs.Element.OnValueChanged"/> event.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:DesktopMagicPluginAPI.Inputs.ElementAttribute">
|
||||
@@ -128,7 +177,7 @@
|
||||
</member>
|
||||
<member name="P:DesktopMagicPluginAPI.Inputs.Label.Value">
|
||||
<summary>
|
||||
Gets or sets the text associated with this control.
|
||||
Gets or sets the text associated with this <see cref="T:DesktopMagicPluginAPI.Inputs.Label"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:DesktopMagicPluginAPI.Inputs.Label.Bold">
|
||||
@@ -140,8 +189,8 @@
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:DesktopMagicPluginAPI.Inputs.Label"/> class with the provided <paramref name="value"/>.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="bold"></param>
|
||||
<param name="value">The text associated with this <see cref="T:DesktopMagicPluginAPI.Inputs.Label"/></param>
|
||||
<param name="bold">A value indicating whether the content of the <see cref="T:DesktopMagicPluginAPI.Inputs.Label"/> is bold or not.</param>
|
||||
</member>
|
||||
<member name="T:DesktopMagicPluginAPI.Inputs.Slider">
|
||||
<summary>
|
||||
@@ -178,14 +227,14 @@
|
||||
</member>
|
||||
<member name="P:DesktopMagicPluginAPI.Inputs.TextBox.Value">
|
||||
<summary>
|
||||
Gets or sets the text associated with this control.
|
||||
Gets or sets the text associated with this <see cref="T:DesktopMagicPluginAPI.Inputs.TextBox"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DesktopMagicPluginAPI.Inputs.TextBox.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:DesktopMagicPluginAPI.Inputs.TextBox"/> class with the provided <paramref name="value"/>.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="value">The text associated with this control.</param>
|
||||
</member>
|
||||
<member name="T:DesktopMagicPluginAPI.IPluginData">
|
||||
<summary>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DesktopMagicPluginAPI.Drawing
|
||||
{
|
||||
internal class FontComparer : IEqualityComparer<Font>
|
||||
{
|
||||
public bool Equals(Font font1, Font font2)
|
||||
{
|
||||
if (font1.Name != font2.Name) return false;
|
||||
if (font1.SizeInPoints != font2.SizeInPoints) return false;
|
||||
if (font1.Style != font2.Style) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Font obj)
|
||||
{
|
||||
return obj.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
namespace DesktopMagicPluginAPI.Drawing
|
||||
{
|
||||
/// <summary>
|
||||
/// Extentions for the <see cref="Graphics"/> class.
|
||||
/// </summary>
|
||||
public static class GraphicsExtentions
|
||||
{
|
||||
private static readonly Dictionary<Font, int> fonts = new Dictionary<Font, int>(new FontComparer());
|
||||
|
||||
/// <summary>
|
||||
/// Draws the specified text string at the specified location with the specified <see cref="Brush"/> and <see cref="Font"/> objects.
|
||||
/// </summary>
|
||||
/// <param name="graphics">Graphics object.</param>
|
||||
/// <param name="s">String to draw.</param>
|
||||
/// <param name="font"><see cref="Font"/> that defines the text format of the string.</param>
|
||||
/// <param name="brush"><see cref="Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
/// <param name="x">The x-coordinate of the upper-left corner of the drawn text.</param>
|
||||
/// <param name="y">The y-coordinate of the upper-left corner of the drawn text.</param>
|
||||
public static void DrawStringMonospace(this Graphics graphics, string s, Font font, Brush brush, float x, float y)
|
||||
{
|
||||
int widest = GetWidestChar(font);
|
||||
|
||||
for (int i = 0; i < s.Length; i++)
|
||||
{
|
||||
graphics.DrawString(s[i].ToString(), font, brush, x, y);
|
||||
|
||||
x += widest;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the specified text string at the specified location with the specified <see cref="Brush"/> and <see cref="Font"/> objects.
|
||||
/// </summary>
|
||||
/// <param name="graphics">Graphics object.</param>
|
||||
/// <param name="s">String to draw.</param>
|
||||
/// <param name="font"><see cref="Font"/> that defines the text format of the string.</param>
|
||||
/// <param name="brush"><see cref="Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
/// <param name="point"><see cref="PointF"/> structure that specifies the upper-left corner of the drawn text.</param>
|
||||
public static void DrawStringMonospace(this Graphics graphics, string s, Font font, Brush brush, PointF point)
|
||||
{
|
||||
int widest = GetWidestChar(font);
|
||||
|
||||
for (int i = 0; i < s.Length; i++)
|
||||
{
|
||||
graphics.DrawString(s[i].ToString(), font, brush, point);
|
||||
|
||||
point.X += widest;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the specified text string at the specified location with the specified <see cref="Brush"/> and <see cref="Font"/> objects.
|
||||
/// </summary>
|
||||
/// <param name="graphics">Graphics object.</param>
|
||||
/// <param name="s">String to draw.</param>
|
||||
/// <param name="font"><see cref="Font"/> that defines the text format of the string.</param>
|
||||
/// <param name="brush"><see cref="Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
/// <param name="x">The x-coordinate of the upper-left corner of the drawn text.</param>
|
||||
/// <param name="y">The y-coordinate of the upper-left corner of the drawn text.</param>
|
||||
/// /// <param name="width">The specified width.</param>
|
||||
public static void DrawStringFixedWidth(this Graphics graphics, string s, Font font, Brush brush, float x, float y, float width)
|
||||
{
|
||||
for (int i = 0; i < s.Length; i++)
|
||||
{
|
||||
graphics.DrawString(s[i].ToString(), font, brush, x, y);
|
||||
|
||||
x += width;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the specified text string at the specified location with the specified <see cref="Brush"/> and <see cref="Font"/> objects.
|
||||
/// </summary>
|
||||
/// <param name="graphics">Graphics object.</param>
|
||||
/// <param name="s">String to draw.</param>
|
||||
/// <param name="font"><see cref="Font"/> that defines the text format of the string.</param>
|
||||
/// <param name="brush"><see cref="Brush"/> that determines the color and texture of the drawn text.</param>
|
||||
/// <param name="point"><see cref="PointF"/> structure that specifies the upper-left corner of the drawn text.</param>
|
||||
/// <param name="width">The specified width.</param>
|
||||
public static void DrawStringFixedWidth(this Graphics graphics, string s, Font font, Brush brush, PointF point, float width)
|
||||
{
|
||||
for (int i = 0; i < s.Length; i++)
|
||||
{
|
||||
graphics.DrawString(s[i].ToString(), font, brush, point);
|
||||
|
||||
point.X += width;
|
||||
}
|
||||
}
|
||||
|
||||
private static int GetWidestChar(Font font)
|
||||
{
|
||||
if (fonts.ContainsKey(font))
|
||||
return fonts[font];
|
||||
|
||||
Graphics graphics = Graphics.FromImage(new Bitmap(1, 1));
|
||||
float max = 0;
|
||||
char maxx = ' ';
|
||||
for (int i = 0; i <= 255; i++)
|
||||
{
|
||||
char c = (char)i;
|
||||
if (char.IsLetterOrDigit(c))
|
||||
{
|
||||
float neww = graphics.MeasureString(c.ToString(), font).Width;
|
||||
if (neww >= max)
|
||||
{
|
||||
max = neww;
|
||||
maxx = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
Console.WriteLine((int)Math.Round(max, 0));
|
||||
Console.WriteLine(maxx);
|
||||
fonts.Add(font, (int)Math.Round(max, 0));
|
||||
return (int)Math.Round(max, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"DesktopMagicPluginAPI/0.0.0.1": {
|
||||
"DesktopMagicPluginAPI/0.0.0.2": {
|
||||
"dependencies": {
|
||||
"System.Drawing.Common": "5.0.2",
|
||||
"Vsxmd": "1.4.5"
|
||||
@@ -64,7 +64,7 @@
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"DesktopMagicPluginAPI/0.0.0.1": {
|
||||
"DesktopMagicPluginAPI/0.0.0.2": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
||||
ced4ac85c0c7d0fe87e126147d10f5c33d432ea7
|
||||
c4d6aa24a0b6e4a4167479bdf6855cde0ebc6e09
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj": {
|
||||
"version": "0.0.0.1",
|
||||
"version": "0.0.0.2",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
|
||||
"projectName": "DesktopMagicPluginAPI",
|
||||
|
||||
@@ -13,11 +13,11 @@ using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Stone_Red")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.0.1")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.0.1")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.0.2")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.0.2")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Stone_Red")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("DesktopMagicPluginAPI")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("0.0.0.1")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("0.0.0.2")]
|
||||
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/Stone-Red-Code/DesktopMagic")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
d7809b9abf4d9a475e2d576fb05d2d793ced1107
|
||||
b059d9ab67e4c5d6898d4ee73187cf3094dc2fb1
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
801158c4d5ba4b4a8b0e6e57ad9e67f56077c71a
|
||||
70efc92be71c8c7b6b52cfc181cb6ec6af57875e
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -220,7 +220,7 @@
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "0.0.0.1",
|
||||
"version": "0.0.0.2",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
|
||||
"projectName": "DesktopMagicPluginAPI",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "fOE+bI0gEfedmn7JaJivSPCHQ/HXI0iR7p6Pd4Ka/IfTuazMk4M0Vi0X5UnM0R4UXVcHDy8FnjtX6Ha/hR2qrg==",
|
||||
"dgSpecHash": "ztYU0cVoZINBHAaAPNy5M0w/MqUUs2P1PxmiG36fzd1MSKmhHYayWyQa0H6apXODMcjRL5wdpujRtbMCjjfpmA==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
Reference in New Issue
Block a user