mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 06:26:02 +00:00
PushAsync au lieu de modal pour le pdf
This commit is contained in:
parent
78d8c687fa
commit
c3e41491ef
4 changed files with 13 additions and 22 deletions
|
|
@ -3,31 +3,20 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:views="clr-namespace:AideDeJeu.Views"
|
||||
x:Class="AideDeJeu.Views.PlayerCharacter.PdfViewPage"
|
||||
x:Name="this">
|
||||
x:Name="this"
|
||||
Title="{Binding PdfFile.Result}">
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Icon="share.png" Text="Partager..." Order="Primary" IsEnabled="{Binding PdfFile.IsSuccessfullyCompleted}" Command="{Binding ShareCommand, Source={x:Reference this}}" />
|
||||
</ContentPage.ToolbarItems>
|
||||
<ContentPage.Content>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ImageButton Grid.Column="0" BackgroundColor="White" HeightRequest="32" Margin="5" Source="cancel.png" Command="{Binding CloseCommand, Source={x:Reference this}}"/>
|
||||
<ImageButton Grid.Column="2" BackgroundColor="White" HeightRequest="32" Margin="5" Source="share.png" Command="{Binding ShareCommand, Source={x:Reference this}}"/>
|
||||
<ActivityIndicator
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="3"
|
||||
IsRunning="{Binding PdfFile.IsNotCompleted}"
|
||||
IsVisible="{Binding PdfFile.IsNotCompleted}"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
|
||||
<views:PdfView
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="3"
|
||||
IsVisible="{Binding PdfFile.IsSuccessfullyCompleted}"
|
||||
Uri="{Binding PdfFile.Result}"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ namespace AideDeJeu.Views.PlayerCharacter
|
|||
|
||||
private async Task ExecuteCloseCommandAsync()
|
||||
{
|
||||
await Navigation.PopModalAsync(true);
|
||||
//await Navigation.PopModalAsync(true);
|
||||
await Navigation.PopAsync(true);
|
||||
}
|
||||
|
||||
public ICommand ShareCommand
|
||||
|
|
|
|||
|
|
@ -55,17 +55,18 @@ namespace AideDeJeu.Views.PlayerCharacter
|
|||
{
|
||||
get
|
||||
{
|
||||
return new Command<object>(ExecutePdfViewCommand);
|
||||
return new Command<PlayerCharacterViewModel>(async(pc) => await ExecutePdfViewCommandAsync(pc));
|
||||
}
|
||||
}
|
||||
|
||||
public void ExecutePdfViewCommand(object param)
|
||||
public async Task ExecutePdfViewCommandAsync(PlayerCharacterViewModel pc)
|
||||
{
|
||||
var vm = BindingContext as PlayerCharacterEditorViewModel;
|
||||
var page = new PdfViewPage();
|
||||
page.PdfFile = new Tools.NotifyTaskCompletion<string>(Task.Run(async() => await vm.GeneratePdfAsync(param as PlayerCharacterViewModel)));
|
||||
page.PdfFile = new Tools.NotifyTaskCompletion<string>(Task.Run(async() => await vm.GeneratePdfAsync(pc)));
|
||||
page.BindingContext = page;
|
||||
Navigation.PushModalAsync(page, true);
|
||||
//Navigation.PushModalAsync(page, true);
|
||||
await Navigation.PushAsync(page, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1777,7 +1777,7 @@ _Touché :_ 2 (1d4) dégâts perforants et la cible doit effectuer un jet de sau
|
|||
|
||||
- **Sens** <!--Senses-->vision dans le noir à 18 m, Perception passive +2<!--/Senses-->
|
||||
- **Langues** <!--Languages-->commun, géant<!--/Languages-->
|
||||
- **Puissance** <!--Challenge-->1 (200 PX)<!--/Challenge-->
|
||||
- **Dangerosité** <!--Challenge-->1 (200 PX)<!--/Challenge-->
|
||||
|
||||
## Capacités
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue