move AboutInfo struct to another file

This commit is contained in:
Xpl0itR 2019-11-25 14:37:13 +00:00 committed by unknown
parent 535ec44f84
commit 36a09f343a
No known key found for this signature in database
GPG key ID: 91798184109676AD
2 changed files with 12 additions and 10 deletions

9
Ryujinx/Ui/AboutInfo.cs Normal file
View file

@ -0,0 +1,9 @@
namespace Ryujinx.UI
{
public struct AboutInfo
{
public string InstallVersion;
public string InstallCommit;
public string InstallBranch;
}
}

View file

@ -12,14 +12,7 @@ namespace Ryujinx.UI
{
public class AboutWindow : Window
{
private struct Info
{
public string InstallVersion;
public string InstallCommit;
public string InstallBranch;
}
private static Info Information { get; set; }
private static AboutInfo AboutInformation { get; set; }
#pragma warning disable CS0649
#pragma warning disable IDE0044
@ -52,10 +45,10 @@ namespace Ryujinx.UI
using (Stream stream = File.OpenRead(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "RyuFS", "Installer", "Config", "Config.json")))
{
Information = JsonSerializer.Deserialize<Info>(stream, resolver);
AboutInformation = JsonSerializer.Deserialize<AboutInfo>(stream, resolver);
}
_versionText.Text = $"Version {Information.InstallVersion} - {Information.InstallBranch} ({Information.InstallCommit})";
_versionText.Text = $"Version {AboutInformation.InstallVersion} - {AboutInformation.InstallBranch} ({AboutInformation.InstallCommit})";
}
catch
{