1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 15:06:06 +00:00

Ajustements background + greetings tipeurs

This commit is contained in:
Yan Maniez 2019-04-28 22:16:00 +02:00
parent 6d110c08bc
commit 4f9a08b579
3 changed files with 54 additions and 42 deletions

View file

@ -160,19 +160,19 @@ namespace AideDeJeu.ViewModels.PlayerCharacter
#region Background #region Background
public NotifyTaskCompletion<List<BackgroundItem>> Backgrounds { get; private set; } public NotifyTaskCompletion<List<BackgroundItem>> Backgrounds { get; private set; }
private int _BackgroundSelectedIndex = -1; //private int _BackgroundSelectedIndex = -1;
public int BackgroundSelectedIndex //public int BackgroundSelectedIndex
{ //{
get // get
{ // {
return _BackgroundSelectedIndex; // return _BackgroundSelectedIndex;
} // }
set // set
{ // {
SetProperty(ref _BackgroundSelectedIndex, value); // SetProperty(ref _BackgroundSelectedIndex, value);
SelectedBackground = Backgrounds.Result[_BackgroundSelectedIndex]; // SelectedBackground = Backgrounds.Result[_BackgroundSelectedIndex];
} // }
} //}
private BackgroundItem _SelectedBackground = null; private BackgroundItem _SelectedBackground = null;
public BackgroundItem SelectedBackground public BackgroundItem SelectedBackground
@ -184,7 +184,7 @@ namespace AideDeJeu.ViewModels.PlayerCharacter
set set
{ {
SetProperty(ref _SelectedBackground, value); SetProperty(ref _SelectedBackground, value);
OnPropertyChanged(nameof(PreferedBackground)); OnPropertyChanged(nameof(BackgroundOrSubBackground));
//NotifySelectedBackground = new NotifyTaskCompletion<BackgroundItem>(Task.Run(() => LoadBackgroundAsync(_SelectedBackground))); //NotifySelectedBackground = new NotifyTaskCompletion<BackgroundItem>(Task.Run(() => LoadBackgroundAsync(_SelectedBackground)));
} }
} }
@ -247,28 +247,28 @@ namespace AideDeJeu.ViewModels.PlayerCharacter
} }
} }
private int _SubBackgroundSelectedIndex = -1; //private int _SubBackgroundSelectedIndex = -1;
public int SubBackgroundSelectedIndex //public int SubBackgroundSelectedIndex
{ //{
get // get
{ // {
return _SubBackgroundSelectedIndex; // return _SubBackgroundSelectedIndex;
} // }
set // set
{ // {
SetProperty(ref _SubBackgroundSelectedIndex, value); // SetProperty(ref _SubBackgroundSelectedIndex, value);
if (_SubBackgroundSelectedIndex == 0) // if (_SubBackgroundSelectedIndex == 0)
{ // {
//SelectedPlayerCharacter.SubBackground = null; // //SelectedPlayerCharacter.SubBackground = null;
SubBackgroundSelectedIndex = -1; // SubBackgroundSelectedIndex = -1;
SelectedSubBackground = null; // SelectedSubBackground = null;
} // }
else if (_SubBackgroundSelectedIndex > 0) // else if (_SubBackgroundSelectedIndex > 0)
{ // {
SelectedSubBackground = SubBackgrounds[_SubBackgroundSelectedIndex]; // SelectedSubBackground = SubBackgrounds[_SubBackgroundSelectedIndex];
} // }
} // }
} //}
private SubBackgroundItem _SelectedSubBackground = null; private SubBackgroundItem _SelectedSubBackground = null;
public SubBackgroundItem SelectedSubBackground public SubBackgroundItem SelectedSubBackground
@ -280,7 +280,7 @@ namespace AideDeJeu.ViewModels.PlayerCharacter
set set
{ {
SetProperty(ref _SelectedSubBackground, value); SetProperty(ref _SelectedSubBackground, value);
OnPropertyChanged(nameof(PreferedBackground)); OnPropertyChanged(nameof(BackgroundOrSubBackground));
//NotifySelectedSubBackground = new NotifyTaskCompletion<SubBackgroundItem>(Task.Run(() => LoadSubBackgroundAsync(SelectedSubBackground))); //NotifySelectedSubBackground = new NotifyTaskCompletion<SubBackgroundItem>(Task.Run(() => LoadSubBackgroundAsync(SelectedSubBackground)));
} }
} }
@ -314,7 +314,7 @@ namespace AideDeJeu.ViewModels.PlayerCharacter
return subbackground; return subbackground;
} }
public BackgroundItem PreferedBackground public BackgroundItem BackgroundOrSubBackground
{ {
get get
{ {

View file

@ -106,6 +106,18 @@
</Label.GestureRecognizers> </Label.GestureRecognizers>
</Label> </Label>
<Label>
<Label.FormattedText>
<FormattedString>
<Span Text="Merci à mes tipeurs " />
<Span Text="temvaryen, Ekaradon, Emmanuel et Nicolas" FontAttributes="Bold" />
</FormattedString>
</Label.FormattedText>
<!--<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OpenWebCommand}" CommandParameter="https://fr.tipeee.com/nioux" />
</Label.GestureRecognizers>-->
</Label>
<Label> <Label>
<Label.FormattedText> <Label.FormattedText>
<FormattedString> <FormattedString>

View file

@ -158,25 +158,25 @@
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"> <Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0"> <StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Compétences" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Compétences" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding PreferedBackground.Abilities}" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding BackgroundOrSubBackground.Abilities}" />
</StackLayout> </StackLayout>
</Frame> </Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"> <Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0"> <StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Outils maîtrisés" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Outils maîtrisés" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding PreferedBackground.MasteredTools}" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding BackgroundOrSubBackground.MasteredTools}" />
</StackLayout> </StackLayout>
</Frame> </Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"> <Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0"> <StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Langues maîtrisées" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Langues maîtrisées" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding PreferedBackground.MasteredLanguages}" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding BackgroundOrSubBackground.MasteredLanguages}" />
</StackLayout> </StackLayout>
</Frame> </Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"> <Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0"> <StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Équipement" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Équipement" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding PreferedBackground.Equipment}" /> <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding BackgroundOrSubBackground.Equipment}" />
</StackLayout> </StackLayout>
</Frame> </Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding HasBackgroundSkill}"> <Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding HasBackgroundSkill}">