mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-17 07:40:41 +00:00
CarousselPage
This commit is contained in:
parent
6bb192145a
commit
efc1923b25
2 changed files with 272 additions and 175 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<TabbedPage
|
<CarouselPage
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="AideDeJeu.Views.PlayerCharacter.PlayerCharacterEditorPage"
|
x:Class="AideDeJeu.Views.PlayerCharacter.PlayerCharacterEditorPage"
|
||||||
|
|
@ -11,10 +11,10 @@
|
||||||
xmlns:pickers="clr-namespace:AideDeJeu.Views.Pickers"
|
xmlns:pickers="clr-namespace:AideDeJeu.Views.Pickers"
|
||||||
x:Name="This"
|
x:Name="This"
|
||||||
Title="Création de personnage"
|
Title="Création de personnage"
|
||||||
SelectedTabColor="{StaticResource HDRed}"
|
|
||||||
UnselectedTabColor="{StaticResource HDMidGrey}"
|
|
||||||
android:TabbedPage.IsSwipePagingEnabled="True">
|
android:TabbedPage.IsSwipePagingEnabled="True">
|
||||||
<TabbedPage.Resources>
|
<!--SelectedTabColor="{StaticResource HDRed}"
|
||||||
|
UnselectedTabColor="{StaticResource HDMidGrey}"-->
|
||||||
|
<CarouselPage.Resources>
|
||||||
<StyleSheet>
|
<StyleSheet>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
imagebutton {
|
imagebutton {
|
||||||
|
|
@ -52,12 +52,21 @@
|
||||||
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
|
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
|
||||||
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
|
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</TabbedPage.Resources>
|
</CarouselPage.Resources>
|
||||||
<TabbedPage.ToolbarItems>
|
<CarouselPage.ToolbarItems>
|
||||||
<ToolbarItem Text="Ouvrir en PDF avec..." Command="{Binding GenerateAndOpenPdfCommand}" Order="Secondary" />
|
<ToolbarItem Text="Ouvrir en PDF avec..." Command="{Binding GenerateAndOpenPdfCommand}" Order="Secondary" />
|
||||||
</TabbedPage.ToolbarItems>
|
</CarouselPage.ToolbarItems>
|
||||||
<ContentPage Title="Race">
|
<ContentPage x:Name="Race" Title="Race">
|
||||||
<ScrollView Orientation="Vertical">
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<pickers:ItemPickerView BindingContext="{Binding}" Title="Race" ItemsSource="{Binding Races.Result}" SelectedItem="{Binding SelectedPlayerCharacter.Race, Mode=TwoWay}" IsEnabled="{Binding Races.IsSuccessfullyCompleted}" />
|
<pickers:ItemPickerView BindingContext="{Binding}" Title="Race" ItemsSource="{Binding Races.Result}" SelectedItem="{Binding SelectedPlayerCharacter.Race, Mode=TwoWay}" IsEnabled="{Binding Races.IsSuccessfullyCompleted}" />
|
||||||
<!--<Picker Title="Race" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Races.IsSuccessfullyCompleted}" ItemsSource="{Binding Races.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding RaceSelectedIndex, Mode=TwoWay}" />-->
|
<!--<Picker Title="Race" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Races.IsSuccessfullyCompleted}" ItemsSource="{Binding Races.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding RaceSelectedIndex, Mode=TwoWay}" />-->
|
||||||
|
|
@ -102,9 +111,20 @@
|
||||||
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedRace.Markdown}" />-->
|
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedRace.Markdown}" />-->
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<Button Grid.Column="1" Grid.Row="1" Text="Classe" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Class}"/>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
<ContentPage Title="Classe">
|
<ContentPage x:Name="Class" Title="Classe">
|
||||||
<ScrollView Orientation="Vertical">
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<pickers:ItemPickerView BindingContext="{Binding}" Title="Classe" ItemsSource="{Binding Classes.Result}" SelectedItem="{Binding SelectedPlayerCharacter.Class, Mode=TwoWay}" />
|
<pickers:ItemPickerView BindingContext="{Binding}" Title="Classe" ItemsSource="{Binding Classes.Result}" SelectedItem="{Binding SelectedPlayerCharacter.Class, Mode=TwoWay}" />
|
||||||
<!--<Picker Title="Classe" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Classes.IsSuccessfullyCompleted}" ItemsSource="{Binding Classes.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding ClassSelectedIndex, Mode=TwoWay}" />-->
|
<!--<Picker Title="Classe" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Classes.IsSuccessfullyCompleted}" ItemsSource="{Binding Classes.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding ClassSelectedIndex, Mode=TwoWay}" />-->
|
||||||
|
|
@ -140,9 +160,21 @@
|
||||||
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Class.Markdown}" />-->
|
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Class.Markdown}" />-->
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<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="Historique" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Background}"/>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
<ContentPage Title="Historique">
|
<ContentPage x:Name="Background" Title="Historique">
|
||||||
<ScrollView Orientation="Vertical">
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
|
|
||||||
<!-- DEBUG -->
|
<!-- DEBUG -->
|
||||||
|
|
@ -199,9 +231,21 @@
|
||||||
|
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<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="Caractéristiques" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Abilities}"/>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
<ContentPage Title="Caractéristiques">
|
<ContentPage x:Name="Abilities" Title="Caractéristiques">
|
||||||
<ScrollView Orientation="Vertical">
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<Frame BorderColor="Black" Padding="2" Margin="10">
|
<Frame BorderColor="Black" Padding="2" Margin="10">
|
||||||
<ImageButton Source="rolling_dice_cup.png" Command="{Binding RollDicesCommand}" />
|
<ImageButton Source="rolling_dice_cup.png" Command="{Binding RollDicesCommand}" />
|
||||||
|
|
@ -262,15 +306,39 @@
|
||||||
<pickers:StringPickerView BindingContext="{Binding}" Title="Charisme" ItemsSource="{Binding Abilities}" SelectedItem="{Binding SelectedPlayerCharacter.Abilities.Charisma.BaseValue, Mode=TwoWay}" />-->
|
<pickers:StringPickerView BindingContext="{Binding}" Title="Charisme" ItemsSource="{Binding Abilities}" SelectedItem="{Binding SelectedPlayerCharacter.Abilities.Charisma.BaseValue, Mode=TwoWay}" />-->
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<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="Équipement" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Equipment}"/>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
<ContentPage Title="Equipement">
|
<ContentPage x:Name="Equipment" Title="Équipement">
|
||||||
<ScrollView Orientation="Vertical">
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<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="Finalisation" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Finalize}"/>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
<ContentPage Title="Finalisation">
|
<ContentPage x:Name="Finalize" Title="Finalisation">
|
||||||
<ScrollView Orientation="Vertical">
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<Entry Placeholder="Nom" Text="{Binding Name}" Keyboard="Text" />
|
<Entry Placeholder="Nom" Text="{Binding Name}" Keyboard="Text" />
|
||||||
<!--<Picker Title="Alignement" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Alignments.IsSuccessfullyCompleted}" ItemsSource="{Binding Alignments.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding AlignmentSelectedIndex, Mode=TwoWay}" />-->
|
<!--<Picker Title="Alignement" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Alignments.IsSuccessfullyCompleted}" ItemsSource="{Binding Alignments.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding AlignmentSelectedIndex, Mode=TwoWay}" />-->
|
||||||
|
|
@ -280,12 +348,27 @@
|
||||||
<Picker Title="Niveau" HorizontalOptions="FillAndExpand" ItemsSource="{Binding Levels}" ItemDisplayBinding="{Binding StringFormat='Niveau : {0}'}" />
|
<Picker Title="Niveau" HorizontalOptions="FillAndExpand" ItemsSource="{Binding Levels}" ItemDisplayBinding="{Binding StringFormat='Niveau : {0}'}" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<Button Grid.Column="0" Grid.Row="1" Text="Équipement" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Equipment}"/>
|
||||||
|
<Button Grid.Column="1" Grid.Row="1" Text="Résumé" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Resume}"/>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
<ContentPage Title="Résumé">
|
<ContentPage x:Name="Resume" Title="Résumé">
|
||||||
<ScrollView Orientation="Vertical">
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ScrollView Grid.ColumnSpan="2" Orientation="Vertical">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<Button Grid.Column="0" Grid.Row="1" Text="Finalisation" Command="{Binding ChangePageCommand, Source={x:Reference This}}" CommandParameter="{x:Reference Finalize}"/>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
<!--<StackLayout Orientation="Vertical">
|
<!--<StackLayout Orientation="Vertical">
|
||||||
<TableView Margin="10,0">
|
<TableView Margin="10,0">
|
||||||
|
|
@ -327,4 +410,4 @@
|
||||||
</TableRoot>
|
</TableRoot>
|
||||||
</TableView>
|
</TableView>
|
||||||
</StackLayout>-->
|
</StackLayout>-->
|
||||||
</TabbedPage>
|
</CarouselPage>
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
using AideDeJeu.ViewModels.PlayerCharacter;
|
using AideDeJeu.ViewModels.PlayerCharacter;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
@ -12,7 +13,7 @@ using Xamarin.Forms.Xaml;
|
||||||
namespace AideDeJeu.Views.PlayerCharacter
|
namespace AideDeJeu.Views.PlayerCharacter
|
||||||
{
|
{
|
||||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||||
public partial class PlayerCharacterEditorPage : TabbedPage
|
public partial class PlayerCharacterEditorPage : CarouselPage
|
||||||
{
|
{
|
||||||
public PlayerCharacterEditorPage()
|
public PlayerCharacterEditorPage()
|
||||||
{
|
{
|
||||||
|
|
@ -21,5 +22,18 @@ namespace AideDeJeu.Views.PlayerCharacter
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Command ChangePageCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new Command<object>(ExecuteChangePageCommand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ExecuteChangePageCommand(object param)
|
||||||
|
{
|
||||||
|
This.CurrentPage = param as ContentPage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue