commit dd08b0bd39f0589a689fa2ab99a208db50d55af8 Author: Natlinux81 Date: Wed Feb 23 01:13:13 2022 +0100 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.vs/LotteryApplication/DesignTimeBuild/.dtbcache.v2 b/.vs/LotteryApplication/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..d20f4fc Binary files /dev/null and b/.vs/LotteryApplication/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/LotteryApplication/project-colors.json b/.vs/LotteryApplication/project-colors.json new file mode 100644 index 0000000..36a0296 --- /dev/null +++ b/.vs/LotteryApplication/project-colors.json @@ -0,0 +1,11 @@ +{ + "Version": 1, + "ProjectMap": { + "3c9a4efa-c6c0-4530-a10d-62704ff15490": { + "ProjectGuid": "3c9a4efa-c6c0-4530-a10d-62704ff15490", + "DisplayName": "LotteryApplication", + "ColorIndex": 0 + } + }, + "NextColorIndex": 1 +} \ No newline at end of file diff --git a/.vs/LotteryApplication/v17/.futdcache.v1 b/.vs/LotteryApplication/v17/.futdcache.v1 new file mode 100644 index 0000000..f316c39 Binary files /dev/null and b/.vs/LotteryApplication/v17/.futdcache.v1 differ diff --git a/.vs/LotteryApplication/v17/.suo b/.vs/LotteryApplication/v17/.suo new file mode 100644 index 0000000..5b40fb1 Binary files /dev/null and b/.vs/LotteryApplication/v17/.suo differ diff --git a/LotteryApplication.sln b/LotteryApplication.sln new file mode 100644 index 0000000..07b2990 --- /dev/null +++ b/LotteryApplication.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LotteryApplication", "LotteryApplication\LotteryApplication.csproj", "{3C9A4EFA-C6C0-4530-A10D-62704FF15490}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3C9A4EFA-C6C0-4530-A10D-62704FF15490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C9A4EFA-C6C0-4530-A10D-62704FF15490}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C9A4EFA-C6C0-4530-A10D-62704FF15490}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C9A4EFA-C6C0-4530-A10D-62704FF15490}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5BB19487-9DA3-4028-BFB9-922D5090B9A9} + EndGlobalSection +EndGlobal diff --git a/LotteryApplication/App.xaml b/LotteryApplication/App.xaml new file mode 100644 index 0000000..78a5294 --- /dev/null +++ b/LotteryApplication/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/LotteryApplication/App.xaml.cs b/LotteryApplication/App.xaml.cs new file mode 100644 index 0000000..6a21c3b --- /dev/null +++ b/LotteryApplication/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace LotteryApplication +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/LotteryApplication/AssemblyInfo.cs b/LotteryApplication/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/LotteryApplication/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/LotteryApplication/Core/ObservableObject.cs b/LotteryApplication/Core/ObservableObject.cs new file mode 100644 index 0000000..ba5e788 --- /dev/null +++ b/LotteryApplication/Core/ObservableObject.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace LotteryApplication.Core +{ + internal class ObservableObject : INotifyPropertyChanged + { + public event PropertyChangedEventHandler? PropertyChanged; + + public void OnPropertychanged([CallerMemberName] string name = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); + } + } +} diff --git a/LotteryApplication/Core/RelayCommand.cs b/LotteryApplication/Core/RelayCommand.cs new file mode 100644 index 0000000..f773604 --- /dev/null +++ b/LotteryApplication/Core/RelayCommand.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace LotteryApplication.Core +{ + internal class RelayCommand : ICommand + { + private Action _execute; + private Func _canExecute; + + public event EventHandler CanExecuteChanged + { + add { CommandManager.RequerySuggested += value; } + remove { CommandManager.RequerySuggested -= value; } + } + + public RelayCommand(Action execute, Func canExecute = null) + { + _execute = execute; + _canExecute = canExecute; + } + + public bool CanExecute(object parameter) + { + return _canExecute == null || _canExecute(parameter); + } + + public void Execute(object parameter) + { + _execute(parameter); + } + } +} diff --git a/LotteryApplication/Images/Lottery.png b/LotteryApplication/Images/Lottery.png new file mode 100644 index 0000000..dff29bc Binary files /dev/null and b/LotteryApplication/Images/Lottery.png differ diff --git a/LotteryApplication/LotteryApplication.csproj b/LotteryApplication/LotteryApplication.csproj new file mode 100644 index 0000000..f04e377 --- /dev/null +++ b/LotteryApplication/LotteryApplication.csproj @@ -0,0 +1,25 @@ + + + + WinExe + net5.0-windows + enable + true + + + + + + + + + + + + + + + + + + diff --git a/LotteryApplication/LotteryApplication.csproj.user b/LotteryApplication/LotteryApplication.csproj.user new file mode 100644 index 0000000..891556d --- /dev/null +++ b/LotteryApplication/LotteryApplication.csproj.user @@ -0,0 +1,20 @@ + + + + + + Designer + + + + + Designer + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/LotteryApplication/MainWindow.xaml b/LotteryApplication/MainWindow.xaml new file mode 100644 index 0000000..b761328 --- /dev/null +++ b/LotteryApplication/MainWindow.xaml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + +