-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translations issues
- Loading branch information
Showing
11 changed files
with
211 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
194 changes: 97 additions & 97 deletions
194
src/Hymnal.XF/Resources/Languages/LanguageResources.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,74 @@ | ||
using System.Threading.Tasks; | ||
using Prism.Navigation; | ||
using NavigationParameter = Hymnal.XF.Models.Parameters.NavigationParameter; | ||
|
||
namespace Hymnal.XF.ViewModels | ||
{ | ||
public abstract class BaseViewModelParameter<TParameter> : BaseViewModel where TParameter : NavigationParameter | ||
{ | ||
private TParameter parameter; | ||
public TParameter Parameter | ||
{ | ||
get => parameter; | ||
private set => SetProperty(ref parameter, value); | ||
} | ||
|
||
protected BaseViewModelParameter(INavigationService navigationService) : base(navigationService) | ||
{ } | ||
|
||
public override void Initialize(INavigationParameters parameters) | ||
{ | ||
base.Initialize(parameters); | ||
|
||
if (resolveParam(parameters, out TParameter value)) | ||
{ | ||
Initialize(parameters, value); | ||
} | ||
} | ||
|
||
public override async Task InitializeAsync(INavigationParameters parameters) | ||
{ | ||
await base.InitializeAsync(parameters); | ||
|
||
if (resolveParam(parameters, out TParameter value)) | ||
{ | ||
await InitializeAsync(parameters, value); | ||
} | ||
} | ||
|
||
public override void OnNavigatedTo(INavigationParameters parameters) | ||
{ | ||
base.OnNavigatedTo(parameters); | ||
|
||
if (resolveParam(parameters, out TParameter value)) | ||
{ | ||
OnNavigatedTo(parameters, value); | ||
} | ||
} | ||
|
||
public virtual void Initialize(INavigationParameters parameters, TParameter parameter) | ||
{ } | ||
|
||
public virtual Task InitializeAsync(INavigationParameters parameters, TParameter parameter) | ||
{ return Task.CompletedTask; } | ||
|
||
public virtual void OnNavigatedTo(INavigationParameters parameters, TParameter parameter) | ||
{ } | ||
|
||
private bool resolveParam(INavigationParameters parameters, out TParameter value) | ||
{ | ||
if (Parameter is not null) | ||
{ | ||
value = Parameter; | ||
return true; | ||
} | ||
|
||
var returnValue = parameters.TryGetValue(NavigationParameter.Key, out value) | ||
|| parameters.TryGetValue(KnownNavigationParameters.XamlParam, out value); | ||
|
||
Parameter = value; | ||
|
||
return returnValue; | ||
} | ||
} | ||
} | ||
using Prism.Navigation; | ||
using NavigationParameter = Hymnal.XF.Models.Parameters.NavigationParameter; | ||
|
||
namespace Hymnal.XF.ViewModels | ||
{ | ||
public abstract class BaseViewModelParameter<TParameter> : BaseViewModel where TParameter : NavigationParameter | ||
{ | ||
private TParameter parameter; | ||
public TParameter Parameter | ||
{ | ||
get => parameter; | ||
private set => SetProperty(ref parameter, value); | ||
} | ||
|
||
protected BaseViewModelParameter(INavigationService navigationService) : base(navigationService) | ||
{ } | ||
|
||
public override void Initialize(INavigationParameters parameters) | ||
{ | ||
base.Initialize(parameters); | ||
|
||
if (resolveParam(parameters, out TParameter value)) | ||
{ | ||
Initialize(parameters, value); | ||
} | ||
} | ||
|
||
public override async Task InitializeAsync(INavigationParameters parameters) | ||
{ | ||
await base.InitializeAsync(parameters); | ||
|
||
if (resolveParam(parameters, out TParameter value)) | ||
{ | ||
await InitializeAsync(parameters, value); | ||
} | ||
} | ||
|
||
public override void OnNavigatedTo(INavigationParameters parameters) | ||
{ | ||
base.OnNavigatedTo(parameters); | ||
|
||
if (resolveParam(parameters, out TParameter value)) | ||
{ | ||
OnNavigatedTo(parameters, value); | ||
} | ||
} | ||
|
||
public virtual void Initialize(INavigationParameters parameters, TParameter parameter) | ||
{ } | ||
|
||
public virtual Task InitializeAsync(INavigationParameters parameters, TParameter parameter) | ||
{ return Task.CompletedTask; } | ||
|
||
public virtual void OnNavigatedTo(INavigationParameters parameters, TParameter parameter) | ||
{ } | ||
|
||
private bool resolveParam(INavigationParameters parameters, out TParameter value) | ||
{ | ||
if (Parameter is not null) | ||
{ | ||
value = Parameter; | ||
return true; | ||
} | ||
|
||
var returnValue = parameters.TryGetValue(NavigationParameter.Key, out value) | ||
|| parameters.TryGetValue(KnownNavigationParameters.XamlParam, out value); | ||
|
||
Parameter = value; | ||
|
||
return returnValue; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters