diff --git a/Lottery.sln b/Lottery.sln new file mode 100644 index 0000000..16d1618 --- /dev/null +++ b/Lottery.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lottery", "Lottery\Lottery.csproj", "{1695D2A5-8733-4FC4-A090-361AB9E6B030}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1695D2A5-8733-4FC4-A090-361AB9E6B030}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1695D2A5-8733-4FC4-A090-361AB9E6B030}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1695D2A5-8733-4FC4-A090-361AB9E6B030}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {1695D2A5-8733-4FC4-A090-361AB9E6B030}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1695D2A5-8733-4FC4-A090-361AB9E6B030}.Release|Any CPU.Build.0 = Release|Any CPU + {1695D2A5-8733-4FC4-A090-361AB9E6B030}.Release|Any CPU.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DED38B08-45CE-4155-8CAC-05742FBF5375} + EndGlobalSection +EndGlobal diff --git a/Lottery/App.xaml b/Lottery/App.xaml new file mode 100644 index 0000000..4793086 --- /dev/null +++ b/Lottery/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/Lottery/App.xaml.cs b/Lottery/App.xaml.cs new file mode 100644 index 0000000..4bf6709 --- /dev/null +++ b/Lottery/App.xaml.cs @@ -0,0 +1,12 @@ +namespace Lottery +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } + } +} diff --git a/Lottery/AppShell.xaml b/Lottery/AppShell.xaml new file mode 100644 index 0000000..cc5706d --- /dev/null +++ b/Lottery/AppShell.xaml @@ -0,0 +1,15 @@ + + + + + + diff --git a/Lottery/AppShell.xaml.cs b/Lottery/AppShell.xaml.cs new file mode 100644 index 0000000..3f67ae2 --- /dev/null +++ b/Lottery/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace Lottery +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} diff --git a/Lottery/Generator.cs b/Lottery/Generator.cs new file mode 100644 index 0000000..879d715 --- /dev/null +++ b/Lottery/Generator.cs @@ -0,0 +1,53 @@ +namespace Lottery +{ + /// + /// + /// + class UKGenerator : IGenerator + { + public int Count { get; } = 6; + + public List Generate() + { + List numbers = []; + for (int i = 0; i < Count; i++) + { + numbers.Add(Random.Shared.Next(60)); + } + return numbers; + } + } + + /// + /// + /// + class EuroGenerator : IGenerator + { + public int Count { get; } = 8; + + public List Generate() + { + List numbers = []; + for (int i = 0; i < Count; i++) + { + numbers.Add(Random.Shared.Next(60)); + } + return numbers; + } + } + + class SetForLifeGenerator : IGenerator + { + public int Count { get; } = 10; + + public List Generate() + { + List numbers = []; + for (int i = 0; i < Count; i++) + { + numbers.Add(Random.Shared.Next(60)); + } + return numbers; + } + } +} diff --git a/Lottery/IGenerator.cs b/Lottery/IGenerator.cs new file mode 100644 index 0000000..4892400 --- /dev/null +++ b/Lottery/IGenerator.cs @@ -0,0 +1,12 @@ +namespace Lottery +{ + /// + /// + /// + interface IGenerator + { + int Count { get; } + + List Generate(); + } +} diff --git a/Lottery/KindOfLotto.cs b/Lottery/KindOfLotto.cs new file mode 100644 index 0000000..49b9944 --- /dev/null +++ b/Lottery/KindOfLotto.cs @@ -0,0 +1,9 @@ +namespace Lottery +{ + enum KindOfLotto : int + { + Uk, + Euro, + SetForLife, + } +} diff --git a/Lottery/Lottery.csproj b/Lottery/Lottery.csproj new file mode 100644 index 0000000..dea6831 --- /dev/null +++ b/Lottery/Lottery.csproj @@ -0,0 +1,65 @@ + + + + net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 + + + + + + + Exe + Lottery + true + true + enable + enable + + + Lottery + + + com.companyname.lottery + + + 1.0 + 1 + + 11.0 + 13.1 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Lottery/MainPage.xaml b/Lottery/MainPage.xaml new file mode 100644 index 0000000..e693811 --- /dev/null +++ b/Lottery/MainPage.xaml @@ -0,0 +1,18 @@ + + + + + + + +