rename UKLotto to Lotto to match the national-lottery website

update the launch size of the app window to match the new layout.
This commit is contained in:
onyx-and-iris 2026-02-26 00:03:07 +00:00
parent 46a10812b0
commit 72e7728e8f
6 changed files with 13 additions and 9 deletions

View File

@ -14,11 +14,15 @@
var window = base.CreateWindow(activationState);
const int newWidth = 600;
const int newHeight = 300;
const int newHeight = 750;
window.Width = newWidth;
window.Height = newHeight;
// Optional: Set minimum size to prevent window from being too small
window.MinimumWidth = 400;
window.MinimumHeight = 600;
return window;
}
}

View File

@ -5,7 +5,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Lottery"
Shell.FlyoutBehavior="Disabled"
Title="Lottery Number Generator">
Title="">
<ShellContent
ContentTemplate="{DataTemplate local:MainPage}"

View File

@ -9,7 +9,7 @@
/// <returns>Numbers are returned as a sorted set.</returns>
public static SortedSet<int> Generate(Limits limits)
{
List<int> candidates = Enumerable.Range(limits.Lower, limits.Upper).ToList();
List<int> candidates = [.. Enumerable.Range(limits.Lower, limits.Upper)];
SortedSet<int> numbers = [];
for (int i = 0; i < limits.Count; i++)

View File

@ -5,7 +5,7 @@
/// </summary>
enum KindOfLottery : int
{
Uk,
Lotto,
Euro,
SetForLife,
Thunderball,

View File

@ -13,10 +13,10 @@
}
/// <summary>
/// Concrete UKLotto Lottery class.
/// Concrete Lotto Lottery class.
/// Generates six balls from 1 to 59.
/// </summary>
internal class UKLottoLottery : Lottery
internal class LottoLottery : Lottery
{
protected override Limits Limits { get; } = new(Count: 6, Lower: 1, Upper: 59);
}

View File

@ -3,19 +3,19 @@
public partial class MainPage : ContentPage
{
readonly List<Lottery> Lotteries = [
new UKLottoLottery(),
new LottoLottery(),
new EuroMillionsLottery(),
new SetForLifeLottery(),
new ThunderballLottery()
];
const KindOfLottery DefaultLottery = KindOfLottery.Uk;
const KindOfLottery DefaultLottery = KindOfLottery.Lotto;
Lottery Lottery;
public MainPage()
{
InitializeComponent();
List<string> lottos = ["UK Lotto", "EuroMillions", "Set For Life", "Thunderball"];
List<string> lottos = ["Lotto", "EuroMillions", "Set For Life", "Thunderball"];
LotteryPicker.ItemsSource = lottos;
LotteryPicker.SelectedIndex = (int)DefaultLottery;