mirror of
https://github.com/onyx-and-iris/Lottery.git
synced 2024-11-24 23:10:49 +00:00
Set a default app size
update the window title
This commit is contained in:
parent
a32b1a65a4
commit
7d1525804e
@ -8,5 +8,18 @@
|
|||||||
|
|
||||||
MainPage = new AppShell();
|
MainPage = new AppShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override Window CreateWindow(IActivationState? activationState)
|
||||||
|
{
|
||||||
|
var window = base.CreateWindow(activationState);
|
||||||
|
|
||||||
|
const int newWidth = 800;
|
||||||
|
const int newHeight = 300;
|
||||||
|
|
||||||
|
window.Width = newWidth;
|
||||||
|
window.Height = newHeight;
|
||||||
|
|
||||||
|
return window;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:local="clr-namespace:Lottery"
|
xmlns:local="clr-namespace:Lottery"
|
||||||
Shell.FlyoutBehavior="Disabled"
|
Shell.FlyoutBehavior="Disabled"
|
||||||
Title="Lottery">
|
Title="">
|
||||||
|
|
||||||
<ShellContent
|
<ShellContent
|
||||||
Title="Home"
|
Title="Lottery Number Picker"
|
||||||
ContentTemplate="{DataTemplate local:MainPage}"
|
ContentTemplate="{DataTemplate local:MainPage}"
|
||||||
Route="MainPage" />
|
Route="MainPage" />
|
||||||
|
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
class SetForLifeGenerator : IGenerator
|
class SetForLifeGenerator : IGenerator
|
||||||
{
|
{
|
||||||
public int Count { get; } = 10;
|
public int Count { get; } = 10;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
Spacing="25">
|
Spacing="25">
|
||||||
<Picker x:Name="LottoPicker" Title="Kind of Lotto" SelectedIndexChanged="LottoPicker_SelectedIndexChanged" />
|
<Picker x:Name="LottoPicker" Title="Kind of Lotto" SelectedIndexChanged="LottoPicker_SelectedIndexChanged" />
|
||||||
|
|
||||||
<Label x:Name="Numbers" Text="Numbers:" />
|
<Label x:Name="Numbers" Text="Numbers: (Click Spin button to generate)" />
|
||||||
|
|
||||||
<Button x:Name="SpinButton" Text="Spin" Clicked="SpinButton_Clicked"/>
|
<Button x:Name="SpinButton" Text="Spin" Clicked="SpinButton_Clicked"/>
|
||||||
</VerticalStackLayout>
|
</VerticalStackLayout>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public partial class MainPage : ContentPage
|
public partial class MainPage : ContentPage
|
||||||
{
|
{
|
||||||
List<IGenerator> generators = [new UKGenerator(), new EuroGenerator(), new SetForLifeGenerator()];
|
readonly List<IGenerator> generators = [new UKGenerator(), new EuroGenerator(), new SetForLifeGenerator()];
|
||||||
IGenerator generator;
|
IGenerator generator;
|
||||||
const KindOfLotto DEFAULT_GENERATOR = KindOfLotto.Uk;
|
const KindOfLotto DEFAULT_GENERATOR = KindOfLotto.Uk;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user