Gestion des placements

master
cldupland 5 years ago
parent f310a99634
commit ae6c4878ce

@ -5746,121 +5746,103 @@ namespace TheGameExtreme.Droid
public const int abc_vector_test = 2131165273;
// aapt resource value: 0x7F07005A
public const int Apple = 2131165274;
public const int ArrowSettingsBack = 2131165274;
// aapt resource value: 0x7F07005B
public const int ArrowSettingsBack = 2131165275;
public const int avd_hide_password = 2131165275;
// aapt resource value: 0x7F07005C
public const int avd_hide_password = 2131165276;
public const int avd_show_password = 2131165276;
// aapt resource value: 0x7F07005D
public const int avd_show_password = 2131165277;
public const int design_bottom_navigation_item_background = 2131165277;
// aapt resource value: 0x7F07005E
public const int design_bottom_navigation_item_background = 2131165278;
public const int design_fab_background = 2131165278;
// aapt resource value: 0x7F07005F
public const int design_fab_background = 2131165279;
public const int design_ic_visibility = 2131165279;
// aapt resource value: 0x7F070060
public const int design_ic_visibility = 2131165280;
public const int design_ic_visibility_off = 2131165280;
// aapt resource value: 0x7F070061
public const int design_ic_visibility_off = 2131165281;
public const int design_password_eye = 2131165281;
// aapt resource value: 0x7F070062
public const int design_password_eye = 2131165282;
public const int design_snackbar_background = 2131165282;
// aapt resource value: 0x7F070063
public const int design_snackbar_background = 2131165283;
public const int EngrenageV1 = 2131165283;
// aapt resource value: 0x7F070064
public const int Engrenage = 2131165284;
public const int HomeIcon = 2131165284;
// aapt resource value: 0x7F070065
public const int EngrenageV1 = 2131165285;
public const int ic_mtrl_chip_checked_black = 2131165285;
// aapt resource value: 0x7F070066
public const int HomeIcon = 2131165286;
// aapt resource value: 0x7F07006A
public const int IconPique = 2131165290;
public const int ic_mtrl_chip_checked_circle = 2131165286;
// aapt resource value: 0x7F070067
public const int ic_mtrl_chip_checked_black = 2131165287;
public const int ic_mtrl_chip_close_circle = 2131165287;
// aapt resource value: 0x7F070068
public const int ic_mtrl_chip_checked_circle = 2131165288;
public const int imagesRules = 2131165288;
// aapt resource value: 0x7F070069
public const int ic_mtrl_chip_close_circle = 2131165289;
public const int mtrl_snackbar_background = 2131165289;
// aapt resource value: 0x7F07006A
public const int mtrl_tabs_default_indicator = 2131165290;
// aapt resource value: 0x7F07006B
public const int imagesRules = 2131165291;
public const int navigation_empty_icon = 2131165291;
// aapt resource value: 0x7F07006C
public const int mtrl_snackbar_background = 2131165292;
public const int notification_action_background = 2131165292;
// aapt resource value: 0x7F07006D
public const int mtrl_tabs_default_indicator = 2131165293;
public const int notification_bg = 2131165293;
// aapt resource value: 0x7F07006E
public const int navigation_empty_icon = 2131165294;
public const int notification_bg_low = 2131165294;
// aapt resource value: 0x7F07006F
public const int notification_action_background = 2131165295;
public const int notification_bg_low_normal = 2131165295;
// aapt resource value: 0x7F070070
public const int notification_bg = 2131165296;
public const int notification_bg_low_pressed = 2131165296;
// aapt resource value: 0x7F070071
public const int notification_bg_low = 2131165297;
public const int notification_bg_normal = 2131165297;
// aapt resource value: 0x7F070072
public const int notification_bg_low_normal = 2131165298;
public const int notification_bg_normal_pressed = 2131165298;
// aapt resource value: 0x7F070073
public const int notification_bg_low_pressed = 2131165299;
public const int notification_icon_background = 2131165299;
// aapt resource value: 0x7F070074
public const int notification_bg_normal = 2131165300;
public const int notification_template_icon_bg = 2131165300;
// aapt resource value: 0x7F070075
public const int notification_bg_normal_pressed = 2131165301;
public const int notification_template_icon_low_bg = 2131165301;
// aapt resource value: 0x7F070076
public const int notification_icon_background = 2131165302;
public const int notification_tile_bg = 2131165302;
// aapt resource value: 0x7F070077
public const int notification_template_icon_bg = 2131165303;
public const int notify_panel_notification_icon_bg = 2131165303;
// aapt resource value: 0x7F070078
public const int notification_template_icon_low_bg = 2131165304;
public const int tooltip_frame_dark = 2131165304;
// aapt resource value: 0x7F070079
public const int notification_tile_bg = 2131165305;
public const int tooltip_frame_light = 2131165305;
// aapt resource value: 0x7F07007A
public const int notify_panel_notification_icon_bg = 2131165306;
// aapt resource value: 0x7F07007B
public const int rules = 2131165307;
// aapt resource value: 0x7F07007C
public const int rulesImg = 2131165308;
// aapt resource value: 0x7F07007D
public const int tooltip_frame_dark = 2131165309;
// aapt resource value: 0x7F07007E
public const int tooltip_frame_light = 2131165310;
// aapt resource value: 0x7F07007F
public const int TrierImageB = 2131165311;
// aapt resource value: 0x7F070080
public const int UsersExiticon = 2131165312;
public const int TrierImageB = 2131165306;
static Drawable()
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

@ -81,12 +81,6 @@
<None Include="Properties\AndroidManifest.xml" />
<AndroidResource Include="Resources\drawable\FontStyle\IndieFlower.ttf" />
<AndroidResource Include="Resources\drawable\FontStyle\LicenceFont.pdf" />
<AndroidResource Include="Resources\drawable\IconPique.ico">
<SubType>
</SubType>
<Generator>
</Generator>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.xml" />
@ -105,15 +99,6 @@
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\drawable\Apple.png">
<SubType>
</SubType>
<Generator>
</Generator>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Engrenage.jpeg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TheGameExtreme\TheGameExtreme.csproj">
@ -130,27 +115,15 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable\EngrenageV1.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\rulesImg.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\rules.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\imagesRules.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\ArrowSettingsBack.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\UsersExiticon.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\HomeIcon.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\TrierImageB.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\TrierImageB.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

@ -79,12 +79,10 @@
<BundleResource Include="Resources\FontStyle\IndieFlower.ttf" />
<BundleResource Include="Resources\FontStyle\ENSOTYPE License &amp; FAQ - DO READ THIS!.pdf" />
<BundleResource Include="Resources\FontStyle\Ruhaniyat DEMO.otf" />
<BundleResource Include="Resources\Apple.png">
<LogicalName>TheGameExtreme.iOS.Resources.Apple.png</LogicalName>
</BundleResource>
<BundleResource Include="Resources\IconPique.ico" />
<BundleResource Include="Resources\IconPique60ptmax.ico" />
<BundleResource Include="IconPique.ico" />
<BundleResource Include="Resources\EngrenageV1.png" />
<BundleResource Include="Resources\imagesRules.png" />
<BundleResource Include="Resources\TrierImageB.ico" />
<BundleResource Include="TrierImageB.ico" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
@ -141,29 +139,12 @@
<Name>TheGameExtreme</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Engrenage.jpeg" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\FontStyle\SIL Open Font License.txt" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\rulesImg.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\rules.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\ArrowSettingsBack.png" />
<BundleResource Include="Resources\UsersExiticon.png" />
<BundleResource Include="Resources\HomeIcon.png" />
<BundleResource Include="Resources\TrierImage.ico" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\TrierImageB.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="TrierImageB.ico" />
</ItemGroup>
<ItemGroup>
<ITunesArtwork Include="iTunesArtwork" />

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.uca.thegameextreme" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application android:label="TheGameExtreme.Android" android:icon="@drawable/IconPique.jpg" android:name="android.app.Application" android:allowBackup="true" android:debuggable="true">
<activity android:configChanges="orientation|screenSize" android:label="TheGameExtreme" android:screenOrientation="landscape" android:theme="@style/MainTheme" android:name="md5c076201c8182e8540d3c086a8691f158.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="md5dcb6eccdc824e0677ffae8ccdde42930.KeepAliveService" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Battery Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.BatteryBroadcastReceiver" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Energy Saver Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.EnergySaverBroadcastReceiver" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Connectivity Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.ConnectivityBroadcastReceiver" />
<provider android:authorities="com.uca.thegameextreme.fileProvider" android:exported="false" android:grantUriPermissions="true" android:name="xamarin.essentials.fileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/xamarin_essentials_fileprovider_file_paths" />
</provider>
<receiver android:enabled="true" android:exported="false" android:name="md51558244f76c53b6aeda52c8a337f2c37.PowerSaveModeBroadcastReceiver" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="1999999999" android:authorities="com.uca.thegameextreme.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.com.uca.thegameextreme" />
</intent-filter>
</receiver>
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 360 KiB

@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.classic
}
else
{
Message = ((JouerUneCarteClassic)gameActions[1]).ErrorMessage;
TestEndGame(currentHand);
if (!end)
{
Message = ((JouerUneCarteClassic)gameActions[1]).ErrorMessage;
}
return false;
}
}

@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.decimals
}
else
{
Message = ((JouerUneCarteDecimal)gameActions[1]).ErrorMessage;
TestEndGame(currentHand);
if (!end)
{
Message = ((JouerUneCarteDecimal)gameActions[1]).ErrorMessage;
}
return false;
}
}

@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.fraction
}
else
{
Message = ((JouerUneCarteFraction)gameActions[1]).ErrorMessage;
TestEndGame(currentHand);
if (!end)
{
Message = ((JouerUneCarteFraction)gameActions[1]).ErrorMessage;
}
return false;
}
}

@ -21,31 +21,26 @@
<StackLayout
Grid.Row="0"
Grid.Column="0">
<ImageButton Source="ArrowSettingsBack.png"
Grid.Column="0"
Orientation="Horizontal">
<ImageButton
Source="ArrowSettingsBack.png"
VerticalOptions="Start"
HorizontalOptions="StartAndExpand"
HeightRequest="40"
WidthRequest="50"
Clicked="Back"
BackgroundColor="Transparent"
Margin="10,5,0,0"/>
</StackLayout>
<StackLayout
Grid.Row="0"
Grid.Column="0">
BackgroundColor="Transparent"/>
<Button
Text="{x:Static resources:AppResources.StrBtnPlay}"
Clicked="Play"
VerticalOptions="Start"
HorizontalOptions="End"
MinimumWidthRequest="30"
WidthRequest="100"
BackgroundColor="{DynamicResource Gold}"
CornerRadius="10"
Margin="0,5,10,0"/>
CornerRadius="10"/>
</StackLayout>

@ -43,6 +43,7 @@ namespace TheGameExtreme.view
IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex);
await Navigation.PopAsync();
}
protected override bool OnBackButtonPressed()
{
IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex);

