5 Commits
72 changed files with 496 additions and 139 deletions
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "DesktopMagic" #define MyAppName "DesktopMagic"
#define MyAppVersion "0.0.2.0" #define MyAppVersion "0.0.2.1"
#define MyAppPublisher "Stone_Red" #define MyAppPublisher "Stone_Red"
#define MyAppExeName "DesktopMagic.exe" #define MyAppExeName "DesktopMagic.exe"
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "DesktopMagic" #define MyAppName "DesktopMagic"
#define MyAppVersion "0" #define MyAppVersion "0.0.2.0"
#define MyAppPublisher "Stone_Red" #define MyAppPublisher "Stone_Red"
#define MyAppExeName "DesktopMagic.exe" #define MyAppExeName "DesktopMagic.exe"
@@ -21,7 +21,7 @@ UsedUserAreasWarning=no
; Remove the following line to run in administrative install mode (install for all users.) ; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog PrivilegesRequiredOverridesAllowed=dialog
OutputBaseFilename=DesktopMagic OutputBaseFilename=DesktopMagic-Installer
OutputDir=. OutputDir=.
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "DesktopMagic" #define MyAppName "DesktopMagic"
#define MyAppVersion "0.0.2.0" #define MyAppVersion "0.0.2.1"
#define MyAppPublisher "Stone_Red" #define MyAppPublisher "Stone_Red"
#define MyAppExeName "DesktopMagic.exe" #define MyAppExeName "DesktopMagic.exe"
@@ -10,3 +10,4 @@ C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release
C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release\net5.0\DesktopMagic.Installer.dll C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release\net5.0\DesktopMagic.Installer.dll
C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release\net5.0\ref\DesktopMagic.Installer.dll C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release\net5.0\ref\DesktopMagic.Installer.dll
C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release\net5.0\DesktopMagic.Installer.pdb C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release\net5.0\DesktopMagic.Installer.pdb
C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic.Installer\obj\Release\net5.0\DesktopMagic.Installer.csproj.AssemblyReference.cache
+3 -1
View File
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup /> <PropertyGroup>
<_LastSelectedProfileId>C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<ApplicationDefinition Update="App.xaml"> <ApplicationDefinition Update="App.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
+54 -39
View File
@@ -61,58 +61,73 @@ namespace DesktopMagic
public MainWindow() public MainWindow()
{ {
logFilePath = applicationDataPath + "\\Log.txt"; try
Logger = new Logger(LogTarget.File, logFilePath, "{<dateTime>:HH:mm:ss} | {<level>,-7} | {<source>,-15} | {<lineNumber>,-4} | {<memberName>,10} | {<message>}"); {
key = Registry.CurrentUser.CreateSubKey(@"Software\" + AppName); logFilePath = applicationDataPath + "\\Log.txt";
Logger = new Logger(LogTarget.File, logFilePath, "{<dateTime>:HH:mm:ss} | {<level>,-7} | {<source>,-15} | {<lineNumber>,-4} | {<memberName>,10} | {<message>}");
key = Registry.CurrentUser.CreateSubKey(@"Software\" + AppName);
Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/DesktopMagic;component/icon.ico")).Stream; Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/DesktopMagic;component/icon.ico")).Stream;
notifyIcon.Click += TaskbarIcon_TrayLeftClick; notifyIcon.Click += TaskbarIcon_TrayLeftClick;
notifyIcon.Visible = true; notifyIcon.Visible = true;
notifyIcon.Text = AppName; notifyIcon.Text = AppName;
notifyIcon.Icon = new System.Drawing.Icon(iconStream); notifyIcon.Icon = new System.Drawing.Icon(iconStream);
InitializeComponent(); InitializeComponent();
SetLanguageDictionary(); SetLanguageDictionary();
this.Title = AppName; this.Title = AppName;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
} }
#region load #region load
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
Logger.ClearLogFile(); try
Logger.Log("Create ApplicationData Folder", "Main");
if (!Directory.Exists(applicationDataPath))
{ {
_ = Directory.CreateDirectory(applicationDataPath); Logger.ClearLogFile();
}
Logger.Log("Create Plugins Folder", "Main"); if (!Directory.Exists(applicationDataPath))
if (!Directory.Exists(applicationDataPath + "\\Plugins")) {
_ = Directory.CreateDirectory(applicationDataPath);
}
Logger.Log("Created ApplicationData Folder", "Main");
if (!Directory.Exists(applicationDataPath + "\\Plugins"))
{
_ = Directory.CreateDirectory(applicationDataPath + "\\Plugins");
}
Logger.Log("Created Plugins Folder", "Main");
if (!File.Exists(applicationDataPath + "\\layouts.save"))
{
File.WriteAllText(applicationDataPath + "\\layouts.save", ";" + (string)FindResource("default"));
}
Logger.Log("Created layouts.save file", "Main");
_ = optionsComboBox.Items.Add(new Tuple<string, int>((string)FindResource("musicVisualizer"), 0));
//Write To Log File and Load Elements
Logger.Log("Loading Plugin names", "Main");
LoadPlugins();
Logger.Log("Loading Layout names", "Main");
LoadLayoutNames();
Logger.Log("Loading Layout", "Main");
LoadLayout();
loaded = true;
Logger.Log("Window Loaded", "Main");
}
catch (Exception ex)
{ {
_ = Directory.CreateDirectory(applicationDataPath + "\\Plugins"); MessageBox.Show(ex.ToString());
} }
Logger.Log("Create layouts.save file", "Main");
if (!File.Exists(applicationDataPath + "\\layouts.save"))
{
File.WriteAllText(applicationDataPath + "\\layouts.save", ";" + (string)FindResource("default"));
}
_ = optionsComboBox.Items.Add(new Tuple<string, int>((string)FindResource("musicVisualizer"), 0));
//Write To Log File and Load Elements
Logger.Log("Loading Plugin names", "Main");
LoadPlugins();
Logger.Log("Loading Layout names", "Main");
LoadLayoutNames();
Logger.Log("Loading Layout", "Main");
LoadLayout();
loaded = true;
Logger.Log("Window Loaded", "Main");
} }
private void LoadPlugins() private void LoadPlugins()
@@ -8,7 +8,7 @@
".NETCoreApp,Version=v5.0": { ".NETCoreApp,Version=v5.0": {
"DesktopMagic/1.0.0": { "DesktopMagic/1.0.0": {
"dependencies": { "dependencies": {
"DesktopMagicPluginAPI": "0.0.0.1", "DesktopMagicPluginAPI": "0.0.0.2",
"Extended.Wpf.Toolkit": "4.1.0", "Extended.Wpf.Toolkit": "4.1.0",
"Google.Apis.Calendar.v3": "1.51.0.2312", "Google.Apis.Calendar.v3": "1.51.0.2312",
"Hardcodet.NotifyIcon.Wpf": "1.1.0", "Hardcodet.NotifyIcon.Wpf": "1.1.0",
@@ -323,7 +323,7 @@
} }
}, },
"System.Security.Principal.Windows/5.0.0": {}, "System.Security.Principal.Windows/5.0.0": {},
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"dependencies": { "dependencies": {
"System.Drawing.Common": "5.0.2" "System.Drawing.Common": "5.0.2"
}, },
@@ -514,7 +514,7 @@
"path": "system.security.principal.windows/5.0.0", "path": "system.security.principal.windows/5.0.0",
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512" "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
}, },
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
@@ -62,7 +62,7 @@ namespace DesktopMagic {
#line default #line default
#line hidden #line hidden
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/app.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/app.xaml", System.UriKind.Relative);
#line 1 "..\..\..\App.xaml" #line 1 "..\..\..\App.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/calendarwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/calendarwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\CalendarWindow.xaml" #line 1 "..\..\..\CalendarWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/cpuusagewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/cpuusagewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\CpuUsageWindow.xaml" #line 1 "..\..\..\CpuUsageWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/datewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/datewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\DateWindow.xaml" #line 1 "..\..\..\DateWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -86,7 +86,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/inputdialog.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/inputdialog.xaml", System.UriKind.Relative);
#line 1 "..\..\..\InputDialog.xaml" #line 1 "..\..\..\InputDialog.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -288,7 +288,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/mainwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/mainwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\MainWindow.xaml" #line 1 "..\..\..\MainWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -93,7 +93,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/musicvisualizerwindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/musicvisualizerwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\MusicVisualizerWindow.xaml" #line 1 "..\..\..\MusicVisualizerWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -85,7 +85,7 @@ namespace DesktopMagic {
return; return;
} }
_contentLoaded = true; _contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/DesktopMagic;V1.0.0.0;component/timewindow.xaml", System.UriKind.Relative); System.Uri resourceLocater = new System.Uri("/DesktopMagic;component/timewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\TimeWindow.xaml" #line 1 "..\..\..\TimeWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); System.Windows.Application.LoadComponent(this, resourceLocater);
@@ -5,7 +5,7 @@
}, },
"projects": { "projects": {
"C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj": { "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj": {
"version": "0.0.0.1", "version": "0.0.0.2",
"restore": { "restore": {
"projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj", "projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
"projectName": "DesktopMagicPluginAPI", "projectName": "DesktopMagicPluginAPI",
+3 -3
View File
@@ -389,7 +389,7 @@
} }
} }
}, },
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"type": "project", "type": "project",
"framework": ".NETCoreApp,Version=v5.0", "framework": ".NETCoreApp,Version=v5.0",
"dependencies": { "dependencies": {
@@ -1037,7 +1037,7 @@
"version.txt" "version.txt"
] ]
}, },
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"type": "project", "type": "project",
"path": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj", "path": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj",
"msbuildProject": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj" "msbuildProject": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj"
@@ -1045,7 +1045,7 @@
}, },
"projectFileDependencyGroups": { "projectFileDependencyGroups": {
"net5.0-windows7.0": [ "net5.0-windows7.0": [
"DesktopMagicPluginAPI >= 0.0.0.1", "DesktopMagicPluginAPI >= 0.0.0.2",
"Extended.Wpf.Toolkit >= 4.1.0", "Extended.Wpf.Toolkit >= 4.1.0",
"Google.Apis.Calendar.v3 >= 1.51.0.2312", "Google.Apis.Calendar.v3 >= 1.51.0.2312",
"Hardcodet.NotifyIcon.Wpf >= 1.1.0", "Hardcodet.NotifyIcon.Wpf >= 1.1.0",
+2 -3
View File
@@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "a1+5eLMBr+UgTaqJnFhqM6HDxVBpg9WhGtBlkKBemMLsauk2EQXXOVJyWiTemrRhRU8ml3KL7wOdiARNSBFqhw==", "dgSpecHash": "oAwITt5tvNiCprC40hyspTeg+dMo2V26fEiHPAjLaDXxPUndMQBf+r7pox7iwMCiZaTqNSfC56CPdshwHIp45w==",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagic\\DesktopMagic.csproj", "projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagic\\DesktopMagic.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
@@ -28,8 +28,7 @@
"C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\system.management\\5.0.0\\system.management.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\system.management\\5.0.0\\system.management.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\system.security.accesscontrol\\5.0.0\\system.security.accesscontrol.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\system.security.accesscontrol\\5.0.0\\system.security.accesscontrol.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\system.security.principal.windows\\5.0.0\\system.security.principal.windows.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\system.security.principal.windows\\5.0.0\\system.security.principal.windows.5.0.0.nupkg.sha512"
"C:\\Users\\David\\.nuget\\packages\\desktopmagicpluginapi\\0.0.0.1\\desktopmagicpluginapi.0.0.0.1.nupkg.sha512"
], ],
"logs": [ "logs": [
{ {
+15 -42
View File
@@ -1,66 +1,39 @@
using DesktopMagicPluginAPI; using DesktopMagicPluginAPI;
using DesktopMagicPluginAPI.Inputs; using DesktopMagicPluginAPI.Inputs;
using System; using DesktopMagicPluginAPI.Drawing;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
namespace DesktopMagicPlugin.Test namespace DesktopMagicPlugin.Test
{ {
public class KEK : Plugin public class InputExamplePlugin : Plugin
{ {
[Element] public override int UpdateInterval { get; set; } = 0;
private Label heading = new Label("Heading", true);
[Element] [Element("Text:")] //Mark the property as element with the specified description
private Label label = new Label(""); private TextBox textBox = new TextBox("abc"); //Create a text box with the specified default value.
[Element("Slider:")] public InputExamplePlugin()
private Slider slider = new Slider(1, 23, 4);
[Element("Text:")]
private TextBox textBox = new TextBox("abc");
[Element]
private Button button = new Button("Press me!");
public override int UpdateInterval { get; set; }
public KEK()
{ {
slider.OnValueChanged += Slider_OnValueChanged; textBox.OnValueChanged += TextBox_OnValueChanged; //Add an event handler to the "OnValueChanged" event.
textBox.OnValueChanged += TextBox_OnValueChanged;
button.OnClick += Button_OnClick;
}
private void Button_OnClick()
{
Debug.WriteLine("Button pressed");
Application.UpdateWindow();
} }
private void TextBox_OnValueChanged() private void TextBox_OnValueChanged()
{ {
Debug.WriteLine("TextBox value changed:" + textBox.Value); Application.UpdateWindow(); //Update the pugin window. (Calls the "Main" method.)
}
private void Slider_OnValueChanged()
{
Debug.WriteLine("Slider value changed:" + slider.Value);
} }
public override Bitmap Main() public override Bitmap Main()
{ {
string str = $"{textBox.Value}: {slider.Value}";
Bitmap bmp = new Bitmap(1000, 1000); Bitmap bmp = new Bitmap(1000, 1000);
using Graphics g = Graphics.FromImage(bmp);
g.Clear(Application.Color);
g.DrawString(str, new Font(Application.Font, 100), Brushes.Black, new PointF(0, 0));
label.Value = str; using (Graphics g = Graphics.FromImage(bmp))
slider.Value++; {
g.Clear(Application.Color); //Set the background color to the color specified in the Desktop Magic application.
return bmp; g.DrawStringFixedWidth(textBox.Value, new Font(Application.Font, 100), Brushes.Black, new PointF(0, 0), 120); //Draw the value of the text box to the image.
}
return bmp; //Return the image.
} }
} }
} }
@@ -74,7 +74,7 @@
} }
}, },
"C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj": { "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj": {
"version": "0.0.0.1", "version": "0.0.0.2",
"restore": { "restore": {
"projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj", "projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
"projectName": "DesktopMagicPluginAPI", "projectName": "DesktopMagicPluginAPI",
@@ -51,7 +51,7 @@
} }
} }
}, },
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"type": "project", "type": "project",
"framework": ".NETCoreApp,Version=v5.0", "framework": ".NETCoreApp,Version=v5.0",
"dependencies": { "dependencies": {
@@ -155,7 +155,7 @@
"version.txt" "version.txt"
] ]
}, },
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"type": "project", "type": "project",
"path": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj", "path": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj",
"msbuildProject": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj" "msbuildProject": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj"
@@ -163,7 +163,7 @@
}, },
"projectFileDependencyGroups": { "projectFileDependencyGroups": {
"net5.0": [ "net5.0": [
"DesktopMagicPluginAPI >= 0.0.0.1", "DesktopMagicPluginAPI >= 0.0.0.2",
"System.Drawing.Common >= 5.0.2" "System.Drawing.Common >= 5.0.2"
] ]
}, },
@@ -1,13 +1,12 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "+xB+9SHPeT0+QftPe6l55Rd22BgcySMxqOdjBpYZMdQEARbh774pGeWD1Vpkd9GsKCAyEH6oVwzTMYgtwMBThw==", "dgSpecHash": "usS3nGTjaiSEtOK/4WWNEhZD9yiQj08VI2xuGPW8arBZ4RHrSFj79oQZY282ELI+/1tPykIzPUVypcHmbmdW6Q==",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPlugin.Test\\DesktopMagicPlugin.Test.csproj", "projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPlugin.Test\\DesktopMagicPlugin.Test.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.win32.systemevents\\5.0.0\\microsoft.win32.systemevents.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\microsoft.win32.systemevents\\5.0.0\\microsoft.win32.systemevents.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512"
"C:\\Users\\David\\.nuget\\packages\\desktopmagicpluginapi\\0.0.0.1\\desktopmagicpluginapi.0.0.0.1.nupkg.sha512"
], ],
"logs": [] "logs": []
} }
@@ -4,10 +4,12 @@
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Company>Stone_Red</Company> <Company>Stone_Red</Company>
<Product>Stone_Red</Product> <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> <RepositoryUrl>https://github.com/Stone-Red-Code/DesktopMagic</RepositoryUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>0.0.0.2</AssemblyVersion>
<PackageProjectUrl></PackageProjectUrl>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -18,6 +18,11 @@
- [#ctor()](#M-DesktopMagicPluginAPI-Inputs-ElementAttribute-#ctor 'DesktopMagicPluginAPI.Inputs.ElementAttribute.#ctor') - [#ctor()](#M-DesktopMagicPluginAPI-Inputs-ElementAttribute-#ctor 'DesktopMagicPluginAPI.Inputs.ElementAttribute.#ctor')
- [Name](#P-DesktopMagicPluginAPI-Inputs-ElementAttribute-Name 'DesktopMagicPluginAPI.Inputs.ElementAttribute.Name') - [Name](#P-DesktopMagicPluginAPI-Inputs-ElementAttribute-Name 'DesktopMagicPluginAPI.Inputs.ElementAttribute.Name')
- [OrderIndex](#P-DesktopMagicPluginAPI-Inputs-ElementAttribute-OrderIndex 'DesktopMagicPluginAPI.Inputs.ElementAttribute.OrderIndex') - [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') - [IPluginData](#T-DesktopMagicPluginAPI-IPluginData 'DesktopMagicPluginAPI.IPluginData')
- [Color](#P-DesktopMagicPluginAPI-IPluginData-Color 'DesktopMagicPluginAPI.IPluginData.Color') - [Color](#P-DesktopMagicPluginAPI-IPluginData-Color 'DesktopMagicPluginAPI.IPluginData.Color')
- [Font](#P-DesktopMagicPluginAPI-IPluginData-Font 'DesktopMagicPluginAPI.IPluginData.Font') - [Font](#P-DesktopMagicPluginAPI-IPluginData-Font 'DesktopMagicPluginAPI.IPluginData.Font')
@@ -130,14 +135,14 @@ DesktopMagicPluginAPI.Inputs
##### Summary ##### Summary
The element base class The element base class.
<a name='M-DesktopMagicPluginAPI-Inputs-Element-ValueChanged'></a> <a name='M-DesktopMagicPluginAPI-Inputs-Element-ValueChanged'></a>
### ValueChanged() `method` ### ValueChanged() `method`
##### Summary ##### 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 ##### Parameters
@@ -206,6 +211,89 @@ The name of the element.
The order index 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> <a name='T-DesktopMagicPluginAPI-IPluginData'></a>
## IPluginData `type` ## IPluginData `type`
@@ -331,8 +419,8 @@ Initializes a new instance of the [Label](#T-DesktopMagicPluginAPI-Inputs-Label
| Name | Type | Description | | 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 [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') | | | 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> <a name='P-DesktopMagicPluginAPI-Inputs-Label-Bold'></a>
### Bold `property` ### Bold `property`
@@ -346,7 +434,7 @@ Gets or set a value indicating whether the content of the [Label](#T-DesktopMagi
##### Summary ##### 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> <a name='T-DesktopMagicPluginAPI-Plugin'></a>
## Plugin `type` ## Plugin `type`
@@ -483,11 +571,11 @@ Initializes a new instance of the [TextBox](#T-DesktopMagicPluginAPI-Inputs-Text
| Name | Type | Description | | 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> <a name='P-DesktopMagicPluginAPI-Inputs-TextBox-Value'></a>
### Value `property` ### Value `property`
##### Summary ##### 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> <name>DesktopMagicPluginAPI</name>
</assembly> </assembly>
<members> <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"> <member name="T:DesktopMagicPluginAPI.Inputs.Button">
<summary> <summary>
Represents a button control. Represents a button control.
@@ -48,17 +97,17 @@
</member> </member>
<member name="T:DesktopMagicPluginAPI.Inputs.Element"> <member name="T:DesktopMagicPluginAPI.Inputs.Element">
<summary> <summary>
The element base class The element base class.
</summary> </summary>
</member> </member>
<member name="E:DesktopMagicPluginAPI.Inputs.Element.OnValueChanged"> <member name="E:DesktopMagicPluginAPI.Inputs.Element.OnValueChanged">
<summary> <summary>
Occurs when the value has been changed Occurs when the value has been changed.
</summary> </summary>
</member> </member>
<member name="M:DesktopMagicPluginAPI.Inputs.Element.ValueChanged"> <member name="M:DesktopMagicPluginAPI.Inputs.Element.ValueChanged">
<summary> <summary>
Triggers the <see cref="E:DesktopMagicPluginAPI.Inputs.Element.OnValueChanged"/> event Triggers the <see cref="E:DesktopMagicPluginAPI.Inputs.Element.OnValueChanged"/> event.
</summary> </summary>
</member> </member>
<member name="T:DesktopMagicPluginAPI.Inputs.ElementAttribute"> <member name="T:DesktopMagicPluginAPI.Inputs.ElementAttribute">
@@ -128,7 +177,7 @@
</member> </member>
<member name="P:DesktopMagicPluginAPI.Inputs.Label.Value"> <member name="P:DesktopMagicPluginAPI.Inputs.Label.Value">
<summary> <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> </summary>
</member> </member>
<member name="P:DesktopMagicPluginAPI.Inputs.Label.Bold"> <member name="P:DesktopMagicPluginAPI.Inputs.Label.Bold">
@@ -140,8 +189,8 @@
<summary> <summary>
Initializes a new instance of the <see cref="T:DesktopMagicPluginAPI.Inputs.Label"/> class with the provided <paramref name="value"/>. Initializes a new instance of the <see cref="T:DesktopMagicPluginAPI.Inputs.Label"/> class with the provided <paramref name="value"/>.
</summary> </summary>
<param name="value"></param> <param name="value">The text associated with this <see cref="T:DesktopMagicPluginAPI.Inputs.Label"/></param>
<param name="bold"></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>
<member name="T:DesktopMagicPluginAPI.Inputs.Slider"> <member name="T:DesktopMagicPluginAPI.Inputs.Slider">
<summary> <summary>
@@ -178,14 +227,14 @@
</member> </member>
<member name="P:DesktopMagicPluginAPI.Inputs.TextBox.Value"> <member name="P:DesktopMagicPluginAPI.Inputs.TextBox.Value">
<summary> <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> </summary>
</member> </member>
<member name="M:DesktopMagicPluginAPI.Inputs.TextBox.#ctor(System.String)"> <member name="M:DesktopMagicPluginAPI.Inputs.TextBox.#ctor(System.String)">
<summary> <summary>
Initializes a new instance of the <see cref="T:DesktopMagicPluginAPI.Inputs.TextBox"/> class with the provided <paramref name="value"/>. Initializes a new instance of the <see cref="T:DesktopMagicPluginAPI.Inputs.TextBox"/> class with the provided <paramref name="value"/>.
</summary> </summary>
<param name="value"></param> <param name="value">The text associated with this control.</param>
</member> </member>
<member name="T:DesktopMagicPluginAPI.IPluginData"> <member name="T:DesktopMagicPluginAPI.IPluginData">
<summary> <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);
}
}
}
@@ -6,7 +6,7 @@
"compilationOptions": {}, "compilationOptions": {},
"targets": { "targets": {
".NETCoreApp,Version=v5.0": { ".NETCoreApp,Version=v5.0": {
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"dependencies": { "dependencies": {
"System.Drawing.Common": "5.0.2", "System.Drawing.Common": "5.0.2",
"Vsxmd": "1.4.5" "Vsxmd": "1.4.5"
@@ -64,7 +64,7 @@
} }
}, },
"libraries": { "libraries": {
"DesktopMagicPluginAPI/0.0.0.1": { "DesktopMagicPluginAPI/0.0.0.2": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
@@ -1 +1 @@
ced4ac85c0c7d0fe87e126147d10f5c33d432ea7 c4d6aa24a0b6e4a4167479bdf6855cde0ebc6e09
@@ -5,7 +5,7 @@
}, },
"projects": { "projects": {
"C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj": { "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj": {
"version": "0.0.0.1", "version": "0.0.0.2",
"restore": { "restore": {
"projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj", "projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
"projectName": "DesktopMagicPluginAPI", "projectName": "DesktopMagicPluginAPI",
@@ -66,6 +66,20 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.WindowsDesktop.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
}
],
"frameworkReferences": { "frameworkReferences": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {
"privateAssets": "all" "privateAssets": "all"
@@ -73,6 +87,11 @@
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json"
} }
},
"runtimes": {
"win-x86": {
"#import": []
}
} }
} }
} }
@@ -13,11 +13,11 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Stone_Red")] [assembly: System.Reflection.AssemblyCompanyAttribute("Stone_Red")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.0.1")] [assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.0.2")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.0.1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.0.2")]
[assembly: System.Reflection.AssemblyProductAttribute("Stone_Red")] [assembly: System.Reflection.AssemblyProductAttribute("Stone_Red")]
[assembly: System.Reflection.AssemblyTitleAttribute("DesktopMagicPluginAPI")] [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")] [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/Stone-Red-Code/DesktopMagic")]
// Von der MSBuild WriteCodeFragment-Klasse generiert. // Von der MSBuild WriteCodeFragment-Klasse generiert.
@@ -1 +1 @@
d7809b9abf4d9a475e2d576fb05d2d793ced1107 b059d9ab67e4c5d6898d4ee73187cf3094dc2fb1
@@ -1 +1 @@
801158c4d5ba4b4a8b0e6e57ad9e67f56077c71a 70efc92be71c8c7b6b52cfc181cb6ec6af57875e
@@ -57,6 +57,47 @@
"build/Vsxmd.targets": {} "build/Vsxmd.targets": {}
} }
} }
},
"net5.0/win-x86": {
"Microsoft.NETCore.Platforms/5.0.0": {
"type": "package",
"compile": {
"lib/netstandard1.0/_._": {}
},
"runtime": {
"lib/netstandard1.0/_._": {}
}
},
"Microsoft.Win32.SystemEvents/5.0.0": {
"type": "package",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0"
},
"compile": {
"ref/netstandard2.0/_._": {}
},
"runtime": {
"runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll": {}
}
},
"System.Drawing.Common/5.0.2": {
"type": "package",
"dependencies": {
"Microsoft.Win32.SystemEvents": "5.0.0"
},
"compile": {
"ref/netcoreapp3.0/System.Drawing.Common.dll": {}
},
"runtime": {
"runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll": {}
}
},
"Vsxmd/1.4.5": {
"type": "package",
"build": {
"build/Vsxmd.targets": {}
}
}
} }
}, },
"libraries": { "libraries": {
@@ -179,7 +220,7 @@
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
}, },
"project": { "project": {
"version": "0.0.0.1", "version": "0.0.0.2",
"restore": { "restore": {
"projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj", "projectUniqueName": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
"projectName": "DesktopMagicPluginAPI", "projectName": "DesktopMagicPluginAPI",
@@ -240,6 +281,20 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.WindowsDesktop.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
}
],
"frameworkReferences": { "frameworkReferences": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {
"privateAssets": "all" "privateAssets": "all"
@@ -247,6 +302,11 @@
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json"
} }
},
"runtimes": {
"win-x86": {
"#import": []
}
} }
} }
} }
@@ -1,13 +1,16 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "DePY+NmPPolbFZEQfF/BclhlaHW5e9A0c0KFBniYdpUMi2mrXUjkQw5rGqYNJTenSasOdPdRGhzycT+XwTkE9w==", "dgSpecHash": "ztYU0cVoZINBHAaAPNy5M0w/MqUUs2P1PxmiG36fzd1MSKmhHYayWyQa0H6apXODMcjRL5wdpujRtbMCjjfpmA==",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj", "projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.win32.systemevents\\5.0.0\\microsoft.win32.systemevents.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\microsoft.win32.systemevents\\5.0.0\\microsoft.win32.systemevents.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\vsxmd\\1.4.5\\vsxmd.1.4.5.nupkg.sha512" "C:\\Users\\David\\.nuget\\packages\\vsxmd\\1.4.5\\vsxmd.1.4.5.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.app.runtime.win-x86\\5.0.9\\microsoft.netcore.app.runtime.win-x86.5.0.9.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.windowsdesktop.app.runtime.win-x86\\5.0.9\\microsoft.windowsdesktop.app.runtime.win-x86.5.0.9.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.aspnetcore.app.runtime.win-x86\\5.0.9\\microsoft.aspnetcore.app.runtime.win-x86.5.0.9.nupkg.sha512"
], ],
"logs": [] "logs": []
} }