From 0529cc199abfdca73a4ba0103eb6cb960642cd43 Mon Sep 17 00:00:00 2001 From: chao Date: Sat, 8 Jul 2023 13:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=B8=BA?= =?UTF-8?q?=205.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jvedio-WPF/Jvedio/App.xaml.cs | 16 ++++++++++------ Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs | 2 +- Jvedio-WPF/Jvedio/Properties/AssemblyInfo.cs | 4 ++-- Jvedio-WPF/Jvedio/WindowStartUp.xaml.cs | 3 ++- Jvedio-WPF/Jvedio/Windows/Window_Main.xaml | 2 +- Jvedio-WPF/Jvedio/Windows/Window_Main.xaml.cs | 8 ++++++-- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Jvedio-WPF/Jvedio/App.xaml.cs b/Jvedio-WPF/Jvedio/App.xaml.cs index 8a64c8e0..1bfb131e 100644 --- a/Jvedio-WPF/Jvedio/App.xaml.cs +++ b/Jvedio-WPF/Jvedio/App.xaml.cs @@ -4,6 +4,13 @@ using System; using System.Threading; using System.Windows; +#if DEBUG +#else +using System.Diagnostics; +using System.Windows.Threading; +using System.Threading.Tasks; +using System.Runtime.InteropServices; +#endif namespace Jvedio { @@ -38,18 +45,15 @@ protected override void OnStartup(StartupEventArgs e) #else bool createNew; ProgramStarted = new EventWaitHandle(false, EventResetMode.AutoReset, "Jvedio", out createNew); - if (!createNew) - { + if (!createNew) { //new MsgBox($"Jvedio {LangManager.GetValueByKey("Running")}").ShowDialog(); //App.Current.Shutdown(); //Environment.Exit(0); var current = Process.GetCurrentProcess(); - foreach (var process in Process.GetProcessesByName(current.ProcessName)) - { - if (process.Id != current.Id) - { + foreach (var process in Process.GetProcessesByName(current.ProcessName)) { + if (process.Id != current.Id) { IntPtr hWnd = IntPtr.Zero; hWnd = process.MainWindowHandle; diff --git a/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs b/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs index c104464e..daef5a04 100644 --- a/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs +++ b/Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs @@ -14,7 +14,7 @@ namespace Jvedio { public static class ConfigManager { - public const string RELEASE_DATE = "2023-06-05"; + public const string RELEASE_DATE = "2023-07-08"; public static bool Loaded = false; diff --git a/Jvedio-WPF/Jvedio/Properties/AssemblyInfo.cs b/Jvedio-WPF/Jvedio/Properties/AssemblyInfo.cs index 9d5ad650..5d853d94 100644 --- a/Jvedio-WPF/Jvedio/Properties/AssemblyInfo.cs +++ b/Jvedio-WPF/Jvedio/Properties/AssemblyInfo.cs @@ -48,5 +48,5 @@ // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 // 通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.3.0.0")] -[assembly: AssemblyFileVersion("5.3.0.0")] +[assembly: AssemblyVersion("5.3.1.0")] +[assembly: AssemblyFileVersion("5.3.1.0")] diff --git a/Jvedio-WPF/Jvedio/WindowStartUp.xaml.cs b/Jvedio-WPF/Jvedio/WindowStartUp.xaml.cs index 548c452d..8748a840 100644 --- a/Jvedio-WPF/Jvedio/WindowStartUp.xaml.cs +++ b/Jvedio-WPF/Jvedio/WindowStartUp.xaml.cs @@ -767,7 +767,8 @@ private void ShowAbout(object sender, RoutedEventArgs e) //about.ShowDialog(); Dialog_About about = new Dialog_About(); string local = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); - local = local.Substring(0, local.Length - ".0.0".Length); + if (local.EndsWith(".0.0")) + local = local.Substring(0, local.Length - ".0.0".Length); about.AppName = "Jvedio"; about.AppSubName = "本地视频管理软件"; about.Version = local; diff --git a/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml b/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml index c02667e6..c8be2ac8 100644 --- a/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml +++ b/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml @@ -1516,7 +1516,7 @@ FocusVisualStyle="{x:Null}" ItemContainerStyle="{StaticResource FlatTabItem}" SelectedIndex="{Binding TabSelectedIndex, FallbackValue=0}" - Style="{StaticResource FlatTabControl}"> + Style="{StaticResource HeaderHideTabControlStyle}"> diff --git a/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml.cs b/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml.cs index e02e8c8c..b925588f 100644 --- a/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml.cs +++ b/Jvedio-WPF/Jvedio/Windows/Window_Main.xaml.cs @@ -980,7 +980,7 @@ private async void CheckUpgrade() string ReleaseDate = result.ReleaseDate; if (!string.IsNullOrEmpty(remote)) { string local = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); - local = local.Substring(0, local.Length - ".0.0".Length); + //local = local.Substring(0, local.Length - ".0.0".Length); if (local.CompareTo(remote) < 0) { bool opened = (bool)new MsgBox( $"存在新版本\n版本:{remote}\n日期:{ReleaseDate}").ShowDialog(); @@ -4296,7 +4296,8 @@ private void ShowAbout(object sender, RoutedEventArgs e) { Dialog_About about = new Dialog_About(); string local = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); - local = local.Substring(0, local.Length - ".0.0".Length); + if (local.EndsWith(".0.0")) + local = local.Substring(0, local.Length - ".0.0".Length); about.AppName = "Jvedio"; about.AppSubName = "本地视频管理软件"; about.Version = local; @@ -4449,6 +4450,9 @@ private void Grid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs private void OpenServer(object sender, RoutedEventArgs e) { + MessageNotify.Info("开发中"); + return; + if (window_Server != null) window_Server.Close(); window_Server = new Window_Server();