Skip to content

Instantly share code, notes, and snippets.

Avatar

Bogusław Błoński filipoff2

  • Poland
View GitHub Profile
View gist:a19e049cf20b43f92262dd686c154b0a
// not clean but it works!!
public AuthorizationService(
IPhotoClient photoClient,
IClientConfiguration configuration,
IMvxNavigationService navigationService,
UserInfo userInfo,
)
{
_photoClient = photoClient;
_configuration = configuration;
View gist:7b3a18df42fe7c65100b5dbc7946d807
//clean but don't work
public AuthorizationService(
IPhotoClient photoClient,
IClientConfiguration configuration,
IMvxNavigationService navigationService,
UserInfo userInfo,
IFingerprint fingerprint, // bad boy
)
View gist:954acc151a5136eb80014873ac4c16ca
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rainbows="clr-namespace:Xamarin.Forms.DebugRainbows;assembly=Xamarin.Forms.DebugRainbows"
x:Class="StyledApp.App">
<Application.Resources>
<ResourceDictionary>
<Style TargetType="ContentPage" ApplyToDerivedTypes="True">
<Setter Property="rainbows:DebugRainbow.ShowColors" Value="True" />
<Setter Property="rainbows:DebugRainbow.ShowGrid" Value="True" />
View Formatter.cs
void Submit()
{
// USGLY SAMPLE LOGIC = No cultureInfo
LabelText = Title + " " + EntryText + "";
if (UglyCurtureTextForSample == "UK")
{
LabelText = Title + " £" + EntryText ;
}
View SetupUglyFormatter.cs
public static MainPageViewModel MainPageViewModeDE
{
get { return new MainPageViewModel(null) { Title = "Deutsch", ButtonText = "Rechnungen".ToUpper() + "" }; }
}
public static MainPageViewModel MainPageViewModePL
{
get { return new MainPageViewModel(null) { UglyCurtureTextForSample= "PL", Title = "Polski", ButtonText = "Faktury " + demoSum + "PLN" }; }
}
@filipoff2
filipoff2 / UGLY_DUMMY_DATA.CS
Last active Nov 15, 2019
UGLY DUMMY DATA = no culture
View UGLY_DUMMY_DATA.CS
/// UGLY DUMMY DATA = no culture
const double demoSum = 99.99;
public static MainPageViewModel MainPageViewModeDE
{
get { return new MainPageViewModel(null) { Title = "Deutsch", ButtonText = "Rechnungen".ToUpper() + "" }; }
}
public static MainPageViewModel MainPageViewModePL
{
View DemoLocator.cs
public static class DesignDataLoacator
{
public static MainPageViewModel MainPageViewModeDE
{
get { return new MainPageViewModel(null) { Title = "Deutsch", ButtonText = "Rechnungen" }; }
}
public static MainPageViewModel MainPageViewModePL
{
get { return new MainPageViewModel(null) { Title = "Polski", ButtonText = "Faktury" }; }