From 7c4bdc8d5be081e4214c47eb60163c86fbfd9ccf Mon Sep 17 00:00:00 2001 From: seto Date: Fri, 6 Dec 2024 11:44:36 +0900 Subject: [PATCH] update --- Crystallography.Controls/Crystallography.Controls.csproj | 4 ++-- Crystallography/Crystallography.csproj | 4 ++-- PDIndexer/FormMain.cs | 8 ++++++-- PDIndexer/PDIndexer.csproj | 4 ++-- PDIndexer/Version.cs | 3 ++- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Crystallography.Controls/Crystallography.Controls.csproj b/Crystallography.Controls/Crystallography.Controls.csproj index 6435434..c3c4938 100644 --- a/Crystallography.Controls/Crystallography.Controls.csproj +++ b/Crystallography.Controls/Crystallography.Controls.csproj @@ -4,8 +4,8 @@ Library net9.0-windows10.0.26100.0 true - 2024.12.3.0229 - 2024.12.3.0229 + 2024.12.6.0240 + 2024.12.6.0240 PerMonitorV2 true true diff --git a/Crystallography/Crystallography.csproj b/Crystallography/Crystallography.csproj index 9ccea24..494bad6 100644 --- a/Crystallography/Crystallography.csproj +++ b/Crystallography/Crystallography.csproj @@ -4,8 +4,8 @@ Library net9.0-windows10.0.26100.0 true - 2024.12.3.0229 - 2024.12.3.0229 + 2024.12.6.0240 + 2024.12.6.0240 7.0 AnyCPU;x64 diff --git a/PDIndexer/FormMain.cs b/PDIndexer/FormMain.cs index 55f969a..7cc1960 100644 --- a/PDIndexer/FormMain.cs +++ b/PDIndexer/FormMain.cs @@ -482,8 +482,12 @@ public FormMain() if (!DesignMode) { var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\Crystallography\\PDIndexer"); - if (4.440 > Convert.ToDouble(key.GetValue("Version", "0"))) - ClearRegistry(); + try + { + if (4440 > Convert.ToInt32(key.GetValue("Version".Replace(".", ""), "0"))) + ClearRegistry(); + } + catch { ClearRegistry(); } Registry(Reg.Mode.Read); } diff --git a/PDIndexer/PDIndexer.csproj b/PDIndexer/PDIndexer.csproj index 4303717..4690ea6 100644 --- a/PDIndexer/PDIndexer.csproj +++ b/PDIndexer/PDIndexer.csproj @@ -4,8 +4,8 @@ WinExe net9.0-windows10.0.26100.0 true - 2024.12.3.0229 - 2024.12.3.0229 + 2024.12.6.0243 + 2024.12.6.0243 App.ico 7.0 PerMonitorV2 diff --git a/PDIndexer/Version.cs b/PDIndexer/Version.cs index 88c9261..c531281 100644 --- a/PDIndexer/Version.cs +++ b/PDIndexer/Version.cs @@ -297,7 +297,8 @@ static class Version ; static public string VersionAndDate { get => History.Remove(0, 10).Remove(20); } - static public double VersionValue { get => Convert.ToDouble(VersionAndDate[3..^12], System.Globalization.CultureInfo.InvariantCulture); } + //バージョンの値 (20241206 doubleから整数に変換) + static public int VersionValue { get => Convert.ToInt32(VersionAndDate[3..^12].Replace(".",""), System.Globalization.CultureInfo.InvariantCulture); } /// /// はじめに