@ -7,83 +7,80 @@
xmlns:resources="clr-namespace:TheGameExtreme.Resx"
x:Class="TheGameExtreme.view.HomePage">
<StackLayout BackgroundColor="Transparent">
<Grid>
<Grid
Margin="5,5,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="70*"/>
<ColumnDefinition Width="15*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="19*"/>
<RowDefinition Height="27*"/>
<RowDefinition Height="27*"/>
<RowDefinition Height="27*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="70*"/>
<ColumnDefinition Width="15*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="31*"/>
<RowDefinition Height="23*"/>
<RowDefinition Height="23*"/>
<RowDefinition Height="23*"/>
</Grid.RowDefinitions>
<Label
Text="{x:Static resources:AppResources.StrTitle}"
TextColor="{DynamicResource WhiteColor}"
Grid.Row="0" Grid.Column="1"
HorizontalTextAlignment="Center"
FontSize="35"
VerticalTextAlignment="Center"
FontFamily=""/>
<Label
Text="{x:Static resources:AppResources.StrTitle}"
TextColor="{DynamicResource WhiteColor}"
Grid.Row="0"
Grid.Column="1"
HorizontalTextAlignment="Center"
FontSize="45"
VerticalTextAlignment="Start"
FontFamily=""/>
<ImageButton
Source="EngrenageV1.jpeg"
Grid.Row="0" Grid.Column="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End"
HeightRequest="60"
WidthRequest="68"
Clicked="OpenSetting"
BackgroundColor="{DynamicResource BlackColor}"/>
<ImageButton
Source="EngrenageV1.png"
Grid.Row="0"
Grid.Column="2"
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
HeightRequest="60"
WidthRequest="68"
Clicked="OpenSetting"
BackgroundColor="{DynamicResource BlackColor}"/>
<Button
Text="{x:Static resources:AppResources.StrLocalGame}"
FontSize="18"
Grid.Row="1"
Grid.Column="1"
HorizontalOptions="Center"
WidthRequest="230"
HeightRequest="57"
VerticalOptions="Center"
Clicked="OpenGame"
CornerRadius="10"
Margin="15"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
<Button
Text="{x:Static resources:AppResources.StrLocalGame}"
FontSize="18"
Grid.Row="1"
Grid.Column="1"
HorizontalOptions="Center"
WidthRequest="230"
HeightRequest="57"
VerticalOptions="Center"
Clicked="OpenGame"
CornerRadius="10"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
<Button
Text="{x:Static resources:AppResources.StrMultiplayer}"
FontSize="18"
Grid.Row="2"
Grid.Column="1"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="57"
WidthRequest="230"
Clicked="OpenMultiPlayerMode"
CornerRadius="10"
Margin="15"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
<ImageButton
Source="imagesRules.png"
Grid.Column="0"
Grid.Row="0"
HeightRequest="50"
WidthRequest="35"
VerticalOptions="CenterAndExpand"
HorizontalOptions="Start"
Clicked="Rules_Clicked"
BackgroundColor="{DynamicResource BlackColor}"/>
<Button
Text="{x:Static resources:AppResources.StrMultiplayer}"
FontSize="18"
Grid.Row="2"
Grid.Column="1"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="57"
WidthRequest="230"
Clicked="OpenMultiPlayerMode"
CornerRadius="10"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
</Grid>
<ImageButton
Source="imagesRules.png"
Grid.Column="0"
Grid.Row="0"
HeightRequest="50"
WidthRequest="35"
VerticalOptions="StartAndExpand"
HorizontalOptions="Start"
Clicked="Rules_Clicked"
BackgroundColor="{DynamicResource BlackColor}"/>
</StackLayout>
</Grid>
</ContentPage>

@ -12,7 +12,8 @@
x:Class="TheGameExtreme.view.MainPage">
<Grid
x:Name="Display">
x:Name="Display"
Margin="10,10,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="90*"/>

@ -7,8 +7,6 @@ using SkiaSharp;
using SkiaSharp.Views.Forms;
using TouchTracking;
using Xamarin.Essentials;
using System.IO;
using System.Reflection;
using TheGameExtreme.Resx;
namespace TheGameExtreme.view
@ -197,29 +195,26 @@ namespace TheGameExtreme.view
stackCollection.Clear();
SKPaint textPaint = new SKPaint();
SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / (viewmodel.getListOrderedStacks().Count * 2)) + (float)(DeviceDisplay.MainDisplayInfo.Width * 0.01), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.1) + (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.01 + 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width) / (viewmodel.getListOrderedStacks().Count * 2)), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.1) + (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.01 + 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
float inflateWidth;
if (indexMode == 4 || indexMode == 3)
{
inflateWidth = 0.02f * (float)DeviceDisplay.MainDisplayInfo.Width;
inflateWidth = 0.01f * (float)DeviceDisplay.MainDisplayInfo.Width;
}
else
{
inflateWidth = 0.02f * (float)DeviceDisplay.MainDisplayInfo.Width;
}
position.X -= inflateWidth;
for (int i = 0; i < viewmodel.getListOrderedStacks().Count; i++)
{
textPaint = new SKPaint();
float textWidth;
if (indexMode == 2 || indexMode == 5)
{
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
}
else if (indexMode == 3)
if (indexMode == 3)
{
textWidth = textPaint.MeasureText("000");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000");
@ -231,8 +226,8 @@ namespace TheGameExtreme.view
}
else
{
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
textWidth = textPaint.MeasureText(viewmodel.getListOrderedStacks()[i].Peek().Value.ToString());
}
position.X -= textWidth * 0.5f;
@ -243,7 +238,7 @@ namespace TheGameExtreme.view
InitialPoint = position
});
position.X += (float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / viewmodel.getListOrderedStacks().Count) + textWidth * 0.5f;
position.X += (float)((DeviceDisplay.MainDisplayInfo.Width) / viewmodel.getListOrderedStacks().Count);
}
}
@ -254,7 +249,7 @@ namespace TheGameExtreme.view
private void InflateHand()
{
SKPaint textPaint = new SKPaint();
SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / (viewmodel.CurrentHand.Count * 2)) + (float)(DeviceDisplay.MainDisplayInfo.Width * 0.01), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.9) - (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.1 - 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width) / (viewmodel.CurrentHand.Count * 2)), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.9) - (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.1 - 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
float inflateWidth;
if (indexMode == 4 || indexMode == 3)
@ -266,17 +261,14 @@ namespace TheGameExtreme.view
inflateWidth = 0.015f * (float)DeviceDisplay.MainDisplayInfo.Width;
}
position.X -= inflateWidth;
for (int i = 0; i < viewmodel.CurrentHand.Count; i++)
{
textPaint = new SKPaint();
float textWidth;
if (indexMode == 2 || indexMode == 5)
{
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
}
else if (indexMode == 3)
if (indexMode == 3)
{
textWidth = textPaint.MeasureText("000");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000");
@ -288,8 +280,8 @@ namespace TheGameExtreme.view
}
else
{
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
textWidth = textPaint.MeasureText(viewmodel.CurrentHand[i].Value.ToString());
}
position.X -= textWidth * 0.5f;
@ -300,7 +292,7 @@ namespace TheGameExtreme.view
InitialPoint = position
});
position.X += (float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / viewmodel.CurrentHand.Count) + textWidth * 0.5f;
position.X += (float)((DeviceDisplay.MainDisplayInfo.Width) / viewmodel.CurrentHand.Count);
}
}
@ -316,7 +308,7 @@ namespace TheGameExtreme.view
Button retryButton = new Button();
retryButton.Text = "Retry";
retryButton.Clicked += Retry;
retryButton.BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"];
retryButton.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(retryButton);
}
@ -347,6 +339,8 @@ namespace TheGameExtreme.view
viewmodel.EndGame += OnEndGame;
viewmodel.AlertChanged += OnAlertChanged;
pseudo.SetBinding(Label.TextProperty, new Binding("Pseudo", source: viewmodel));
textCollection.Clear();
@ -358,8 +352,8 @@ namespace TheGameExtreme.view
gameOption.Children.Clear();
Button button = new Button();
button.Text = AppResources.StrEndTurn;
button.Clicked += Retry;
button.BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"];
button.Clicked += EndTurn;
button.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(button);
}

