Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stone-Red-Code committed Aug 18, 2021
2 parents bf45db8 + 5bb62ed commit 128db89
Show file tree
Hide file tree
Showing 70 changed files with 356 additions and 99 deletions.
Binary file modified src/.vs/DesktopMagic/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified src/.vs/DesktopMagic/v16/.suo
Binary file not shown.
Binary file modified src/DesktopMagic.Installer/DesktopMagic-Installer.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion src/DesktopMagic.Installer/Installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "DesktopMagic"
#define MyAppVersion "0.0.2.0"
#define MyAppVersion "0.0.2.1"
#define MyAppPublisher "Stone_Red"
#define MyAppExeName "DesktopMagic.exe"

Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions src/DesktopMagic.Installer/bin/Debug/net5.0/Installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "DesktopMagic"
#define MyAppVersion "0"
#define MyAppVersion "0.0.2.0"
#define MyAppPublisher "Stone_Red"
#define MyAppExeName "DesktopMagic.exe"

Expand All @@ -21,7 +21,7 @@ UsedUserAreasWarning=no
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputBaseFilename=DesktopMagic
OutputBaseFilename=DesktopMagic-Installer
OutputDir=.
Compression=lzma
SolidCompression=yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "DesktopMagic"
#define MyAppVersion "0.0.2.0"
#define MyAppVersion "0.0.2.1"
#define MyAppPublisher "Stone_Red"
#define MyAppExeName "DesktopMagic.exe"

Expand Down
Binary file modified src/DesktopMagic/bin/Debug/net5.0-windows/DesktopMagic.dll
Binary file not shown.
Binary file modified src/DesktopMagic/bin/Debug/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
".NETCoreApp,Version=v5.0": {
"DesktopMagic/1.0.0": {
"dependencies": {
"DesktopMagicPluginAPI": "0.0.0.1",
"DesktopMagicPluginAPI": "0.0.0.2",
"Extended.Wpf.Toolkit": "4.1.0",
"Google.Apis.Calendar.v3": "1.51.0.2312",
"Hardcodet.NotifyIcon.Wpf": "1.1.0",
Expand Down Expand Up @@ -323,7 +323,7 @@
}
},
"System.Security.Principal.Windows/5.0.0": {},
"DesktopMagicPluginAPI/0.0.0.1": {
"DesktopMagicPluginAPI/0.0.0.2": {
"dependencies": {
"System.Drawing.Common": "5.0.2"
},
Expand Down Expand Up @@ -514,7 +514,7 @@
"path": "system.security.principal.windows/5.0.0",
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
},
"DesktopMagicPluginAPI/0.0.0.1": {
"DesktopMagicPluginAPI/0.0.0.2": {
"type": "project",
"serviceable": false,
"sha512": ""
Expand Down
Binary file modified src/DesktopMagic/bin/Release/net5.0-windows/DesktopMagic.dll
Binary file not shown.
Binary file modified src/DesktopMagic/bin/Release/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/DesktopMagic/bin/Release/net5.0-windows/ref/DesktopMagic.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion src/DesktopMagic/obj/Debug/net5.0-windows/App.g.i.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void InitializeComponent() {

#line default
#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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void InitializeComponent() {
return;
}
_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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void InitializeComponent() {
return;
}
_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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void InitializeComponent() {
return;
}
_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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
Binary file modified src/DesktopMagic/obj/Debug/net5.0-windows/DesktopMagic.dll
Binary file not shown.
Binary file modified src/DesktopMagic/obj/Debug/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void InitializeComponent() {
return;
}
_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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public void InitializeComponent() {
return;
}
_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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void InitializeComponent() {
return;
}
_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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void InitializeComponent() {
return;
}
_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"
System.Windows.Application.LoadComponent(this, resourceLocater);
Expand Down
2 changes: 1 addition & 1 deletion src/DesktopMagic/obj/DesktopMagic.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Binary file modified src/DesktopMagic/obj/Release/net5.0-windows/DesktopMagic.dll
Binary file not shown.
Binary file modified src/DesktopMagic/obj/Release/net5.0-windows/DesktopMagic.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ C:\Users\David\Programmieren\DesktopMagic\src\DesktopMagic\App.xaml
226-1942221924
CalendarWindow.xaml;CpuUsageWindow.xaml;DateWindow.xaml;InputDialog.xaml;MainWindow.xaml;MusicVisualizerWindow.xaml;Plugin\PluginWindow.xaml;Resources\StringResources.de.xaml;Resources\StringResources.en.xaml;TimeWindow.xaml;

False
True

Binary file modified src/DesktopMagic/obj/Release/net5.0-windows/ref/DesktopMagic.dll
Binary file not shown.
6 changes: 3 additions & 3 deletions src/DesktopMagic/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
}
}
},
"DesktopMagicPluginAPI/0.0.0.1": {
"DesktopMagicPluginAPI/0.0.0.2": {
"type": "project",
"framework": ".NETCoreApp,Version=v5.0",
"dependencies": {
Expand Down Expand Up @@ -1037,15 +1037,15 @@
"version.txt"
]
},
"DesktopMagicPluginAPI/0.0.0.1": {
"DesktopMagicPluginAPI/0.0.0.2": {
"type": "project",
"path": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj",
"msbuildProject": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj"
}
},
"projectFileDependencyGroups": {
"net5.0-windows7.0": [
"DesktopMagicPluginAPI >= 0.0.0.1",
"DesktopMagicPluginAPI >= 0.0.0.2",
"Extended.Wpf.Toolkit >= 4.1.0",
"Google.Apis.Calendar.v3 >= 1.51.0.2312",
"Hardcodet.NotifyIcon.Wpf >= 1.1.0",
Expand Down
5 changes: 2 additions & 3 deletions src/DesktopMagic/obj/project.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "a1+5eLMBr+UgTaqJnFhqM6HDxVBpg9WhGtBlkKBemMLsauk2EQXXOVJyWiTemrRhRU8ml3KL7wOdiARNSBFqhw==",
"dgSpecHash": "oAwITt5tvNiCprC40hyspTeg+dMo2V26fEiHPAjLaDXxPUndMQBf+r7pox7iwMCiZaTqNSfC56CPdshwHIp45w==",
"success": true,
"projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagic\\DesktopMagic.csproj",
"expectedPackageFiles": [
Expand Down Expand Up @@ -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.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.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"
"C:\\Users\\David\\.nuget\\packages\\system.security.principal.windows\\5.0.0\\system.security.principal.windows.5.0.0.nupkg.sha512"
],
"logs": [
{
Expand Down
57 changes: 15 additions & 42 deletions src/DesktopMagicPlugin.Test/PluginScript.cs
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
}
},
"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",
Expand Down
6 changes: 3 additions & 3 deletions src/DesktopMagicPlugin.Test/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
}
},
"DesktopMagicPluginAPI/0.0.0.1": {
"DesktopMagicPluginAPI/0.0.0.2": {
"type": "project",
"framework": ".NETCoreApp,Version=v5.0",
"dependencies": {
Expand Down Expand Up @@ -155,15 +155,15 @@
"version.txt"
]
},
"DesktopMagicPluginAPI/0.0.0.1": {
"DesktopMagicPluginAPI/0.0.0.2": {
"type": "project",
"path": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj",
"msbuildProject": "../DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj"
}
},
"projectFileDependencyGroups": {
"net5.0": [
"DesktopMagicPluginAPI >= 0.0.0.1",
"DesktopMagicPluginAPI >= 0.0.0.2",
"System.Drawing.Common >= 5.0.2"
]
},
Expand Down
5 changes: 2 additions & 3 deletions src/DesktopMagicPlugin.Test/obj/project.nuget.cache
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": []
}
4 changes: 3 additions & 1 deletion src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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'">
Expand Down
Loading

0 comments on commit 128db89

Please sign in to comment.