Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
GiantappMan committed Jul 11, 2020
2 parents a92a373 + fc40d88 commit 50fc470
Show file tree
Hide file tree
Showing 153 changed files with 2,178 additions and 697 deletions.
8 changes: 6 additions & 2 deletions Docs/Build.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 打包命令
#dotnet pack LiveWallpaperEngine.Common -o ../LocalNuget/Packages --configuration release
```
dotnet pack LiveWallpaperEngineAPI -o ../LocalNuget/Packages --configuration release
#dotnet pack LiveWallpaperEngine -o ../LocalNuget/Packages --configuration release
```
## 生成license
```
thirdlicense.exe --project=LiveWallpaperEngineAPI/LiveWallpaperEngineAPI.csproj
```
76 changes: 17 additions & 59 deletions Giantapp.LiveWallpaperEngine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{E3554D4E-7
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiveWallpaperEngine.Samples.NetCore.Test", "LiveWallpaperEngine.Samples.NetCore.Test\LiveWallpaperEngine.Samples.NetCore.Test.csproj", "{C959B22A-239C-4264-8E54-51AFD5A5B7C4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{02F4F61B-91AC-4F16-939D-EB9B9980A60C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiveWallpaperEngineAPI", "LiveWallpaperEngineAPI\LiveWallpaperEngineAPI.csproj", "{A9CF49BA-B094-41C6-9393-A1D5CF241F52}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiveWallpaperEngineRemoteWebRender", "LiveWallpaperEngineRemoteWebRender\LiveWallpaperEngineRemoteWebRender.csproj", "{EAF94427-ED84-4CA6-8338-C61D7951A667}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiveWallpaperEngineAPI.Tests", "LiveWallpaperEngineAPI.Tests\LiveWallpaperEngineAPI.Tests.csproj", "{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Obsolete", "Obsolete", "{02F4F61B-91AC-4F16-939D-EB9B9980A60C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestEmbedWindow", "TestEmbedWindow\TestEmbedWindow.csproj", "{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mpv.NET", "..\Mpv.NET-lib\src\Mpv.NET\Mpv.NET.csproj", "{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7CA7FDEC-C032-4B4E-8289-AD0B19064A89}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiveWallpaperEngineAPI", "LiveWallpaperEngineAPI\LiveWallpaperEngineAPI.csproj", "{AAFB595F-C9DA-4F56-84B7-6874608E89CA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -50,42 +46,6 @@ Global
{C959B22A-239C-4264-8E54-51AFD5A5B7C4}.Release|x64.Build.0 = Release|Any CPU
{C959B22A-239C-4264-8E54-51AFD5A5B7C4}.Release|x86.ActiveCfg = Release|Any CPU
{C959B22A-239C-4264-8E54-51AFD5A5B7C4}.Release|x86.Build.0 = Release|Any CPU
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Debug|x64.ActiveCfg = Debug|x64
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Debug|x64.Build.0 = Debug|x64
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Debug|x86.ActiveCfg = Debug|x86
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Debug|x86.Build.0 = Debug|x86
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Release|Any CPU.Build.0 = Release|Any CPU
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Release|x64.ActiveCfg = Release|x64
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Release|x64.Build.0 = Release|x64
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Release|x86.ActiveCfg = Release|x86
{A9CF49BA-B094-41C6-9393-A1D5CF241F52}.Release|x86.Build.0 = Release|x86
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Debug|x64.ActiveCfg = Debug|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Debug|x64.Build.0 = Debug|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Debug|x86.ActiveCfg = Debug|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Debug|x86.Build.0 = Debug|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Release|Any CPU.Build.0 = Release|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Release|x64.ActiveCfg = Release|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Release|x64.Build.0 = Release|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Release|x86.ActiveCfg = Release|Any CPU
{EAF94427-ED84-4CA6-8338-C61D7951A667}.Release|x86.Build.0 = Release|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Debug|x64.ActiveCfg = Debug|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Debug|x64.Build.0 = Debug|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Debug|x86.ActiveCfg = Debug|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Debug|x86.Build.0 = Debug|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Release|Any CPU.Build.0 = Release|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Release|x64.ActiveCfg = Release|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Release|x64.Build.0 = Release|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Release|x86.ActiveCfg = Release|Any CPU
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD}.Release|x86.Build.0 = Release|Any CPU
{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -98,28 +58,26 @@ Global
{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8}.Release|x64.Build.0 = Release|Any CPU
{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8}.Release|x86.ActiveCfg = Release|Any CPU
{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8}.Release|x86.Build.0 = Release|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Debug|x64.ActiveCfg = Debug|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Debug|x64.Build.0 = Debug|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Debug|x86.ActiveCfg = Debug|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Debug|x86.Build.0 = Debug|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Release|Any CPU.Build.0 = Release|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Release|x64.ActiveCfg = Release|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Release|x64.Build.0 = Release|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Release|x86.ActiveCfg = Release|Any CPU
{BF99308B-B6F9-4C31-BC9A-E0FBE98C393C}.Release|x86.Build.0 = Release|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Debug|x64.ActiveCfg = Debug|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Debug|x64.Build.0 = Debug|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Debug|x86.ActiveCfg = Debug|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Debug|x86.Build.0 = Debug|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Release|Any CPU.Build.0 = Release|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Release|x64.ActiveCfg = Release|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Release|x64.Build.0 = Release|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Release|x86.ActiveCfg = Release|Any CPU
{AAFB595F-C9DA-4F56-84B7-6874608E89CA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C959B22A-239C-4264-8E54-51AFD5A5B7C4} = {B5707277-42B0-4BDA-8EAF-33612CA2ABF0}
{A9CF49BA-B094-41C6-9393-A1D5CF241F52} = {02F4F61B-91AC-4F16-939D-EB9B9980A60C}
{EAF94427-ED84-4CA6-8338-C61D7951A667} = {02F4F61B-91AC-4F16-939D-EB9B9980A60C}
{D1E4E670-42EC-41CF-8CCD-E27EB98E70CD} = {02F4F61B-91AC-4F16-939D-EB9B9980A60C}
{123B6CA4-82FF-4AD5-B4B6-8536C9EDF1D8} = {B5707277-42B0-4BDA-8EAF-33612CA2ABF0}
{AAFB595F-C9DA-4F56-84B7-6874608E89CA} = {7CA7FDEC-C032-4B4E-8289-AD0B19064A89}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E0CCDD11-AAC6-45FC-883B-0DBE493DA7E9}
Expand Down
15 changes: 0 additions & 15 deletions LiveWallpaperEngine.Common/LiveWallpaperEngine.Common.csproj

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

<ItemGroup>
<ProjectReference Include="..\LiveWallpaperEngineAPI\LiveWallpaperEngineAPI.csproj" />
<ProjectReference Include="..\LiveWallpaperEngineRemoteWebRender\LiveWallpaperEngineRemoteWebRender.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
28 changes: 13 additions & 15 deletions LiveWallpaperEngine.Samples.NetCore.Test/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using GiantappConfiger;
using GiantappConfiger.Models;
using Giantapp.LiveWallpaper.Engine;
using Giantapp.LiveWallpaper.Engine.Models;
using Giantapp.LiveWallpaper.Engine.Renders;
using LiveWallpaperEngineRemoteWebRender;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Forms;
using static Giantapp.LiveWallpaper.Engine.ScreenOption;

namespace LiveWallpaperEngine.Samples.NetCore.Test
{
Expand All @@ -25,10 +23,10 @@ public partial class MainWindow : Window
List<Monitor> monitorsVM = new List<Monitor>();
public MainWindow()
{
WallpaperManager.InitUIDispatcher(Dispatcher);
WallpaperManager.Initlize(Dispatcher);
InitializeComponent();
//用node+electron+http api渲染,待c#有更好的库时,再考虑c#渲染
RenderFactory.Renders.Add(typeof(ElectronWebRender), ElectronWebRender.StaticSupportTypes);
////用node+electron+http api渲染,待c#有更好的库时,再考虑c#渲染
//RenderFactory.Renders.Add(typeof(ElectronWebRender), ElectronWebRender.StaticSupportTypes);

monitors.ItemsSource = monitorsVM = Screen.AllScreens.Select(m => new Monitor()
{
Expand All @@ -39,13 +37,13 @@ public MainWindow()
var audioOption = Screen.AllScreens.Select(m => new DescriptorInfo()
{
Text = m.DeviceName,
DefaultValue = Screen.AllScreens.ToList().IndexOf(m)
DefaultValue = m.DeviceName
}).ToList();
audioOption.Insert(0, new DescriptorInfo() { Text = "禁用", DefaultValue = -1 });
audioOption.Insert(0, new DescriptorInfo() { Text = "禁用", DefaultValue = null });

var screenSetting = Screen.AllScreens.Select(m => new ScreenOption()
{
ScreenIndex = (uint)Screen.AllScreens.ToList().IndexOf(m),
Screen = m.DeviceName,
WhenAppMaximized = ActionWhenMaximized.Pause,
}).ToList();

Expand All @@ -63,11 +61,11 @@ public MainWindow()
Text="壁纸设置",
PropertyDescriptors=new DescriptorInfoDict(){
{
nameof(LiveWallpaperOptions.AudioScreenIndex),
nameof(LiveWallpaperOptions.AudioScreen),
new DescriptorInfo(){
Text="音源",
Type=PropertyType.Combobox,Options=new ObservableCollection<DescriptorInfo>(audioOption),
DefaultValue=-1,
DefaultValue=null,
}
},
{
Expand All @@ -92,7 +90,7 @@ public MainWindow()
DefaultValue=screenSetting,
PropertyDescriptors=new DescriptorInfoDict()
{
{nameof(ScreenOption.ScreenIndex),new DescriptorInfo(){ Text="屏幕",Type=PropertyType.Label } },
{nameof(ScreenOption.Screen),new DescriptorInfo(){ Text="屏幕",Type=PropertyType.Label } },
{nameof(ScreenOption.WhenAppMaximized),new DescriptorInfo(){ Text="桌面被挡住时",Options=new ObservableCollection<DescriptorInfo>(screenSettingOptions)} }
}
}
Expand Down Expand Up @@ -120,9 +118,9 @@ private void btnSelect_Click(object sender, RoutedEventArgs e)

if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
var displayIds = monitorsVM.Where(m => m.Checked).Select(m => (uint)monitorsVM.IndexOf(m)).ToArray();
var displayScreen = monitorsVM.Where(m => m.Checked).Select(m => m.DeviceName).ToArray();
btnApply_Click(null, null);
_ = WallpaperManager.ShowWallpaper(new WallpaperModel() { Path = openFileDialog.FileName }, displayIds);
_ = WallpaperManager.ShowWallpaper(new WallpaperModel() { Path = openFileDialog.FileName }, displayScreen);
//var form = new MpvPlayer.MpvForm();
//form.FormBorderStyle = FormBorderStyle.FixedSingle;

Expand All @@ -136,7 +134,7 @@ private void btnSelect_Click(object sender, RoutedEventArgs e)

private void btnStop_Click(object sender, RoutedEventArgs e)
{
var displayIds = monitorsVM.Where(m => m.Checked).Select(m => (uint)monitorsVM.IndexOf(m)).ToArray();
var displayIds = monitorsVM.Where(m => m.Checked).Select(m => m.DeviceName).ToArray();
WallpaperManager.CloseWallpaper(displayIds);
}

Expand Down
Binary file not shown.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<!-- saved from url=(0027)http://macx86.cn/regis.html -->
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="./jquery-ui.min.css" rel="stylesheet">
<link href="./bootstrap.min.css" rel="stylesheet">
<style>
body{font-family:"Helvetica Neue",Helvetica,Microsoft Yahei,Hiragino Sans GB,WenQuanYi Micro Hei,sans-serif;}canvas{position:absolute;width:100%;}html,body,canvas{height:100%;}
#config_btn{background-image: url("images/config.png"); background-size: 64px; position: absolute; right: 1px; width: 64px; height: 64px; z-index: 1; opacity: 0.0;}
#config_btn:hover{opacity: 1;}
#config_container{display: none; position: absolute; right: 10px; top: 64px; width: 300px; height: 200px; z-index: 1;}
.sliderHeaders{font-size: 18px; color: snow; margin: 10px, 0px;}
button{margin-left: 120px; margin-top: 10px; }
</style>
</head>
<body>
<div class="config">
<div id="config_btn" class="config_btn" title="settings"></div>
<div id="config_container">
<h2 class="sliderHeaders">color change rate:</h2>
<div id="rate_slider"></div>
<h2 class="sliderHeaders">light scope:</h2>
<div id="size_slider"></div>
<!--<h2 class="sliderHeaders">thickness:</h2>
<div id="thickness_slider"></div>
<h2 class="sliderHeaders">length:</h2>
<div id="length_slider"></div>-->
<div class="button_container">
<button id="apply" class="ui-button ui-corner-all ui-widget">Apply</button>
</div>
</div>
</div>
<canvas width="1920" height="1080"></canvas>
<canvas width="1920" height="1080"></canvas>
<script src="./jquery.min.js"></script>
<script src="./jquery-ui.min.js"></script>
<script src="./store.min.js"></script>
<script src="./index.js"></script>
</body>
</html>
Loading

0 comments on commit 50fc470

Please sign in to comment.