diff --git a/App.xaml.cs b/App.xaml.cs index 9ea06a3..4a72634 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -30,7 +30,7 @@ public static string BuildConfig { get { public static Version Version => System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; public static readonly HashSet ImageExtensions = new HashSet(new[] { - ".jpg", ".jpeg", ".png", ".tiff", ".tif", ".gif", ".bmp", ".ico", ".dds", ".jxr", ".hdp", ".wdp" + ".jpg", ".jpeg", ".png", ".tiff", ".tif", ".gif", ".bmp", ".ico", ".dds", ".jxr", ".hdp", ".wdp", ".heic", "heif" }); public static readonly HashSet ZipExtensions = new HashSet(new[] { diff --git a/Helpers/SlideshowHelper.cs b/Helpers/SlideshowHelper.cs index cef0fda..a3c9c69 100644 --- a/Helpers/SlideshowHelper.cs +++ b/Helpers/SlideshowHelper.cs @@ -1,4 +1,5 @@ -using System; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; @@ -39,6 +40,17 @@ public SlideTransition Transition { } } + private TimeSpan transitionDelay = TimeSpan.Zero; + public TimeSpan TransitionDelay + { + get => transitionDelay; + set { + if (transitionDelay == value) return; + transitionDelay = value; + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TransitionDelay))); + } + } + private TimeSpan imageDuration = new TimeSpan(0, 0, 7); public TimeSpan ImageDuration { get => imageDuration; @@ -206,6 +218,9 @@ public SlideAnimConfig(SlideAnimConfig config) { private static readonly CubicEase easeIn = new CubicEase() { EasingMode = EasingMode.EaseIn }; private static readonly CubicEase easeInOut = new CubicEase() { EasingMode = EasingMode.EaseInOut }; + /// + /// Returns the time until the next instance should be started. + /// public static TimeSpan AnimateImage(DpiImage tgtImg, Size frameSize, SlideAnimConfig cfg) { //fade var animFade = new DoubleAnimationUsingKeyFrames(); @@ -240,19 +255,15 @@ public static TimeSpan AnimateImage(DpiImage tgtImg, Size frameSize, SlideAnimCo break; } - return cfg.Time_FadeOutBegin.TimeSpan; + return cfg.Time_FadeOutBegin.TimeSpan.Add(cfg.TransitionDelay); } - - /// - /// Returns the time until the next instance should be started. - /// private static void Anim_KBE(DpiImage tgtImg, Size frameSize, SlideAnimConfig cfg) { var zoomIn = ran.Next(2) == 0; var panDirPri = ran.Next(2) == 0;//primary axis pan direction var imageDur = new Duration(cfg.ImageDuration); - //zoon animation + //zoom animation var animZoom = zoomIn ? new DoubleAnimation(1d, 1.2d, imageDur) : new DoubleAnimation(1.2d, 1d, imageDur); //pan animation diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 703d6da..e817aa5 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.5.0")] -[assembly: AssemblyFileVersion("1.2.5.0")] +[assembly: AssemblyVersion("1.2.6.0")] +[assembly: AssemblyFileVersion("1.2.6.0")] diff --git a/Resources/Localization.en.xaml b/Resources/Localization.en.xaml index 2051428..d0132f5 100644 --- a/Resources/Localization.en.xaml +++ b/Resources/Localization.en.xaml @@ -123,6 +123,7 @@ Cancel Random Order Transition + Transition Delay Resolution Scale Image Duration Fade In Duration diff --git a/Resources/Localization.zh.xaml b/Resources/Localization.zh.xaml index 4a7d0af..dd10340 100644 --- a/Resources/Localization.zh.xaml +++ b/Resources/Localization.zh.xaml @@ -123,6 +123,7 @@ 取消 随机顺序 过渡效果 + 过渡效果延迟 分辨率比例 图像时长 渐入时长 diff --git a/SlideshowWindow.xaml b/SlideshowWindow.xaml index 6e3c4e1..6c82280 100644 --- a/SlideshowWindow.xaml +++ b/SlideshowWindow.xaml @@ -78,6 +78,14 @@ + + + + + + + + diff --git a/ZipImageViewer.csproj b/ZipImageViewer.csproj index c7a7d79..9c2a484 100644 --- a/ZipImageViewer.csproj +++ b/ZipImageViewer.csproj @@ -63,6 +63,14 @@ Resources\ZipImageViewer.ico + + x86 + bin\x86\Debug\ + + + x86 + bin\x86\Release\ + packages\FontAwesome5.2.0.4\lib\net40\FontAwesome5.dll diff --git a/ZipImageViewer.sln b/ZipImageViewer.sln index e212512..50b1297 100644 --- a/ZipImageViewer.sln +++ b/ZipImageViewer.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29709.97 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32929.385 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZipImageViewer", "ZipImageViewer.csproj", "{132432D4-022B-4A90-9DF8-EC3A4E94D79E}" EndProject @@ -14,18 +14,24 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Debug|Any CPU.Build.0 = Debug|Any CPU {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Debug|x64.ActiveCfg = Debug|x64 {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Debug|x64.Build.0 = Debug|x64 + {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Debug|x86.ActiveCfg = Debug|x86 + {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Debug|x86.Build.0 = Debug|x86 {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Release|Any CPU.ActiveCfg = Release|Any CPU {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Release|Any CPU.Build.0 = Release|Any CPU {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Release|x64.ActiveCfg = Release|x64 {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Release|x64.Build.0 = Release|x64 + {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Release|x86.ActiveCfg = Release|x86 + {132432D4-022B-4A90-9DF8-EC3A4E94D79E}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE