1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-29 14:35:45 +00:00

Intégration pc editor dans le shell

This commit is contained in:
Yan Maniez 2019-10-13 03:13:51 +02:00
parent 5cb823b074
commit d0a63a8e40
17 changed files with 148 additions and 112 deletions

View file

@ -123,6 +123,21 @@
<Compile Update="Views\Pickers\ItemPickerView.xaml.cs">
<DependentUpon>ItemPickerView.xaml</DependentUpon>
</Compile>
<Compile Update="Views\PlayerCharacter\AbilitiesPage.xaml.cs">
<DependentUpon>AbilitiesPage.xaml</DependentUpon>
</Compile>
<Compile Update="Views\PlayerCharacter\BackgroundPage.xaml.cs">
<DependentUpon>BackgroundPage.xaml</DependentUpon>
</Compile>
<Compile Update="Views\PlayerCharacter\ClassPage.xaml.cs">
<DependentUpon>ClassPage.xaml</DependentUpon>
</Compile>
<Compile Update="Views\PlayerCharacter\FinalizePage.xaml.cs">
<DependentUpon>FinalizePage.xaml</DependentUpon>
</Compile>
<Compile Update="Views\PlayerCharacter\RacePage.xaml.cs">
<DependentUpon>RacePage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
@ -167,7 +182,7 @@
<EmbeddedResource Update="Views\Pickers\AbilityPickerView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\AbilitiesView.xaml">
<EmbeddedResource Update="Views\PlayerCharacter\AbilitiesPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\AbilityBaseValueView.xaml">
@ -176,16 +191,16 @@
<EmbeddedResource Update="Views\PlayerCharacter\AbilityRacialBonusView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\BackgroundView.xaml">
<EmbeddedResource Update="Views\PlayerCharacter\BackgroundPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\ClassView.xaml">
<EmbeddedResource Update="Views\PlayerCharacter\ClassPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\EquipmentView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\FinalizeView.xaml">
<EmbeddedResource Update="Views\PlayerCharacter\FinalizePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\PdfViewPage.xaml">
@ -200,7 +215,7 @@
<EmbeddedResource Update="Views\Pickers\StringPickerView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\RaceView.xaml">
<EmbeddedResource Update="Views\PlayerCharacter\RacePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\PlayerCharacter\ResumeView.xaml">

View file

@ -17,7 +17,7 @@
<ContentPage.ToolbarItems>
<ToolbarItem Name="AddToFavorites" Text="Ajouter aux favoris" Order="Primary" Icon="round_star.png" Command="{Binding Main.Navigator.AddToFavoritesCommand}" />
<ToolbarItem Name="Print" Text="Générer un PDF" Order="Primary" Icon="scroll_unfurled.png" Command="{Binding Main.Navigator.GeneratePDFCommand}" CommandParameter="{Binding Item.Markdown}" />
<ToolbarItem Name="Speak" Text="Écouter / Arrêter" Order="Primary" Icon="round_star.png" Command="{Binding Main.Speech.SpeakItemCommand}" CommandParameter="{Binding Item}}" />
<ToolbarItem Name="Speak" Text="Écouter / Arrêter" Order="Primary" Icon="round_star.png" Command="{Binding Main.Speech.SpeakItemCommand}" CommandParameter="{Binding Item}" />
</ContentPage.ToolbarItems>
<Grid>
<!--<ScrollView Orientation="Vertical" BackgroundColor="{StaticResource HDWhite}">

View file

@ -131,7 +131,16 @@
</Shell.FlyoutHeader>
<ShellContent Title="Accueil" Route="home" ContentTemplate="{DataTemplate local:MainPage}" />
<ShellContent Title="Personnages" Route="pceditor" Icon="battle_axe.png" ContentTemplate="{DataTemplate pc:PlayerCharacterEditorPage}" />
<!--<ShellContent Title="Personnages" Route="pceditor" Icon="battle_axe.png" ContentTemplate="{DataTemplate pc:PlayerCharacterEditorPage}" />-->
<FlyoutItem Title="Personnages" Route="pceditor" Icon="battle_axe.png">
<Tab Title="Personnages">
<ShellContent Title="Race" ContentTemplate="{DataTemplate pc:RacePage}" />
<ShellContent Title="Historique" ContentTemplate="{DataTemplate pc:BackgroundPage}" />
<ShellContent Title="Classe" ContentTemplate="{DataTemplate pc:ClassPage}" />
<ShellContent Title="Caractéristiques" ContentTemplate="{DataTemplate pc:AbilitiesPage}" />
<ShellContent Title="Finalisation" ContentTemplate="{DataTemplate pc:FinalizePage}" />
</Tab>
</FlyoutItem>
<ShellContent Title="Dés" Icon="d20.png" Route="dices" ContentTemplate="{DataTemplate local:DicesPage}" />
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent Title="Bibliothèque" Route="library" Icon="spell_book.png">

View file

@ -1,18 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:tools="clr-namespace:AideDeJeu.Tools"
xmlns:mdview="clr-namespace:Xam.Forms.Markdown"
xmlns:pickers="clr-namespace:AideDeJeu.Views.Pickers"
xmlns:pcviews="clr-namespace:AideDeJeu.Views.PlayerCharacter"
x:Class="AideDeJeu.Views.PlayerCharacter.AbilitiesView">
<ContentView.Resources>
x:Class="AideDeJeu.Views.PlayerCharacter.AbilitiesPage"
x:Name="This">
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
<ContentView.Content>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Name="Print" Text="Générer un PDF" Order="Primary" Icon="scroll_unfurled.png" Command="{Binding PdfViewCommand, Source={x:Reference This}}" CommandParameter="{Binding SelectedPlayerCharacter}" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ScrollView Orientation="Vertical">
<Grid>
<Grid.ColumnDefinitions>
@ -100,5 +104,5 @@
</Frame>
</Grid>
</ScrollView>
</ContentView.Content>
</ContentView>
</ContentPage.Content>
</ContentPage>

View file

@ -10,11 +10,13 @@ using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class AbilitiesView : ContentView
public partial class AbilitiesPage : ContentPage
{
public AbilitiesView()
public AbilitiesPage()
{
InitializeComponent();
BindingContext = DependencyService.Get<AideDeJeu.ViewModels.PlayerCharacter.PlayerCharacterEditorViewModel>();
}
}
}

View file

@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:tools="clr-namespace:AideDeJeu.Tools"
xmlns:mdview="clr-namespace:Xam.Forms.Markdown"
xmlns:pickers="clr-namespace:AideDeJeu.Views.Pickers"
x:Class="AideDeJeu.Views.PlayerCharacter.BackgroundView">
<ContentView.Resources>
x:Class="AideDeJeu.Views.PlayerCharacter.BackgroundPage"
x:Name="This">
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
<ContentView.Content>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Name="Print" Text="Générer un PDF" Order="Primary" Icon="scroll_unfurled.png" Command="{Binding PdfViewCommand, Source={x:Reference This}}" CommandParameter="{Binding SelectedPlayerCharacter}" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
<StackLayout>
@ -72,5 +76,5 @@
</StackLayout>
</ScrollView>
</ContentView.Content>
</ContentView>
</ContentPage.Content>
</ContentPage>

View file

@ -0,0 +1,16 @@
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class BackgroundPage : ContentPage
{
public BackgroundPage()
{
InitializeComponent();
BindingContext = DependencyService.Get<AideDeJeu.ViewModels.PlayerCharacter.PlayerCharacterEditorViewModel>();
}
}
}

View file

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class BackgroundView : ContentView
{
public BackgroundView()
{
InitializeComponent();
}
}
}

View file

@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:tools="clr-namespace:AideDeJeu.Tools"
xmlns:mdview="clr-namespace:Xam.Forms.Markdown"
xmlns:pickers="clr-namespace:AideDeJeu.Views.Pickers"
x:Class="AideDeJeu.Views.PlayerCharacter.ClassView">
<ContentView.Resources>
x:Class="AideDeJeu.Views.PlayerCharacter.ClassPage"
x:Name="This">
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
<ContentView.Content>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Name="Print" Text="Générer un PDF" Order="Primary" Icon="scroll_unfurled.png" Command="{Binding PdfViewCommand, Source={x:Reference This}}" CommandParameter="{Binding SelectedPlayerCharacter}" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
<StackLayout>
<pickers:ItemPickerView BindingContext="{Binding}" Title="Classe" ItemsSource="{Binding Classes}" SelectedItem="{Binding SelectedPlayerCharacter.Class, Mode=TwoWay}" />
@ -48,5 +52,5 @@
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Class.Markdown}" />-->
</StackLayout>
</ScrollView>
</ContentView.Content>
</ContentView>
</ContentPage.Content>
</ContentPage>

View file

@ -0,0 +1,16 @@
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class ClassPage : ContentPage
{
public ClassPage()
{
InitializeComponent();
BindingContext = DependencyService.Get<AideDeJeu.ViewModels.PlayerCharacter.PlayerCharacterEditorViewModel>();
}
}
}

View file

@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:tools="clr-namespace:AideDeJeu.Tools"
xmlns:mdview="clr-namespace:Xam.Forms.Markdown"
xmlns:pickers="clr-namespace:AideDeJeu.Views.Pickers"
x:Class="AideDeJeu.Views.PlayerCharacter.FinalizeView">
<ContentView.Resources>
x:Class="AideDeJeu.Views.PlayerCharacter.FinalizePage"
x:Name="This">
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
<ContentView.Content>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Name="Print" Text="Générer un PDF" Order="Primary" Icon="scroll_unfurled.png" Command="{Binding PdfViewCommand, Source={x:Reference This}}" CommandParameter="{Binding SelectedPlayerCharacter}" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
<StackLayout>
<Frame BorderColor="Black" Padding="2" Margin="10">
@ -39,5 +43,5 @@
</StackLayout>
</ScrollView>
</ContentView.Content>
</ContentView>
</ContentPage.Content>
</ContentPage>

