mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 15:06:06 +00:00
Look
This commit is contained in:
parent
453c07b112
commit
b1f7fc9de2
4 changed files with 84 additions and 21 deletions
|
|
@ -241,8 +241,17 @@ namespace AideDeJeu.ViewModels
|
|||
|
||||
private void SelectedSubBackgroundChanged()
|
||||
{
|
||||
SubBackgroundSpecialties = new NotifyTaskCompletion<List<string>>(Task.Run(() => LoadBackgroundsSpecialtiesAsync(SelectedPlayerCharacter.SubBackground)));
|
||||
Task.Run(async () => SelectedPlayerCharacter.SubBackgroundSkill = await LoadSkillAsync(SelectedPlayerCharacter.SubBackground));
|
||||
if (SelectedPlayerCharacter.SubBackground == null)
|
||||
{
|
||||
SubBackgroundSpecialties = null;
|
||||
SelectedPlayerCharacter.SubBackgroundSkill = null;
|
||||
SelectedPlayerCharacter.SubBackgroundSpecialty = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
SubBackgroundSpecialties = new NotifyTaskCompletion<List<string>>(Task.Run(() => LoadBackgroundsSpecialtiesAsync(SelectedPlayerCharacter.SubBackground)));
|
||||
Task.Run(async () => SelectedPlayerCharacter.SubBackgroundSkill = await LoadSkillAsync(SelectedPlayerCharacter.SubBackground));
|
||||
}
|
||||
}
|
||||
|
||||
private NotifyTaskCompletion<List<string>> _PersonalityTraits = null;
|
||||
|
|
@ -303,6 +312,7 @@ namespace AideDeJeu.ViewModels
|
|||
private set
|
||||
{
|
||||
SetProperty(ref _BackgroundSpecialties, value);
|
||||
OnPropertyChanged(nameof(SelectedBackgroundSpecialties));
|
||||
}
|
||||
}
|
||||
private NotifyTaskCompletion<List<string>> _SubBackgroundSpecialties = null;
|
||||
|
|
@ -315,6 +325,14 @@ namespace AideDeJeu.ViewModels
|
|||
private set
|
||||
{
|
||||
SetProperty(ref _SubBackgroundSpecialties, value);
|
||||
OnPropertyChanged(nameof(SelectedBackgroundSpecialties));
|
||||
}
|
||||
}
|
||||
public NotifyTaskCompletion<List<string>> SelectedBackgroundSpecialties
|
||||
{
|
||||
get
|
||||
{
|
||||
return _SubBackgroundSpecialties ?? _BackgroundSpecialties;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ namespace AideDeJeu.ViewModels
|
|||
SetProperty(ref _Class, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region Background
|
||||
private BackgroundItem _Background = null;
|
||||
public BackgroundItem Background
|
||||
{
|
||||
|
|
@ -53,6 +59,7 @@ namespace AideDeJeu.ViewModels
|
|||
set
|
||||
{
|
||||
SetProperty(ref _Background, value);
|
||||
OnPropertyChanged(nameof(SelectedBackground));
|
||||
}
|
||||
}
|
||||
private SubBackgroundItem _SubBackground = null;
|
||||
|
|
@ -65,6 +72,14 @@ namespace AideDeJeu.ViewModels
|
|||
set
|
||||
{
|
||||
SetProperty(ref _SubBackground, value);
|
||||
OnPropertyChanged(nameof(SelectedBackground));
|
||||
}
|
||||
}
|
||||
public BackgroundItem SelectedBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
return _SubBackground ?? _Background;
|
||||
}
|
||||
}
|
||||
private string _PersonalityTrait = null;
|
||||
|
|
@ -125,6 +140,7 @@ namespace AideDeJeu.ViewModels
|
|||
set
|
||||
{
|
||||
SetProperty(ref _BackgroundSpecialty, value);
|
||||
OnPropertyChanged(nameof(SelectedBackgroundSpecialty));
|
||||
}
|
||||
}
|
||||
private string _SubBackgroundSpecialty = null;
|
||||
|
|
@ -137,6 +153,14 @@ namespace AideDeJeu.ViewModels
|
|||
set
|
||||
{
|
||||
SetProperty(ref _SubBackgroundSpecialty, value);
|
||||
OnPropertyChanged(nameof(SelectedBackgroundSpecialty));
|
||||
}
|
||||
}
|
||||
public string SelectedBackgroundSpecialty
|
||||
{
|
||||
get
|
||||
{
|
||||
return _SubBackgroundSpecialty ?? _BackgroundSpecialty;
|
||||
}
|
||||
}
|
||||
private SkillItem _BackgroundSkill = null;
|
||||
|
|
@ -149,6 +173,7 @@ namespace AideDeJeu.ViewModels
|
|||
set
|
||||
{
|
||||
SetProperty(ref _BackgroundSkill, value);
|
||||
OnPropertyChanged(nameof(SelectedBackgroundSkill));
|
||||
}
|
||||
}
|
||||
private SkillItem _SubBackgroundSkill = null;
|
||||
|
|
@ -161,7 +186,16 @@ namespace AideDeJeu.ViewModels
|
|||
set
|
||||
{
|
||||
SetProperty(ref _SubBackgroundSkill, value);
|
||||
OnPropertyChanged(nameof(SelectedBackgroundSkill));
|
||||
}
|
||||
}
|
||||
public SkillItem SelectedBackgroundSkill
|
||||
{
|
||||
get
|
||||
{
|
||||
return _SubBackgroundSkill ?? _BackgroundSkill;
|
||||
}
|
||||
}
|
||||
#endregion Background
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,26 +50,29 @@
|
|||
<StackLayout>
|
||||
<Picker Title="Historique" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Backgrounds.IsSuccessfullyCompleted}" ItemsSource="{Binding Backgrounds.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding BackgroundSelectedIndex, Mode=TwoWay}" />
|
||||
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Background.Description}" />
|
||||
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSkill.Name}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSkill.Description}" />
|
||||
|
||||
<Button Visual="Material" IsVisible="{Binding BackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding BackgroundSpecialtyPickerCommand}" CommandParameter="{Binding BackgroundSpecialties.Result}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSpecialty}" />
|
||||
|
||||
|
||||
|
||||
|
||||
<Picker Title="Variante" HorizontalOptions="FillAndExpand" IsEnabled="{Binding SubBackgrounds.IsSuccessfullyCompleted}" ItemsSource="{Binding SubBackgrounds.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding SubBackgroundSelectedIndex, Mode=TwoWay}" />
|
||||
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Background.Description}" />
|
||||
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.SubBackground.Description}" />
|
||||
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Name}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Description}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SelectedBackgroundSkill.Name, StringFormat='# {0}'}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SelectedBackgroundSkill.Description}" />
|
||||
|
||||
<Button Visual="Material" IsVisible="{Binding SubBackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding SubBackgroundSpecialtyPickerCommand}" CommandParameter="{Binding SubBackgroundSpecialties.Result}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSpecialty}" />
|
||||
<views:StringPickerView BindingContext="{Binding}" Title="{Binding SelectedPlayerCharacter.SelectedBackgroundSpecialty}" ItemsSource="{Binding SelectedBackgroundSpecialties.Result}" />
|
||||
<!--SelectedItem="{Binding SelectedPlayerCharacter.SelectedBackgroundSpecialty, Mode=TwoWay}"-->
|
||||
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityTraits.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityTrait}" />
|
||||
<Button Visual="Material" IsVisible="{Binding SelectedBackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding BackgroundSpecialtyPickerCommand}" CommandParameter="{Binding SelectedBackgroundSpecialties.Result}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SelectedBackgroundSpecialty}" />-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Name}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Description}" />-->
|
||||
|
||||
<!--<Button Visual="Material" IsVisible="{Binding SubBackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding SubBackgroundSpecialtyPickerCommand}" CommandParameter="{Binding SubBackgroundSpecialties.Result}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSpecialty}" />-->
|
||||
|
||||
|
||||
|
||||
|
|
@ -77,16 +80,24 @@
|
|||
<!--<views:StringPickerView Title="Trait de personnalité" IsVisible="{Binding PersonalityTraits.IsSuccessfullyCompleted}" ItemsSource="{Binding PersonalityTraits.Result}" />-->
|
||||
<views:StringPickerView BindingContext="{Binding}" Title="Trait de personnalité" IsVisible="{Binding PersonalityTraits.IsSuccessfullyCompleted}" ItemsSource="{Binding PersonalityTraits.Result}" SelectedItem="{Binding SelectedPlayerCharacter.PersonalityTrait, Mode=TwoWay}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityTraits.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityTrait}" />
|
||||
<!--SelectedItem="{Binding SelectedPlayerCharacter.PersonalityTrait, Mode=TwoWay}"-->
|
||||
|
||||
<Button Visual="Material" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" Text="Idéal" Command="{Binding PersonalityIdealPickerCommand}" CommandParameter="{Binding PersonalityIdeals.Result}" />
|
||||
<views:StringPickerView BindingContext="{Binding}" Title="Idéal" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" ItemsSource="{Binding PersonalityIdeals.Result}" SelectedItem="{Binding SelectedPlayerCharacter.PersonalityIdeal, Mode=TwoWay}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityIdeal}" />
|
||||
|
||||
<views:StringPickerView BindingContext="{Binding}" Title="Lien" IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" ItemsSource="{Binding PersonalityLinks.Result}" SelectedItem="{Binding SelectedPlayerCharacter.PersonalityLink, Mode=TwoWay}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityLink}" />
|
||||
|
||||
<views:StringPickerView BindingContext="{Binding}" Title="Défaut" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" ItemsSource="{Binding PersonalityDefects.Result}" SelectedItem="{Binding SelectedPlayerCharacter.PersonalityDefect, Mode=TwoWay}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityDefect}" />
|
||||
|
||||
<!--<Button Visual="Material" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" Text="Idéal" Command="{Binding PersonalityIdealPickerCommand}" CommandParameter="{Binding PersonalityIdeals.Result}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityIdeal}" />
|
||||
|
||||
<Button Visual="Material" IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" Text="Lien" Command="{Binding PersonalityLinkPickerCommand}" CommandParameter="{Binding PersonalityLinks.Result}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityLink}" />
|
||||
|
||||
<Button Visual="Material" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" Text="Défaut" Command="{Binding PersonalityDefectPickerCommand}" CommandParameter="{Binding PersonalityDefects.Result}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityDefect}" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityDefect}" />-->
|
||||
|
||||
|
||||
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Background.Markdown}" />
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
|
||||
</ResourceDictionary>
|
||||
</StackLayout.Resources>
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding Title, Source={x:Reference this}, StringFormat='## [{0}](#)'}" IsEnabled="False" />
|
||||
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding Title, Source={x:Reference this}, StringFormat='# {0}'}" IsEnabled="False" />
|
||||
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedItem, Source={x:Reference this}}" />-->
|
||||
<!--<StackLayout BindableLayout.ItemsSource="{Binding ItemsSource, Source={x:Reference this}}">
|
||||
<BindableLayout.ItemTemplate>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue