Skip to content

Commit

Permalink
界面微调
Browse files Browse the repository at this point in the history
  • Loading branch information
Asttear committed Feb 26, 2021
1 parent 1eb16ad commit 9fc986a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions UminekoLauncher/GameHash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ static class GameHash
/// </summary>
public static void LoadHashFile()
{
try
{
ResourceVersion = GetVersion();
}
catch (Exception)
{
ResourceVersion = new Version(0, 0, 0, 0);
}
ResourceVersion = GetVersion();
}

/// <summary>
Expand Down Expand Up @@ -73,14 +66,22 @@ public static Checksum GetHash(string filePath, Checksum checksum)
/// <returns>版本号。</returns>
private static Version GetVersion()
{
using (var reader = new StreamReader(HashPath))
try
{
string str;
do
using (var reader = new StreamReader(HashPath))
{
str = reader.ReadLine();
} while (!str.StartsWith("\"resver\""));
return new Version(str.Split('=')[1].Trim('\"'));
string str;
do
{
str = reader.ReadLine();
} while (!str.StartsWith("\"resver\""));
return new Version(str.Split('=')[1].Trim('\"'));
}

}
catch (Exception)
{
return new Version(0, 0, 0, 0);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion UminekoLauncher/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<local:FButton x:Name="btnAbout" Click="btnAbout_Click" Width="68" Style="{StaticResource TransparentFButton}" CornerRadius="0,15,15,0" Icon="&#xe89e;"/>
</StackPanel>
<ScrollViewer x:Name="scrollViewer" Margin="27,115,0,0" Width="320" Height="153" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto">
<TextBlock x:Name="textNews" Text="正在加载……&#x000A;为保证游玩体验,强烈建议检测完成后再开始游戏" FontSize="15" TextWrapping="Wrap" Foreground="#FFCCCCCC">
<TextBlock x:Name="textNews" Text="正在加载……&#x000A;&#x000A;为保证体验,建议等待检测完成后再开始游戏" FontSize="15" TextWrapping="Wrap" Foreground="#FFCCCCCC">
<TextBlock.Effect>
<DropShadowEffect ShadowDepth="2" BlurRadius="0" Direction="270" Opacity="0.4"/>
</TextBlock.Effect>
Expand Down

0 comments on commit 9fc986a

Please sign in to comment.