mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-31 07:26:09 +00:00 
			
		
		
		
	Test picker
This commit is contained in:
		
							parent
							
								
									8300ca861e
								
							
						
					
					
						commit
						bb18b4b612
					
				
					 4 changed files with 67 additions and 21 deletions
				
			
		|  | @ -103,6 +103,9 @@ | ||||||
|     <EmbeddedResource Update="Views\StringPicker.xaml"> |     <EmbeddedResource Update="Views\StringPicker.xaml"> | ||||||
|       <Generator>MSBuild:UpdateDesignTimeXaml</Generator> |       <Generator>MSBuild:UpdateDesignTimeXaml</Generator> | ||||||
|     </EmbeddedResource> |     </EmbeddedResource> | ||||||
|  |     <EmbeddedResource Update="Views\StringPickerView.xaml"> | ||||||
|  |       <Generator>MSBuild:UpdateDesignTimeXaml</Generator> | ||||||
|  |     </EmbeddedResource> | ||||||
|     <EmbeddedResource Update="Views\TextInputCancellableView.xaml"> |     <EmbeddedResource Update="Views\TextInputCancellableView.xaml"> | ||||||
|       <Generator>MSBuild:UpdateDesignTimeXaml</Generator> |       <Generator>MSBuild:UpdateDesignTimeXaml</Generator> | ||||||
|     </EmbeddedResource> |     </EmbeddedResource> | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ | ||||||
|         xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core" |         xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core" | ||||||
|         xmlns:tools="clr-namespace:AideDeJeu.Tools" |         xmlns:tools="clr-namespace:AideDeJeu.Tools" | ||||||
|         xmlns:mdview="clr-namespace:Xam.Forms.Markdown" |         xmlns:mdview="clr-namespace:Xam.Forms.Markdown" | ||||||
|  |     xmlns:views="clr-namespace:AideDeJeu.Views" | ||||||
|         x:Name="This" |         x:Name="This" | ||||||
|         Title="Création de personnage" |         Title="Création de personnage" | ||||||
|         SelectedTabColor="{StaticResource HDRed}" |         SelectedTabColor="{StaticResource HDRed}" | ||||||
|  | @ -23,7 +24,7 @@ | ||||||
|             <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}" /> | ||||||
|                 <mdview:MarkdownView Markdown="{Binding SelectedPlayerCharacter.Alignment.Description}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Alignment.Description}" /> | ||||||
|                 <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> | ||||||
|  | @ -32,7 +33,7 @@ | ||||||
|         <ScrollView Orientation="Vertical"> |         <ScrollView Orientation="Vertical"> | ||||||
|             <StackLayout> |             <StackLayout> | ||||||
|                 <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}" /> | ||||||
|                 <mdview:MarkdownView Markdown="{Binding SelectedPlayerCharacter.Race.Markdown}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Race.Markdown}" /> | ||||||
|             </StackLayout> |             </StackLayout> | ||||||
|         </ScrollView> |         </ScrollView> | ||||||
|     </ContentPage> |     </ContentPage> | ||||||
|  | @ -40,7 +41,7 @@ | ||||||
|         <ScrollView Orientation="Vertical"> |         <ScrollView Orientation="Vertical"> | ||||||
|             <StackLayout> |             <StackLayout> | ||||||
|                 <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}" /> | ||||||
|                 <mdview:MarkdownView Markdown="{Binding SelectedPlayerCharacter.Class.Markdown}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Class.Markdown}" /> | ||||||
|             </StackLayout> |             </StackLayout> | ||||||
|         </ScrollView> |         </ScrollView> | ||||||
|     </ContentPage> |     </ContentPage> | ||||||
|  | @ -49,45 +50,44 @@ | ||||||
|             <StackLayout> |             <StackLayout> | ||||||
|                 <Picker Title="Historique" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Backgrounds.IsSuccessfullyCompleted}" ItemsSource="{Binding Backgrounds.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding BackgroundSelectedIndex, Mode=TwoWay}" /> |                 <Picker Title="Historique" HorizontalOptions="FillAndExpand" IsEnabled="{Binding Backgrounds.IsSuccessfullyCompleted}" ItemsSource="{Binding Backgrounds.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding BackgroundSelectedIndex, Mode=TwoWay}" /> | ||||||
| 
 | 
 | ||||||
|                 <mdview:MarkdownView Markdown="{Binding SelectedPlayerCharacter.Background.Description}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Background.Description}" /> | ||||||
| 
 | 
 | ||||||
|                 <mdview:MarkdownView HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSkill.Name}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSkill.Name}" /> | ||||||
|                 <mdview:MarkdownView HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSkill.Description}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSkill.Description}" /> | ||||||
| 
 | 
 | ||||||
|                 <Button Visual="Material" IsVisible="{Binding BackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding BackgroundSpecialtyPickerCommand}" CommandParameter="{Binding BackgroundSpecialties.Result}" /> |                 <Button Visual="Material" IsVisible="{Binding BackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding BackgroundSpecialtyPickerCommand}" CommandParameter="{Binding BackgroundSpecialties.Result}" /> | ||||||
|                 <mdview:MarkdownView HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSpecialty}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.BackgroundSpecialty}" /> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|                  |                  | ||||||
|                  |                  | ||||||
|                 <Picker Title="Variante" HorizontalOptions="FillAndExpand" IsEnabled="{Binding SubBackgrounds.IsSuccessfullyCompleted}" ItemsSource="{Binding SubBackgrounds.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding SubBackgroundSelectedIndex, Mode=TwoWay}" /> |                 <Picker Title="Variante" HorizontalOptions="FillAndExpand" IsEnabled="{Binding SubBackgrounds.IsSuccessfullyCompleted}" ItemsSource="{Binding SubBackgrounds.Result}" ItemDisplayBinding="{Binding Name}" SelectedIndex="{Binding SubBackgroundSelectedIndex, Mode=TwoWay}" /> | ||||||
| 
 | 
 | ||||||
|                 <mdview:MarkdownView Markdown="{Binding SelectedPlayerCharacter.SubBackground.Description}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.SubBackground.Description}" /> | ||||||
| 
 | 
 | ||||||
|                 <mdview:MarkdownView HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Name}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Name}" /> | ||||||
|                 <mdview:MarkdownView HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Description}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSkill.Description}" /> | ||||||
| 
 | 
 | ||||||
|                 <Button Visual="Material" IsVisible="{Binding SubBackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding SubBackgroundSpecialtyPickerCommand}" CommandParameter="{Binding SubBackgroundSpecialties.Result}" /> |                 <Button Visual="Material" IsVisible="{Binding SubBackgroundSpecialties.IsSuccessfullyCompleted}" Text="Spécialité" Command="{Binding SubBackgroundSpecialtyPickerCommand}" CommandParameter="{Binding SubBackgroundSpecialties.Result}" /> | ||||||
|                 <mdview:MarkdownView HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSpecialty}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.SubBackgroundSpecialty}" /> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|                 <Button Visual="Material" IsVisible="{Binding PersonalityTraits.IsSuccessfullyCompleted}" Text="Trait de personnalité" Command="{Binding PersonalityTraitPickerCommand}" CommandParameter="{Binding PersonalityTraits.Result}" /> |                 <views:StringPickerView /> | ||||||
|                 <mdview:MarkdownView IsVisible="{Binding PersonalityTraits.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityTrait}" /> |  | ||||||
| 
 | 
 | ||||||
|                 <Button Visual="Material" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" Text="Idéal" Command="{Binding PersonalityIdealPickerCommand}" CommandParameter="{Binding PersonalityIdeals.Result}" /> |                 <Button Visual="Material" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" Text="Idéal" Command="{Binding PersonalityIdealPickerCommand}" CommandParameter="{Binding PersonalityIdeals.Result}" /> | ||||||
|                 <mdview:MarkdownView IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityIdeal}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityIdeals.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityIdeal}" /> | ||||||
| 
 | 
 | ||||||
|                 <Button Visual="Material" IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" Text="Lien" Command="{Binding PersonalityLinkPickerCommand}" CommandParameter="{Binding PersonalityLinks.Result}" /> |                 <Button Visual="Material" IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" Text="Lien" Command="{Binding PersonalityLinkPickerCommand}" CommandParameter="{Binding PersonalityLinks.Result}" /> | ||||||
|                 <mdview:MarkdownView IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityLink}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityLinks.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityLink}" /> | ||||||
| 
 | 
 | ||||||
|                 <Button Visual="Material" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" Text="Défaut" Command="{Binding PersonalityDefectPickerCommand}" CommandParameter="{Binding PersonalityDefects.Result}" /> |                 <Button Visual="Material" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" Text="Défaut" Command="{Binding PersonalityDefectPickerCommand}" CommandParameter="{Binding PersonalityDefects.Result}" /> | ||||||
|                 <mdview:MarkdownView IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityDefect}" /> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" IsVisible="{Binding PersonalityDefects.IsSuccessfullyCompleted}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.PersonalityDefect}" /> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|                 <!--<mdview:MarkdownView Markdown="{Binding SelectedPlayerCharacter.Background.Markdown}" /> |                 <!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Background.Markdown}" /> | ||||||
|                 <mdview:MarkdownView Markdown="{Binding SelectedPlayerCharacter.SubBackground.Markdown}" />--> |                 <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.SubBackground.Markdown}" />--> | ||||||
|             </StackLayout> |             </StackLayout> | ||||||
|         </ScrollView> |         </ScrollView> | ||||||
|     </ContentPage> |     </ContentPage> | ||||||
|  |  | ||||||
							
								
								
									
										23
									
								
								AideDeJeu/AideDeJeu/Views/StringPickerView.xaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								AideDeJeu/AideDeJeu/Views/StringPickerView.xaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | ||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <ContentView 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" | ||||||
|  |              x:Class="AideDeJeu.Views.StringPickerView"> | ||||||
|  |     <ContentView.Resources> | ||||||
|  |         <ResourceDictionary> | ||||||
|  |             <tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" /> | ||||||
|  |             <tools:NullToFalseConverter x:Key="NullToFalseConverter" /> | ||||||
|  |         </ResourceDictionary> | ||||||
|  |     </ContentView.Resources> | ||||||
|  |     <ContentView.Content> | ||||||
|  |         <StackLayout IsVisible="{Binding PersonalityTraits.IsSuccessfullyCompleted}"> | ||||||
|  |             <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="## [Trait de personnalité](#)" IsEnabled="False" /> | ||||||
|  |             <mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.PersonalityTrait}" /> | ||||||
|  |             <StackLayout.GestureRecognizers> | ||||||
|  |                 <ClickGestureRecognizer Command="{Binding PersonalityTraitPickerCommand}" CommandParameter="{Binding PersonalityTraits.Result}" /> | ||||||
|  |                 <TapGestureRecognizer Command="{Binding PersonalityTraitPickerCommand}" CommandParameter="{Binding PersonalityTraits.Result}" /> | ||||||
|  |             </StackLayout.GestureRecognizers> | ||||||
|  |         </StackLayout> | ||||||
|  |     </ContentView.Content> | ||||||
|  | </ContentView> | ||||||
							
								
								
									
										20
									
								
								AideDeJeu/AideDeJeu/Views/StringPickerView.xaml.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								AideDeJeu/AideDeJeu/Views/StringPickerView.xaml.cs
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | ||||||
|  | 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 | ||||||
|  | { | ||||||
|  |     [XamlCompilation(XamlCompilationOptions.Compile)] | ||||||
|  |     public partial class StringPickerView : ContentView | ||||||
|  |     { | ||||||
|  |         public StringPickerView() | ||||||
|  |         { | ||||||
|  |             InitializeComponent(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez