mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 15:06:06 +00:00
Réactivation de certains filtres et simplification menu
This commit is contained in:
parent
637d5ac935
commit
d11371ae80
3 changed files with 19 additions and 21 deletions
|
|
@ -127,12 +127,12 @@ namespace AideDeJeu.ViewModels
|
||||||
return items.Where(item =>
|
return items.Where(item =>
|
||||||
{
|
{
|
||||||
var spell = item as Spell;
|
var spell = item as Spell;
|
||||||
return //(int.Parse(spell.Level) >= int.Parse(niveauMin)) &&
|
return (int.Parse(spell.Level) >= int.Parse(niveauMin)) &&
|
||||||
//(int.Parse(spell.Level) <= int.Parse(niveauMax)) &&
|
(int.Parse(spell.Level) <= int.Parse(niveauMax)) &&
|
||||||
//spell.Type.ToLower().Contains(ecole.ToLower()) &&
|
spell.Type.ToLower().Contains(ecole.ToLower()) &&
|
||||||
spell.Source.Contains(source) &&
|
spell.Source.Contains(source) &&
|
||||||
spell.Source.Contains(classe) &&
|
spell.Source.Contains(classe) &&
|
||||||
//spell.Type.Contains(rituel) &&
|
spell.Type.Contains(rituel) &&
|
||||||
Helpers.RemoveDiacritics(spell.NamePHB).ToLower().Contains(Helpers.RemoveDiacritics(SearchText).ToLower());
|
Helpers.RemoveDiacritics(spell.NamePHB).ToLower().Contains(Helpers.RemoveDiacritics(SearchText).ToLower());
|
||||||
}).OrderBy(spell => spell.NamePHB)
|
}).OrderBy(spell => spell.NamePHB)
|
||||||
.AsEnumerable();
|
.AsEnumerable();
|
||||||
|
|
@ -374,8 +374,8 @@ namespace AideDeJeu.ViewModels
|
||||||
{
|
{
|
||||||
var monster = item as Monster;
|
var monster = item as Monster;
|
||||||
return
|
return
|
||||||
//monster.Type.Contains(type) &&
|
monster.Type.Contains(type) &&
|
||||||
//(string.IsNullOrEmpty(size) || monster.Size.Equals(size)) &&
|
(string.IsNullOrEmpty(size) || monster.Size.Equals(size)) &&
|
||||||
monster.Source.Contains(source) &&
|
monster.Source.Contains(source) &&
|
||||||
powerComparer.Compare(monster.Challenge, minPower) >= 0 &&
|
powerComparer.Compare(monster.Challenge, minPower) >= 0 &&
|
||||||
powerComparer.Compare(monster.Challenge, maxPower) <= 0 &&
|
powerComparer.Compare(monster.Challenge, maxPower) <= 0 &&
|
||||||
|
|
|
||||||
|
|
@ -126,11 +126,10 @@ namespace AideDeJeu.ViewModels
|
||||||
public Command LoadItemsCommand { get; private set; }
|
public Command LoadItemsCommand { get; private set; }
|
||||||
public Command<Item> GotoItemCommand { get; private set; }
|
public Command<Item> GotoItemCommand { get; private set; }
|
||||||
|
|
||||||
public Command SwitchToSpells { get; private set; }
|
public Command SwitchToSpellsHD { get; private set; }
|
||||||
public Command SwitchToMonsters { get; private set; }
|
public Command SwitchToMonstersHD { get; private set; }
|
||||||
//public Command SwitchToVF { get; private set; }
|
public Command SwitchToSpellsVO { get; private set; }
|
||||||
public Command SwitchToVO { get; private set; }
|
public Command SwitchToMonstersVO { get; private set; }
|
||||||
public Command SwitchToHD { get; private set; }
|
|
||||||
public Command AboutCommand { get; private set; }
|
public Command AboutCommand { get; private set; }
|
||||||
public Command<string> SearchCommand { get; private set; }
|
public Command<string> SearchCommand { get; private set; }
|
||||||
|
|
||||||
|
|
@ -146,11 +145,10 @@ namespace AideDeJeu.ViewModels
|
||||||
{
|
{
|
||||||
await GetItemsViewModel(ItemSourceType).ExecuteGotoItemCommandAsync(item);
|
await GetItemsViewModel(ItemSourceType).ExecuteGotoItemCommandAsync(item);
|
||||||
});
|
});
|
||||||
SwitchToSpells = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.Monster) | ItemSourceType.Spell);
|
SwitchToSpellsHD = new Command(() => ItemSourceType = ItemSourceType.SpellHD);
|
||||||
SwitchToMonsters = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.Spell) | ItemSourceType.Monster);
|
SwitchToMonstersHD = new Command(() => ItemSourceType = ItemSourceType.MonsterHD);
|
||||||
//SwitchToVF = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.VO & ~ItemSourceType.HD) | ItemSourceType.VF);
|
SwitchToSpellsVO = new Command(() => ItemSourceType = ItemSourceType.SpellVO);
|
||||||
SwitchToVO = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.HD) | ItemSourceType.VO);
|
SwitchToMonstersVO = new Command(() => ItemSourceType = ItemSourceType.MonsterVO);
|
||||||
SwitchToHD = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.VO) | ItemSourceType.HD);
|
|
||||||
AboutCommand = new Command(async () => await Main.Navigator.GotoAboutPageAsync());
|
AboutCommand = new Command(async () => await Main.Navigator.GotoAboutPageAsync());
|
||||||
SearchCommand = new Command<string>(async (text) =>
|
SearchCommand = new Command<string>(async (text) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@
|
||||||
<x:Arguments>
|
<x:Arguments>
|
||||||
<ContentPage Title="{Binding ItemSourceType,Converter={StaticResource ItemSourceTypeToTitleConverter}}">
|
<ContentPage Title="{Binding ItemSourceType,Converter={StaticResource ItemSourceTypeToTitleConverter}}">
|
||||||
<ContentPage.ToolbarItems>
|
<ContentPage.ToolbarItems>
|
||||||
<ToolbarItem Name="Spells" Text="Sorts" Order="Secondary" Icon="spell_book.png" Command="{Binding SwitchToSpells}" />
|
<ToolbarItem Name="Sorts (H&D)" Text="Sorts (H&D)" Order="Secondary" Command="{Binding SwitchToSpellsHD}" />
|
||||||
<ToolbarItem Name="Monsters" Text="Monstres" Order="Secondary" Icon="dragon_head.png" Command="{Binding SwitchToMonsters}" />
|
<ToolbarItem Name="Creatures (H&D)" Text="Créatures (H&D)" Order="Secondary" Command="{Binding SwitchToMonstersHD}" />
|
||||||
<ToolbarItem Name="VO" Text="VO SRD" Order="Secondary" Command="{Binding SwitchToVO}" />
|
<ToolbarItem Name="Spells (VO)" Text="Spells (VO)" Order="Secondary" Icon="spell_book.png" Command="{Binding SwitchToSpellsVO}" />
|
||||||
<ToolbarItem Name="HD" Text="VF H&D" Order="Secondary" Command="{Binding SwitchToHD}" />
|
<ToolbarItem Name="Monsters (VO)" Text="Monsters (VO)" Order="Secondary" Icon="dragon_head.png" Command="{Binding SwitchToMonstersVO}" />
|
||||||
<ToolbarItem Name="About" Text="À propos de..." Order="Secondary" Icon="wooden_sign.png" Command="{Binding AboutCommand}" />
|
<ToolbarItem Name="About" Text="À propos de..." Order="Secondary" Icon="wooden_sign.png" Command="{Binding AboutCommand}" />
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>
|
||||||
<StackLayout Orientation="Vertical" VerticalOptions="Fill" HorizontalOptions="Fill">
|
<StackLayout Orientation="Vertical" VerticalOptions="Fill" HorizontalOptions="Fill">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue