-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
356 additions
and
99 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic.Installer/bin/Debug/net5.0/DesktopMagic.Installer.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic.Installer/bin/Debug/net5.0/DesktopMagic.Installer.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+112 Bytes
(100%)
src/DesktopMagic/bin/Debug/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(120%)
src/DesktopMagic/bin/Debug/net5.0-windows/DesktopMagicPluginAPI.dll
Binary file not shown.
Binary file modified
BIN
+1.16 KB
(110%)
src/DesktopMagic/bin/Debug/net5.0-windows/DesktopMagicPluginAPI.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic/bin/Release/net5.0-windows/DesktopMagic.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic/bin/Release/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(130%)
src/DesktopMagic/bin/Release/net5.0-windows/DesktopMagicPluginAPI.dll
Binary file not shown.
Binary file modified
BIN
+936 Bytes
(110%)
src/DesktopMagic/bin/Release/net5.0-windows/DesktopMagicPluginAPI.pdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic/bin/Release/net5.0-windows/ref/DesktopMagic.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+112 Bytes
(100%)
src/DesktopMagic/obj/Debug/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic/obj/Release/net5.0-windows/DesktopMagic.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic/obj/Release/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagic/obj/Release/net5.0-windows/ref/DesktopMagic.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,39 @@ | ||
using DesktopMagicPluginAPI; | ||
using DesktopMagicPluginAPI.Inputs; | ||
using System; | ||
using System.Diagnostics; | ||
using DesktopMagicPluginAPI.Drawing; | ||
using System.Drawing; | ||
|
||
namespace DesktopMagicPlugin.Test | ||
{ | ||
public class KEK : Plugin | ||
public class InputExamplePlugin : Plugin | ||
{ | ||
[Element] | ||
private Label heading = new Label("Heading", true); | ||
public override int UpdateInterval { get; set; } = 0; | ||
|
||
[Element] | ||
private Label label = new Label(""); | ||
[Element("Text:")] //Mark the property as element with the specified description | ||
private TextBox textBox = new TextBox("abc"); //Create a text box with the specified default value. | ||
|
||
[Element("Slider:")] | ||
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; | ||
button.OnClick += Button_OnClick; | ||
} | ||
|
||
private void Button_OnClick() | ||
public InputExamplePlugin() | ||
{ | ||
Debug.WriteLine("Button pressed"); | ||
Application.UpdateWindow(); | ||
textBox.OnValueChanged += TextBox_OnValueChanged; //Add an event handler to the "OnValueChanged" event. | ||
} | ||
|
||
private void TextBox_OnValueChanged() | ||
{ | ||
Debug.WriteLine("TextBox value changed:" + textBox.Value); | ||
} | ||
|
||
private void Slider_OnValueChanged() | ||
{ | ||
Debug.WriteLine("Slider value changed:" + slider.Value); | ||
Application.UpdateWindow(); //Update the pugin window. (Calls the "Main" method.) | ||
} | ||
|
||
public override Bitmap Main() | ||
{ | ||
string str = $"{textBox.Value}: {slider.Value}"; | ||
|
||
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; | ||
slider.Value++; | ||
using (Graphics g = Graphics.FromImage(bmp)) | ||
{ | ||
g.Clear(Application.Color); //Set the background color to the color specified in the Desktop Magic application. | ||
|
||
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 bmp; //Return the image. | ||
} | ||
} | ||
} |
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagicPlugin.Test/bin/Debug/net5.0/DesktopMagicPlugin.Test.dll
Binary file not shown.
Binary file modified
BIN
+16 Bytes
(100%)
src/DesktopMagicPlugin.Test/bin/Debug/net5.0/DesktopMagicPlugin.Test.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(120%)
src/DesktopMagicPlugin.Test/bin/Debug/net5.0/DesktopMagicPluginAPI.dll
Binary file not shown.
Binary file modified
BIN
+1.16 KB
(110%)
src/DesktopMagicPlugin.Test/bin/Debug/net5.0/DesktopMagicPluginAPI.pdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/DesktopMagicPlugin.Test/obj/Debug/net5.0/DesktopMagicPlugin.Test.dll
Binary file not shown.
Binary file modified
BIN
+16 Bytes
(100%)
src/DesktopMagicPlugin.Test/obj/Debug/net5.0/DesktopMagicPlugin.Test.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
{ | ||
"version": 2, | ||
"dgSpecHash": "+xB+9SHPeT0+QftPe6l55Rd22BgcySMxqOdjBpYZMdQEARbh774pGeWD1Vpkd9GsKCAyEH6oVwzTMYgtwMBThw==", | ||
"dgSpecHash": "usS3nGTjaiSEtOK/4WWNEhZD9yiQj08VI2xuGPW8arBZ4RHrSFj79oQZY282ELI+/1tPykIzPUVypcHmbmdW6Q==", | ||
"success": true, | ||
"projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPlugin.Test\\DesktopMagicPlugin.Test.csproj", | ||
"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.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\\desktopmagicpluginapi\\0.0.0.1\\desktopmagicpluginapi.0.0.0.1.nupkg.sha512" | ||
"C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512" | ||
], | ||
"logs": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.