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 =>
|
||||
{
|
||||
var spell = item as Spell;
|
||||
return //(int.Parse(spell.Level) >= int.Parse(niveauMin)) &&
|
||||
//(int.Parse(spell.Level) <= int.Parse(niveauMax)) &&
|
||||
//spell.Type.ToLower().Contains(ecole.ToLower()) &&
|
||||
return (int.Parse(spell.Level) >= int.Parse(niveauMin)) &&
|
||||
(int.Parse(spell.Level) <= int.Parse(niveauMax)) &&
|
||||
spell.Type.ToLower().Contains(ecole.ToLower()) &&
|
||||
spell.Source.Contains(source) &&
|
||||
spell.Source.Contains(classe) &&
|
||||
//spell.Type.Contains(rituel) &&
|
||||
spell.Type.Contains(rituel) &&
|
||||
Helpers.RemoveDiacritics(spell.NamePHB).ToLower().Contains(Helpers.RemoveDiacritics(SearchText).ToLower());
|
||||
}).OrderBy(spell => spell.NamePHB)
|
||||
.AsEnumerable();
|
||||
|
|
@ -374,8 +374,8 @@ namespace AideDeJeu.ViewModels
|
|||
{
|
||||
var monster = item as Monster;
|
||||
return
|
||||
//monster.Type.Contains(type) &&
|
||||
//(string.IsNullOrEmpty(size) || monster.Size.Equals(size)) &&
|
||||
monster.Type.Contains(type) &&
|
||||
(string.IsNullOrEmpty(size) || monster.Size.Equals(size)) &&
|
||||
monster.Source.Contains(source) &&
|
||||
powerComparer.Compare(monster.Challenge, minPower) >= 0 &&
|
||||
powerComparer.Compare(monster.Challenge, maxPower) <= 0 &&
|
||||
|
|
|
|||
|
|
@ -126,11 +126,10 @@ namespace AideDeJeu.ViewModels
|
|||
public Command LoadItemsCommand { get; private set; }
|
||||
public Command<Item> GotoItemCommand { get; private set; }
|
||||
|
||||
public Command SwitchToSpells { get; private set; }
|
||||
public Command SwitchToMonsters { get; private set; }
|
||||
//public Command SwitchToVF { get; private set; }
|
||||
public Command SwitchToVO { get; private set; }
|
||||
public Command SwitchToHD { get; private set; }
|
||||
public Command SwitchToSpellsHD { get; private set; }
|
||||
public Command SwitchToMonstersHD { get; private set; }
|
||||
public Command SwitchToSpellsVO { get; private set; }
|
||||
public Command SwitchToMonstersVO { get; private set; }
|
||||
public Command AboutCommand { get; private set; }
|
||||
public Command<string> SearchCommand { get; private set; }
|
||||
|
||||
|
|
@ -145,12 +144,11 @@ namespace AideDeJeu.ViewModels
|
|||
GotoItemCommand = new Command<Item>(async (item) =>
|
||||
{
|
||||
await GetItemsViewModel(ItemSourceType).ExecuteGotoItemCommandAsync(item);
|
||||
});
|
||||
SwitchToSpells = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.Monster) | ItemSourceType.Spell);
|
||||
SwitchToMonsters = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.Spell) | ItemSourceType.Monster);
|
||||
//SwitchToVF = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.VO & ~ItemSourceType.HD) | ItemSourceType.VF);
|
||||
SwitchToVO = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.HD) | ItemSourceType.VO);
|
||||
SwitchToHD = new Command(() => ItemSourceType = (ItemSourceType & ~ItemSourceType.VO) | ItemSourceType.HD);
|
||||
});
|
||||
SwitchToSpellsHD = new Command(() => ItemSourceType = ItemSourceType.SpellHD);
|
||||
SwitchToMonstersHD = new Command(() => ItemSourceType = ItemSourceType.MonsterHD);
|
||||
SwitchToSpellsVO = new Command(() => ItemSourceType = ItemSourceType.SpellVO);
|
||||
SwitchToMonstersVO = new Command(() => ItemSourceType = ItemSourceType.MonsterVO);
|
||||
AboutCommand = new Command(async () => await Main.Navigator.GotoAboutPageAsync());
|
||||
SearchCommand = new Command<string>(async (text) =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
<x:Arguments>
|
||||
<ContentPage Title="{Binding ItemSourceType,Converter={StaticResource ItemSourceTypeToTitleConverter}}">
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Name="Spells" Text="Sorts" Order="Secondary" Icon="spell_book.png" Command="{Binding SwitchToSpells}" />
|
||||
<ToolbarItem Name="Monsters" Text="Monstres" Order="Secondary" Icon="dragon_head.png" Command="{Binding SwitchToMonsters}" />
|
||||
<ToolbarItem Name="VO" Text="VO SRD" Order="Secondary" Command="{Binding SwitchToVO}" />
|
||||
<ToolbarItem Name="HD" Text="VF H&D" Order="Secondary" Command="{Binding SwitchToHD}" />
|
||||
<ToolbarItem Name="Sorts (H&D)" Text="Sorts (H&D)" Order="Secondary" Command="{Binding SwitchToSpellsHD}" />
|
||||
<ToolbarItem Name="Creatures (H&D)" Text="Créatures (H&D)" Order="Secondary" Command="{Binding SwitchToMonstersHD}" />
|
||||
<ToolbarItem Name="Spells (VO)" Text="Spells (VO)" Order="Secondary" Icon="spell_book.png" Command="{Binding SwitchToSpellsVO}" />
|
||||
<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}" />
|
||||
</ContentPage.ToolbarItems>
|
||||
<StackLayout Orientation="Vertical" VerticalOptions="Fill" HorizontalOptions="Fill">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue