mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-22 01:53:24 +00:00
Quelques <br> et utilisation index.md
This commit is contained in:
parent
a9a827e2e5
commit
f54b9c85cc
7 changed files with 198 additions and 115 deletions
|
|
@ -227,6 +227,14 @@
|
|||
<EmbeddedResource Include="..\..\Data\feats_hd.md" Link="Data\feats_hd.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\..\Data\multiclassing_hd.md" Link="Data\multiclassing_hd.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\..\Data\index.md" Link="Data\index.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Views\MainNavigationPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
|
|
|
|||
|
|
@ -11,30 +11,30 @@ namespace AideDeJeuLib
|
|||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
"# Joueurs (H&D)\n\n" +
|
||||
"## [Races](races_hd.md)\n\n" +
|
||||
"## [Classes](classes_hd.md)\n\n" +
|
||||
"## [Équipement](equipment_hd.md)\n\n" +
|
||||
"## [Options](options_hd.md)\n\n" +
|
||||
"## [Dons](feats_hd.md)\n\n" +
|
||||
"## [Caractéristiques](abilities_hd.md)\n\n" +
|
||||
"## [États spéciaux](conditions_hd.md)\n\n" +
|
||||
"## [Environnement](environment_hd.md)\n\n" +
|
||||
"## [Temps](time_hd.md)\n\n" +
|
||||
"## [Repos](resting_hd.md)\n\n" +
|
||||
"## [Sorts](spells_hd.md)\n\n" +
|
||||
//"## [Sorts de mago](spells_hd_with_class_magicien.md)\n\n" +
|
||||
//"## [Tours de magie de mago](spells_hd_with_class_magicien_minlevel_sortsmineurs_maxlevel_sortsmineurs.md)\n\n" +
|
||||
//"## [Armures légères](equipment_hd_with_type_armurelegere.md)\n\n" +
|
||||
"# MJ\n\n" +
|
||||
"## [Créatures](monsters_hd.md)\n\n" +
|
||||
//"## [Mignons](baby_bestiary_hd.md)\n\n" +
|
||||
"# VO (SRD)\n\n" +
|
||||
"## [Conditions](conditions_vo.md)\n\n" +
|
||||
"## [Spells](spells_vo.md)\n\n" +
|
||||
"## [Monsters](monsters_vo.md)\n\n"
|
||||
;
|
||||
return AideDeJeu.Tools.Helpers.GetResourceString($"AideDeJeu.Data.index.md");
|
||||
//"# Joueurs (H&D)\n\n" +
|
||||
// "## [Races](races_hd.md)\n\n" +
|
||||
// "## [Classes](classes_hd.md)\n\n" +
|
||||
// "## [Équipement](equipment_hd.md)\n\n" +
|
||||
// "## [Multiclassage](multiclassing_hd.md)\n\n" +
|
||||
// "## [Dons](feats_hd.md)\n\n" +
|
||||
// "## [Caractéristiques](abilities_hd.md)\n\n" +
|
||||
// "## [États spéciaux](conditions_hd.md)\n\n" +
|
||||
// "## [Environnement](environment_hd.md)\n\n" +
|
||||
// "## [Temps](time_hd.md)\n\n" +
|
||||
// "## [Repos](resting_hd.md)\n\n" +
|
||||
// "## [Sorts](spells_hd.md)\n\n" +
|
||||
// //"## [Sorts de mago](spells_hd_with_class_magicien.md)\n\n" +
|
||||
// //"## [Tours de magie de mago](spells_hd_with_class_magicien_minlevel_sortsmineurs_maxlevel_sortsmineurs.md)\n\n" +
|
||||
// //"## [Armures légères](equipment_hd_with_type_armurelegere.md)\n\n" +
|
||||
// "# MJ\n\n" +
|
||||
// "## [Créatures](monsters_hd.md)\n\n" +
|
||||
// //"## [Mignons](baby_bestiary_hd.md)\n\n" +
|
||||
// "# VO (SRD)\n\n" +
|
||||
// "## [Conditions](conditions_vo.md)\n\n" +
|
||||
// "## [Spells](spells_vo.md)\n\n" +
|
||||
// "## [Monsters](monsters_vo.md)\n\n"
|
||||
// ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ namespace AideDeJeu.Tools
|
|||
var assembly = typeof(Helpers).GetTypeInfo().Assembly;
|
||||
return assembly.GetManifestResourceNames();
|
||||
}
|
||||
|
||||
public static async Task<string> GetResourceStringAsync(string resourceName)
|
||||
{
|
||||
var assembly = typeof(Helpers).GetTypeInfo().Assembly;
|
||||
|
|
@ -44,6 +45,22 @@ namespace AideDeJeu.Tools
|
|||
}
|
||||
}
|
||||
|
||||
public static string GetResourceString(string resourceName)
|
||||
{
|
||||
var assembly = typeof(Helpers).GetTypeInfo().Assembly;
|
||||
using (var stream = assembly.GetManifestResourceStream(resourceName))
|
||||
{
|
||||
if (stream != null)
|
||||
{
|
||||
using (var sr = new StreamReader(stream))
|
||||
{
|
||||
return sr.ReadToEnd();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<string> GetStringFromUrl(string url)
|
||||
{
|
||||
using (var client = new HttpClient())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue