mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code style fixes.
This commit is contained in:
@@ -34,11 +34,12 @@ using System.IO;
|
||||
using System.Reactive;
|
||||
using System.Reflection;
|
||||
using Aaru.Gui.Views.Dialogs;
|
||||
using JetBrains.Annotations;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Aaru.Gui.ViewModels.Dialogs
|
||||
{
|
||||
public class LicenseViewModel : ViewModelBase
|
||||
public sealed class LicenseViewModel : ViewModelBase
|
||||
{
|
||||
readonly LicenseDialog _view;
|
||||
string _versionText;
|
||||
@@ -48,15 +49,20 @@ namespace Aaru.Gui.ViewModels.Dialogs
|
||||
_view = view;
|
||||
CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
|
||||
|
||||
using(Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Aaru.Gui.LICENSE"))
|
||||
using(var reader = new StreamReader(stream))
|
||||
{
|
||||
LicenseText = reader.ReadToEnd();
|
||||
}
|
||||
using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Aaru.Gui.LICENSE");
|
||||
|
||||
if(stream == null)
|
||||
return;
|
||||
|
||||
using var reader = new StreamReader(stream);
|
||||
|
||||
LicenseText = reader.ReadToEnd();
|
||||
}
|
||||
|
||||
public string Title => "Aaru's license";
|
||||
public string CloseLabel => "Close";
|
||||
[NotNull]
|
||||
public string Title => "Aaru's license";
|
||||
[NotNull]
|
||||
public string CloseLabel => "Close";
|
||||
public string LicenseText { get; }
|
||||
public ReactiveCommand<Unit, Unit> CloseCommand { get; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user