diff --git a/LiveWallpaper/LiveWallpaper.csproj b/LiveWallpaper/LiveWallpaper.csproj
index 41ee784e..786f67b3 100644
--- a/LiveWallpaper/LiveWallpaper.csproj
+++ b/LiveWallpaper/LiveWallpaper.csproj
@@ -66,7 +66,7 @@
..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll
- ..\packages\JsonConfiger.1.0.0.42\lib\net46\JsonConfiger.WPF.dll
+ ..\packages\JsonConfiger.1.0.0.45\lib\net46\JsonConfiger.WPF.dll
..\packages\LoadingIndicators.WPF.0.0.1\lib\LoadingIndicators.WPF.dll
diff --git a/LiveWallpaper/Managers/AppManager.cs b/LiveWallpaper/Managers/AppManager.cs
index 44bcc33a..dca1859c 100644
--- a/LiveWallpaper/Managers/AppManager.cs
+++ b/LiveWallpaper/Managers/AppManager.cs
@@ -160,7 +160,7 @@ private static async Task CheckDefaultSetting()
{
General = GeneralSettting.GetDefaultGeneralSettting(),
Wallpaper = WallpaperSetting.GetDefaultWallpaperSetting(),
- Server = ServerSetting.GetDefaultServerSetting()
+ //Server = ServerSetting.GetDefaultServerSetting()
};
writeDefault = true;
}
@@ -176,11 +176,11 @@ private static async Task CheckDefaultSetting()
writeDefault = true;
tempSetting.Wallpaper = WallpaperSetting.GetDefaultWallpaperSetting();
}
- if (tempSetting.Server == null)
- {
- writeDefault = true;
- tempSetting.Server = ServerSetting.GetDefaultServerSetting();
- }
+ //if (tempSetting.Server == null)
+ //{
+ // writeDefault = true;
+ // tempSetting.Server = ServerSetting.GetDefaultServerSetting();
+ //}
if (writeDefault)
//生成默认配置
@@ -257,6 +257,8 @@ public static async Task ApplySetting(SettingObject setting)
await AutoStartupHelper.Instance.Set(setting.General.StartWithWindows);
setting.General.StartWithWindows = await AutoStartupHelper.Instance.Check();
+ WallpaperManager.VideoAspect = setting.Wallpaper.VideoAspect;
+ WallpaperManager.ApplyVideoAspect();
}
}
}
diff --git a/LiveWallpaper/Res/Languages/en.json b/LiveWallpaper/Res/Languages/en.json
index cd6107ab..5eeb2ab8 100644
--- a/LiveWallpaper/Res/Languages/en.json
+++ b/LiveWallpaper/Res/Languages/en.json
@@ -42,6 +42,7 @@
"setting_maximizedStop": "Pause",
"setting_maximizedPause": "Stop",
"setting_videoAspect": "VideoAspect",
+ "setting_videoAspect_desc": "Format 16:9 4:3 1:1, default is none",
"setting_server": "Server",
"setting_serverURL": "server url",
"setting_recordWindowSize": "Save the main window size",
diff --git a/LiveWallpaper/Res/Languages/zh.json b/LiveWallpaper/Res/Languages/zh.json
index cc365d59..a4f8931c 100644
--- a/LiveWallpaper/Res/Languages/zh.json
+++ b/LiveWallpaper/Res/Languages/zh.json
@@ -42,7 +42,8 @@
"setting_maximizedPlay": "播放",
"setting_maximizedStop": "停止",
"setting_maximizedPause": "暂停",
- "setting_videoAspect": "视频播放比例(例如 4:3 ,默认不填)",
+ "setting_videoAspect": "视频播放比例",
+ "setting_videoAspect_desc": "格式 16:9 4:3 1:1,默认不填",
"setting_server": "服务器",
"setting_serverURL": "服务器地址",
"setting_recordWindowSize": "保存主窗口大小",
diff --git a/LiveWallpaper/Res/setting.desc.json b/LiveWallpaper/Res/setting.desc.json
index 3a062ed7..a403695b 100644
--- a/LiveWallpaper/Res/setting.desc.json
+++ b/LiveWallpaper/Res/setting.desc.json
@@ -58,14 +58,16 @@
},
"VideoAspect": {
"type": "text",
- "lanKey": "setting_videoAspect"
- }
- },
- "Server": {
- "lanKey": "setting_server",
- "ServerUrl": {
- "type": "text",
- "lanKey": "setting_serverURL"
+ "lanKey": "setting_videoAspect",
+ "descLanKey": "setting_videoAspect_desc"
}
}
+ //,
+ //"Server": {
+ // "lanKey": "setting_server",
+ // "ServerUrl": {
+ // "type": "text",
+ // "lanKey": "setting_serverURL"
+ // }
+ //}
}
\ No newline at end of file
diff --git a/LiveWallpaper/Settings/SettingObject.cs b/LiveWallpaper/Settings/SettingObject.cs
index 8eb4897f..d21768a9 100644
--- a/LiveWallpaper/Settings/SettingObject.cs
+++ b/LiveWallpaper/Settings/SettingObject.cs
@@ -75,6 +75,6 @@ public class SettingObject
public WallpaperSetting Wallpaper { get; set; }
- public ServerSetting Server { get; set; }
+ //public ServerSetting Server { get; set; }
}
}
diff --git a/LiveWallpaper/ViewModels/MainViewModel.cs b/LiveWallpaper/ViewModels/MainViewModel.cs
index 52f46694..bafebd50 100644
--- a/LiveWallpaper/ViewModels/MainViewModel.cs
+++ b/LiveWallpaper/ViewModels/MainViewModel.cs
@@ -218,7 +218,8 @@ public async void OpenLocalServer()
//没有文件夹UWP会报错
Directory.CreateDirectory(wallpaperDir);
- Uri uri = new Uri($"live.wallpaper.store://?host={AppManager.Setting.Server.ServerUrl}&wallpaper={wallpaperDir}");
+ //host={AppManager.Setting.Server.ServerUrl}&
+ Uri uri = new Uri($"live.wallpaper.store://?wallpaper={wallpaperDir}");
#pragma warning disable UWP003 // UWP-only
bool success = await Windows.System.Launcher.LaunchUriAsync(uri);
diff --git a/LiveWallpaper/packages.config b/LiveWallpaper/packages.config
index e7108be7..19bfc3ac 100644
--- a/LiveWallpaper/packages.config
+++ b/LiveWallpaper/packages.config
@@ -8,7 +8,7 @@
-
+
diff --git a/LiveWallpaperEngineLib/WallpaperManager.UI.cs b/LiveWallpaperEngineLib/WallpaperManager.UI.cs
index c9102974..335f5c5a 100644
--- a/LiveWallpaperEngineLib/WallpaperManager.UI.cs
+++ b/LiveWallpaperEngineLib/WallpaperManager.UI.cs
@@ -89,6 +89,13 @@ public static void MonitorMaxiemized(bool enable)
}
}
+ public static void ApplyVideoAspect()
+ {
+ if (RenderWindow != null)
+ {
+ RenderWindow.SetAspect(VideoAspect);
+ }
+ }
public static void Show(Wallpaper wallpaper)
{
IntPtr handler = IntPtr.Zero;