Init commit

This commit is contained in:
Jeddunk 2021-01-08 18:36:57 +01:00
commit 0c711f7da6
26 changed files with 1733 additions and 0 deletions

View file

@ -0,0 +1,29 @@
using System;
using System.Threading.Tasks;
using MvvmCross.Exceptions;
using MvvmCross.Navigation;
using MvvmCross.ViewModels;
namespace GoldbergGUI.Core.Utils
{
// ReSharper disable once ClassNeverInstantiated.Global
public class CustomMvxAppStart<TViewModel> : MvxAppStart<TViewModel> where TViewModel : IMvxViewModel
{
public CustomMvxAppStart(IMvxApplication application, IMvxNavigationService navigationService) : base(application, navigationService)
{
}
protected override async Task NavigateToFirstViewModel(object hint = null)
{
//return base.NavigateToFirstViewModel(hint);
try
{
await NavigationService.Navigate<TViewModel>().ConfigureAwait(false);
}
catch (System.Exception exception)
{
throw exception.MvxWrap("Problem navigating to ViewModel {0}", typeof(TViewModel).Name);
}
}
}
}

View file

@ -0,0 +1,7 @@
namespace GoldbergGUI.Core.Utils
{
public interface ISecrets
{
public string SteamWebApiKey();
}
}

View file

@ -0,0 +1,42 @@
using System.Collections.ObjectModel;
namespace GoldbergGUI.Core.Utils
{
public class Misc
{
public const string SpecialCharsRegex = "[^0-9a-zA-Z]+";
public const string DefaultLanguageSelection = "english";
public static readonly ObservableCollection<string> DefaultLanguages = new ObservableCollection<string>(new[]
{
"arabic",
"bulgarian",
"schinese",
"tchinese",
"czech",
"danish",
"dutch",
"english",
"finnish",
"french",
"german",
"greek",
"hungarian",
"italian",
"japanese",
"koreana",
"norwegian",
"polish",
"portuguese",
"brazilian",
"romanian",
"russian",
"spanish",
"latam",
"swedish",
"thai",
"turkish",
"ukrainian",
"vietnamese"
});
}
}