@ -33,7 +33,7 @@ namespace TheGameExtreme.view
this.textPaint = textPaint;
Value = value;
this.width = width;
height = 2f * this.width;
height = (0.2f * (float)DeviceDisplay.MainDisplayInfo.Height - textPaint.TextSize) * 0.5f;
if (Value.View.GetType() == typeof(FractionCard))
{
@ -49,7 +49,7 @@ namespace TheGameExtreme.view
{
if (Value.Value.CompareTo(-10m) <= 0)
{
this.width -= textPaint.MeasureText("0") * 0.5f;
this.width -= textPaint.MeasureText("0") * 0.25f;
}
if (Value.Value.CompareTo(0m) >= 0 && Value.Value.CompareTo(10) < 0)
{
@ -109,16 +109,16 @@ namespace TheGameExtreme.view
canvas.DrawRect(card, textPaint1);
if (((FractionCard)Value.View).Fraction.Numerateur < 10 && ((FractionCard)Value.View).Fraction.Numerateur > 0)
{
canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Numerateur.ToString()) * 0.5f, -50, textPaint);
canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Numerateur.ToString()) * 0.5f, - textPaint.TextSize * 0.5f - height * 0.5f, textPaint);
}
else
{
canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), 0, -50, textPaint);
canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), 0, - textPaint.TextSize * 0.5f - height * 0.5f, textPaint);
}
canvas.DrawText("__", textPaint.MeasureText("__") * 0.1f, -textPaint.TextSize * 0.4f, textPaint1);
canvas.DrawText("__", textPaint.MeasureText("__") * 0.1f, -textPaint.TextSize * 0.6f, textPaint1);
if (((FractionCard)Value.View).Fraction.Denominateur < 10 && ((FractionCard)Value.View).Fraction.Denominateur > 0)
{
canvas.DrawText(((FractionCard)Value.View).Fraction.Denominateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Denominateur.ToString()) * 0.5f, 50, textPaint2);
canvas.DrawText(((FractionCard)Value.View).Fraction.Denominateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Denominateur.ToString()) * 0.5f, height * 0.5f, textPaint2);
}
else
{

Loading…
Cancel
Save