View file

@ -10,11 +10,13 @@ using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class ClassView : ContentView
public partial class FinalizePage : ContentPage
{
public ClassView()
public FinalizePage()
{
InitializeComponent();
BindingContext = DependencyService.Get<AideDeJeu.ViewModels.PlayerCharacter.PlayerCharacterEditorViewModel>();
}
}
}

View file

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class FinalizeView : ContentView
{
public FinalizeView()
{
InitializeComponent();
}
}
}

View file

@ -63,7 +63,7 @@
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<pcviews:RaceView Grid.ColumnSpan="2" BindingContext="{Binding}" />
<!--<pcviews:RaceView Grid.ColumnSpan="2" BindingContext="{Binding}" />-->
<Button Grid.Column="0" Grid.Row="1" Text="Nouveau" Command="{Binding ResetPlayerCharacterCommand}"/>
<Button Grid.Column="1" Grid.Row="1" Text="Historique" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Background}"/>
@ -80,7 +80,7 @@
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<pcviews:BackgroundView Grid.ColumnSpan="2" BindingContext="{Binding}" />
<!--<pcviews:BackgroundView Grid.ColumnSpan="2" BindingContext="{Binding}" />-->
<Button Grid.Column="0" Grid.Row="1" Text="Race" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Race}"/>
<Button Grid.Column="1" Grid.Row="1" Text="Classe" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Class}"/>
@ -97,7 +97,7 @@
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<pcviews:ClassView Grid.ColumnSpan="2" BindingContext="{Binding}" />
<!--<pcviews:ClassView Grid.ColumnSpan="2" BindingContext="{Binding}" />-->
<Button Grid.Column="0" Grid.Row="1" Text="Historique" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Background}"/>
<Button Grid.Column="1" Grid.Row="1" Text="Caractéristiques" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Abilities}"/>
@ -114,7 +114,7 @@
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<pcviews:AbilitiesView Grid.ColumnSpan="2" BindingContext="{Binding}" />
<!--<pcviews:AbilitiesView Grid.ColumnSpan="2" BindingContext="{Binding}" />-->
<Button Grid.Column="0" Grid.Row="1" Text="Classe" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Class}"/>
<Button Grid.Column="1" Grid.Row="1" Text="Autres" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Others}"/>
@ -131,7 +131,7 @@
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<pcviews:FinalizeView Grid.ColumnSpan="2" BindingContext="{Binding}" />
<!--<pcviews:FinalizeView Grid.ColumnSpan="2" BindingContext="{Binding}" />-->
<Button Grid.Column="0" Grid.Row="1" Text="Caractéristiques" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Abilities}"/>
<Button Grid.Column="1" Grid.Row="1" Text="Résumé" Command="{Binding PdfViewCommand, Source={x:Reference This}}" CommandParameter="{Binding SelectedPlayerCharacter}" />

View file

@ -1,20 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:tools="clr-namespace:AideDeJeu.Tools"
xmlns:mdview="clr-namespace:Xam.Forms.Markdown"
xmlns:pickers="clr-namespace:AideDeJeu.Views.Pickers"
x:Class="AideDeJeu.Views.PlayerCharacter.RaceView">
<ContentView.Resources>
x:Class="AideDeJeu.Views.PlayerCharacter.RacePage"
x:Name="This">
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
<ContentView.Content>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Name="Print" Text="Générer un PDF" Order="Primary" Icon="scroll_unfurled.png" Command="{Binding PdfViewCommand, Source={x:Reference This}}" CommandParameter="{Binding SelectedPlayerCharacter}" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
<StackLayout>
<pickers:ItemPickerView BindingContext="{Binding}" Title="Race" ItemsSource="{Binding Races}" SelectedItem="{Binding SelectedPlayerCharacter.Race, Mode=TwoWay}" IsEnabled="{Binding Races, Converter={StaticResource NullToFalseConverter}}}" />
<pickers:ItemPickerView BindingContext="{Binding}" Title="Race" ItemsSource="{Binding Races}" SelectedItem="{Binding SelectedPlayerCharacter.Race, Mode=TwoWay}" IsEnabled="{Binding Races, Converter={StaticResource NullToFalseConverter}}" />
<!--<Picker Title="Race" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Races.IsSuccessfullyCompleted}" ItemsSource="{Binding Races.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding RaceSelectedIndex, Mode=TwoWay}" />-->
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedPlayerCharacter.Race, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" >
@ -57,5 +61,5 @@
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedRace.Markdown}" />-->
</StackLayout>
</ScrollView>
</ContentView.Content>
</ContentView>
</ContentPage.Content>
</ContentPage>

View file

@ -0,0 +1,16 @@
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class RacePage : ContentPage
{
public RacePage()
{
InitializeComponent();
BindingContext = DependencyService.Get<AideDeJeu.ViewModels.PlayerCharacter.PlayerCharacterEditorViewModel>();
}
}
}

View file

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.PlayerCharacter
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class RaceView : ContentView
{
public RaceView()
{
InitializeComponent();
}
}
}