Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seto committed Dec 6, 2024
1 parent 61088cb commit 7c4bdc8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Crystallography.Controls/Crystallography.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2024.12.3.0229</AssemblyVersion>
<FileVersion>2024.12.3.0229</FileVersion>
<AssemblyVersion>2024.12.6.0240</AssemblyVersion>
<FileVersion>2024.12.6.0240</FileVersion>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
<ApplicationUseCompatibleTextRendering>true</ApplicationUseCompatibleTextRendering>
<ApplicationVisualStyles>true</ApplicationVisualStyles>
Expand Down
4 changes: 2 additions & 2 deletions Crystallography/Crystallography.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2024.12.3.0229</AssemblyVersion>
<FileVersion>2024.12.3.0229</FileVersion>
<AssemblyVersion>2024.12.6.0240</AssemblyVersion>
<FileVersion>2024.12.6.0240</FileVersion>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
Expand Down
8 changes: 6 additions & 2 deletions PDIndexer/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions PDIndexer/PDIndexer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2024.12.3.0229</AssemblyVersion>
<FileVersion>2024.12.3.0229</FileVersion>
<AssemblyVersion>2024.12.6.0243</AssemblyVersion>
<FileVersion>2024.12.6.0243</FileVersion>
<ApplicationIcon>App.ico</ApplicationIcon>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
Expand Down
3 changes: 2 additions & 1 deletion PDIndexer/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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); }

/// <summary>
/// はじめに
Expand Down

0 comments on commit 7c4bdc8

Please sign in to comment.