From e457dbfd8929eb82bb0844113c10cfd996c59750 Mon Sep 17 00:00:00 2001 From: malieskimi Date: Tue, 8 Nov 2022 12:37:58 +0100 Subject: [PATCH] Code polishing --- src/SecureElementReader.App/Program.cs | 1 - .../ViewModels/AboutDialogViewModel.cs | 1 - .../ViewModels/CertDetailsViewModel.cs | 1 - .../ViewModels/MenuViewModel.cs | 4 +- .../VerificationInfoDialogViewModel.cs | 7 +- .../ViewModels/VerifyPinDialogViewModel.cs | 1 - .../Views/CertDetailsView.axaml | 30 +++--- .../Views/Dialogs/AboutDialog.axaml | 4 +- .../Views/Dialogs/VerifyPinDialog.axaml | 8 +- .../Views/MainWindow.axaml | 56 ++++------- .../Views/Titlebars/MacosTitleBar.axaml | 6 +- .../Views/Titlebars/WindowsTitleBar.axaml | 95 +++++++++---------- 12 files changed, 93 insertions(+), 121 deletions(-) diff --git a/src/SecureElementReader.App/Program.cs b/src/SecureElementReader.App/Program.cs index ca4520e..ff7bd77 100644 --- a/src/SecureElementReader.App/Program.cs +++ b/src/SecureElementReader.App/Program.cs @@ -32,7 +32,6 @@ public static void Main(string[] args) SubscribeToDomainUnhandledEvents(); RegisterDependencies(); - //RunBackgroundTasks(); LogStart(); diff --git a/src/SecureElementReader.App/ViewModels/AboutDialogViewModel.cs b/src/SecureElementReader.App/ViewModels/AboutDialogViewModel.cs index 6f57f40..f453d54 100644 --- a/src/SecureElementReader.App/ViewModels/AboutDialogViewModel.cs +++ b/src/SecureElementReader.App/ViewModels/AboutDialogViewModel.cs @@ -8,7 +8,6 @@ namespace SecureElementReader.App.ViewModels { public class AboutDialogViewModel : DialogViewModelBase { - public string AssemblyVersion => GetAssemblyVersion(); public ICommand CloseButton { get; } diff --git a/src/SecureElementReader.App/ViewModels/CertDetailsViewModel.cs b/src/SecureElementReader.App/ViewModels/CertDetailsViewModel.cs index fd0497f..e36e1a8 100644 --- a/src/SecureElementReader.App/ViewModels/CertDetailsViewModel.cs +++ b/src/SecureElementReader.App/ViewModels/CertDetailsViewModel.cs @@ -38,7 +38,6 @@ public class CertDetailsViewModel : ViewModelBase, ICertDetailsViewModel [Reactive] public bool PkiCertInvalid { get; set; } - public CertDetailsViewModel(IDialogService dialogService) { _dialogService = dialogService; diff --git a/src/SecureElementReader.App/ViewModels/MenuViewModel.cs b/src/SecureElementReader.App/ViewModels/MenuViewModel.cs index 0942c21..fde534c 100644 --- a/src/SecureElementReader.App/ViewModels/MenuViewModel.cs +++ b/src/SecureElementReader.App/ViewModels/MenuViewModel.cs @@ -63,8 +63,6 @@ public void Translate(string targetLanguage) public void StartUpTranslate() { Translate(_configuration.Language); - } - + } } - } diff --git a/src/SecureElementReader.App/ViewModels/VerificationInfoDialogViewModel.cs b/src/SecureElementReader.App/ViewModels/VerificationInfoDialogViewModel.cs index 46fee9f..57f4c0a 100644 --- a/src/SecureElementReader.App/ViewModels/VerificationInfoDialogViewModel.cs +++ b/src/SecureElementReader.App/ViewModels/VerificationInfoDialogViewModel.cs @@ -43,8 +43,11 @@ private void ButtonClose() private void OnButtonTap() { - Process.Start(new ProcessStartInfo("https://tap.sandbox.suf.purs.gov.rs/Help/view/1048069196/Инсталирање-RCA-и-ICA-сертификата/sr-Cyrl-RS") { UseShellExecute = true }); - + Process.Start( + new ProcessStartInfo("https://tap.sandbox.suf.purs.gov.rs/Help/view/1048069196/Инсталирање-RCA-и-ICA-сертификата/sr-Cyrl-RS") + { + UseShellExecute = true + }); } } } diff --git a/src/SecureElementReader.App/ViewModels/VerifyPinDialogViewModel.cs b/src/SecureElementReader.App/ViewModels/VerifyPinDialogViewModel.cs index 6453492..d7f42d8 100644 --- a/src/SecureElementReader.App/ViewModels/VerifyPinDialogViewModel.cs +++ b/src/SecureElementReader.App/ViewModels/VerifyPinDialogViewModel.cs @@ -197,7 +197,6 @@ private void ValidateResult(VerifyPinModel result) ShowTaxMessage = true; TaxMessage = _mainWindowProvider.GetMainWindow().GetResourceObservable("PkiAppletLocked").ToString(); } - } private void ButtonClose() { diff --git a/src/SecureElementReader.App/Views/CertDetailsView.axaml b/src/SecureElementReader.App/Views/CertDetailsView.axaml index 30172ea..77410e6 100644 --- a/src/SecureElementReader.App/Views/CertDetailsView.axaml +++ b/src/SecureElementReader.App/Views/CertDetailsView.axaml @@ -69,13 +69,13 @@ - - - - - - - + + + + + + + @@ -85,18 +85,18 @@ - - - - - - - + + + + + + + -