diff --git a/AideDeJeu/AideDeJeu/Models/Cards/Converters.cs b/AideDeJeu/AideDeJeu/Models/Cards/Converters.cs index cf08cd1c..63a61419 100644 --- a/AideDeJeu/AideDeJeu/Models/Cards/Converters.cs +++ b/AideDeJeu/AideDeJeu/Models/Cards/Converters.cs @@ -144,7 +144,7 @@ namespace AideDeJeuLib.Cards //new FillCardContent(1), //new TextCardContent(spell.DescriptionText), }); - var description = ToContents(spell.DescriptionDiv.SelectSingleNode("div")); + var description = ToContents(null); // spell.DescriptionDiv.SelectSingleNode("div")); foreach (var line in description) { int size = contents.Sum(cc => cc.Height); diff --git a/AideDeJeu/AideDeJeu/Models/Spells/Spell.cs b/AideDeJeu/AideDeJeu/Models/Spells/Spell.cs index 9eff0d05..62866d3b 100644 --- a/AideDeJeu/AideDeJeu/Models/Spells/Spell.cs +++ b/AideDeJeu/AideDeJeu/Models/Spells/Spell.cs @@ -54,37 +54,7 @@ namespace AideDeJeuLib.Spells public string Components { get; set; } public string Duration { get; set; } public string DescriptionHtml { get; set; } - public string DescriptionText - { - get - { - return DescriptionDiv?.InnerText?.Replace("\n", "\n\n"); - } - } - [IgnoreDataMember] - public XmlNode DescriptionDiv - { - get - { - if(DescriptionHtml != null) - { - XmlDocument xdoc = new XmlDocument(); - xdoc.LoadXml(DescriptionHtml); - return xdoc.DocumentElement; - //HtmlDocument doc = new HtmlDocument() { OptionOutputAsXml = true }; - //doc.LoadHtml(DescriptionHtml); - //return doc.DocumentNode; - } - return null; - } - set - { - DescriptionHtml = value?.OuterXml; - } - } - public string Overflow { get; set; } - public string NoOverflow { get; set; } public string Source { get; set; } } diff --git a/AideDeJeu/AideDeJeu/ViewModels/SpellDetailViewModel.cs b/AideDeJeu/AideDeJeu/ViewModels/SpellDetailViewModel.cs index d50a716f..98e0e1e2 100644 --- a/AideDeJeu/AideDeJeu/ViewModels/SpellDetailViewModel.cs +++ b/AideDeJeu/AideDeJeu/ViewModels/SpellDetailViewModel.cs @@ -19,8 +19,6 @@ namespace AideDeJeu.ViewModels set { SetProperty(ref _Item, value); - OnPropertyChanged(nameof(Description)); - OnPropertyChanged(nameof(DescriptionList)); OnPropertyChanged(nameof(TypeLevel)); OnPropertyChanged(nameof(CastingTime)); OnPropertyChanged(nameof(Range)); @@ -29,34 +27,6 @@ namespace AideDeJeu.ViewModels } } - public FormattedString Description - { - get - { - var fs = new FormattedString(); - if (Item?.DescriptionDiv != null) - { - FormatedTextHelpers.HtmlNodeToFormatedString(global::AideDeJeuLib.Item.StringToNode(Item?.DescriptionHtml), fs, FontAttributes.None); - } - return fs; - } - } - - public ObservableCollection DescriptionList - { - get - { - var list = new ObservableCollection(); - list.Add(TypeLevel); - list.Add(CastingTime); - list.Add(Range); - list.Add(Components); - list.Add(Duration); - list.Add(TypeLevel); - return list; - } - } - public FormattedString TypeLevel { get @@ -131,29 +101,6 @@ namespace AideDeJeu.ViewModels } async Task ExecuteLoadItemCommand() { - if (IsBusy) - return; - - IsBusy = true; - - try - { - //Item.ParseHtml(); - //Item = _Item; - //using (var spellsScrappers = new SpellsScrappers()) - //{ - // var item = await spellsScrappers.GetSpell(Item.Id); - // Item = item; - //} - } - catch (Exception ex) - { - Debug.WriteLine(ex); - } - finally - { - IsBusy = false; - } } } diff --git a/AideDeJeu/AideDeJeu/Views/MonsterDetailPage.xaml b/AideDeJeu/AideDeJeu/Views/MonsterDetailPage.xaml index dda08003..51e20a92 100644 --- a/AideDeJeu/AideDeJeu/Views/MonsterDetailPage.xaml +++ b/AideDeJeu/AideDeJeu/Views/MonsterDetailPage.xaml @@ -21,17 +21,11 @@