From 5e1f819e7b57dc84c39d3de3c8c7340f6e64078b Mon Sep 17 00:00:00 2001 From: Steve Williams Date: Thu, 30 May 2024 20:24:52 +0100 Subject: [PATCH] Release 4.18.2. --- 4x/Move Mouse/Classes/Settings.cs | 15 ++++++++ 4x/Move Mouse/Move Mouse.csproj | 47 ++++++++++++++---------- 4x/Move Mouse/Properties/AssemblyInfo.cs | 4 +- 4x/Move Mouse/Views/MouseWindow.xaml.cs | 24 ++++++++++++ 4x/Move Mouse/Views/SettingsWindow.xaml | 19 +++++++++- 4x/Move Mouse/packages.config | 15 +++++--- Update_4x.xml | 4 +- 7 files changed, 98 insertions(+), 30 deletions(-) diff --git a/4x/Move Mouse/Classes/Settings.cs b/4x/Move Mouse/Classes/Settings.cs index 6ab7e59..5d10976 100644 --- a/4x/Move Mouse/Classes/Settings.cs +++ b/4x/Move Mouse/Classes/Settings.cs @@ -52,6 +52,7 @@ public class Settings : INotifyPropertyChanged private LogEventLevel? _logLevel; private bool? _showSystemTrayNotifications; //private bool? _reactivatePreviousWindow; + private bool? _showTaskbarStatus; public int LowerInterval { @@ -535,6 +536,20 @@ public bool ShowSystemTrayNotifications // } //} + public bool ShowTaskbarStatus + { + get + { + if (_showTaskbarStatus == null) _showTaskbarStatus = true; + return _showTaskbarStatus.Value; + } + set + { + _showTaskbarStatus = value; + OnPropertyChanged(); + } + } + [XmlArrayItem(Type = typeof(ActionBase)), XmlArrayItem(Type = typeof(MoveMouseCursorAction)), XmlArrayItem(Type = typeof(ClickMouseAction)), diff --git a/4x/Move Mouse/Move Mouse.csproj b/4x/Move Mouse/Move Mouse.csproj index c94bb60..e8df6ef 100644 --- a/4x/Move Mouse/Move Mouse.csproj +++ b/4x/Move Mouse/Move Mouse.csproj @@ -79,19 +79,25 @@ ..\packages\Hardcodet.NotifyIcon.Wpf.1.1.0\lib\net472\Hardcodet.NotifyIcon.Wpf.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + ..\packages\Microsoft.Expression.Drawing.3.0.0\lib\net45\Microsoft.Expression.Drawing.dll - - ..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.1\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.1\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + + ..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.1\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll - - ..\packages\Quartz.3.7.0\lib\net472\Quartz.dll + + ..\packages\Quartz.3.9.0\lib\net472\Quartz.dll - ..\packages\Serilog.3.0.1\lib\net471\Serilog.dll + ..\packages\Serilog.3.1.1\lib\net471\Serilog.dll ..\packages\Serilog.Sinks.File.5.0.0\lib\net45\Serilog.Sinks.File.dll @@ -103,8 +109,8 @@ - - ..\packages\System.Diagnostics.DiagnosticSource.7.0.2\lib\net462\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll ..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll @@ -211,6 +217,9 @@ True True + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + @@ -233,20 +242,20 @@ - - ..\packages\Extended.Wpf.Toolkit.4.5.1\lib\net40\Xceed.Wpf.AvalonDock.dll + + ..\packages\Extended.Wpf.Toolkit.4.6.0\lib\net40\Xceed.Wpf.AvalonDock.dll - - ..\packages\Extended.Wpf.Toolkit.4.5.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll + + ..\packages\Extended.Wpf.Toolkit.4.6.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll - - ..\packages\Extended.Wpf.Toolkit.4.5.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll + + ..\packages\Extended.Wpf.Toolkit.4.6.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll - - ..\packages\Extended.Wpf.Toolkit.4.5.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll + + ..\packages\Extended.Wpf.Toolkit.4.6.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll - - ..\packages\Extended.Wpf.Toolkit.4.5.1\lib\net40\Xceed.Wpf.Toolkit.dll + + ..\packages\Extended.Wpf.Toolkit.4.6.0\lib\net40\Xceed.Wpf.Toolkit.dll @@ -607,9 +616,9 @@ - + - + \ No newline at end of file diff --git a/4x/Move Mouse/Properties/AssemblyInfo.cs b/4x/Move Mouse/Properties/AssemblyInfo.cs index 4817cc9..ba66ed2 100644 --- a/4x/Move Mouse/Properties/AssemblyInfo.cs +++ b/4x/Move Mouse/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("4.18.1.0")] -[assembly: AssemblyFileVersion("4.18.1.0")] +[assembly: AssemblyVersion("4.18.2.0")] +[assembly: AssemblyFileVersion("4.18.2.0")] diff --git a/4x/Move Mouse/Views/MouseWindow.xaml.cs b/4x/Move Mouse/Views/MouseWindow.xaml.cs index 70d5b3e..128fbe2 100644 --- a/4x/Move Mouse/Views/MouseWindow.xaml.cs +++ b/4x/Move Mouse/Views/MouseWindow.xaml.cs @@ -165,6 +165,30 @@ private void _vm_MouseStateChanged(object sender, MouseWindowViewModel.MouseStat try { + try + { + if (_vm.SettingsVm.Settings.ShowTaskbarStatus) + { + Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate + { + if (TaskbarItemInfo != null) + { + TaskbarItemInfo.ProgressState = + state.Equals(MouseWindowViewModel.MouseState.Running) ? TaskbarItemProgressState.Normal : + state.Equals(MouseWindowViewModel.MouseState.Executing) ? TaskbarItemProgressState.Error : + state.Equals(MouseWindowViewModel.MouseState.Paused) ? TaskbarItemProgressState.Paused : + state.Equals(MouseWindowViewModel.MouseState.Sleeping) ? TaskbarItemProgressState.Paused : + state.Equals(MouseWindowViewModel.MouseState.OnBattery) ? TaskbarItemProgressState.Paused : + TaskbarItemProgressState.None; + } + })); + } + } + catch (Exception ex) + { + StaticCode.Logger?.Here().Error(ex.Message); + } + //Debug.WriteLine($"state = {state}"); var duration = _vm.ExecutionTime.Subtract(DateTime.Now); //Debug.WriteLine($"duration = {duration}"); diff --git a/4x/Move Mouse/Views/SettingsWindow.xaml b/4x/Move Mouse/Views/SettingsWindow.xaml index 537e74c..b0cea5f 100644 --- a/4x/Move Mouse/Views/SettingsWindow.xaml +++ b/4x/Move Mouse/Views/SettingsWindow.xaml @@ -12,7 +12,7 @@ xmlns:classes="clr-namespace:ellabi.Classes" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" mc:Ignorable="d" - Title="Move Mouse Settings" Height="412" Width="688" Icon="/Resources/Mouse.ico" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="None" MouseDown="SettingsWindow_OnMouseDown" ShowActivated="True" Loaded="SettingsWindow_OnLoaded"> + Title="Move Mouse Settings" Height="442" Width="688" Icon="/Resources/Mouse.ico" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="None" MouseDown="SettingsWindow_OnMouseDown" ShowActivated="True" Loaded="SettingsWindow_OnLoaded"> @@ -1914,6 +1914,23 @@ + + + + + + +