diff --git a/.gitignore b/.gitignore index a4d6d9c..2b7e66a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vs/ \ No newline at end of file +.vs/ +CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csprojAssemblyReference.cache diff --git a/CInemaApp/Program.cs b/CInemaApp/Program.cs index 5612e4a..2b48e8f 100644 --- a/CInemaApp/Program.cs +++ b/CInemaApp/Program.cs @@ -1,12 +1,276 @@ using System; +using System.Collections.Generic; +using System.Threading.Tasks.Dataflow; +using System.Windows.Input; namespace CInemaApp { + //List sublist = new List(); + // the 'login screen' that asks whether the current user is an admin or not + public class Login + { + public static void Password() + { + Console.Write("Please enter the password: "); + string pass = Console.ReadLine(); + + if (pass == "Admin") + Admin.Menu(); + else if (pass == "exit") + Environment.Exit(0); //easter egg + else + Console.WriteLine("Wrong input. Please try again"); + Password(); + } + + public static void Question() + { + User.STARS(); + Console.WriteLine("Are you an Admin or User? [A/U]"); + string Answer = Console.ReadLine(); + + //StringComparison.OrdinalIgnoreCase makes sure that the answer gets through despite it being upper or lower case + //Answer.Equals is the same as Answer = "U" + if (Answer.Equals("U", StringComparison.OrdinalIgnoreCase)) + User.Menu(); + else if (Answer.Equals("A", StringComparison.OrdinalIgnoreCase)) + Password(); + else + Question(); + //repeats the question if it isn't answered properly .-. + } + } + + // menu screen for the user + public class User + { + public static void STARS() + { + Console.WriteLine("********************"); + } + public static void bb() + //works as a back button + { + Console.WriteLine("To go back to the main menu, please press Enter."); + string key = Console.ReadLine(); + + if (key == "" + "") //enter + Menu(); + else + bb(); + + } + + public static void Contact() + { + Console.WriteLine("CINEMAPP CONTACT INFO\n"); + Console.WriteLine("Phone number: 06123456789"); + Console.WriteLine("Email: cinemapp@hr.nl\n"); + bb(); + } + public static void Current() + { + bb(); + } + public static void Upcoming() + { + bb(); + } + public static void Prices() + { + Console.WriteLine("MOVIE TICKET PRICES BY AGE\n"); + + Console.WriteLine("REGULAR 2D MOVIES"); + Console.WriteLine("Children up to 11 - $6.00"); + Console.WriteLine("Regular - $11.00"); + Console.WriteLine("Teenagers (aged 12 - 17) and elderly (65+) - $9.00\n"); + + Console.WriteLine("3D MOVIES"); + Console.WriteLine("Children up to 11 - $9.00"); + Console.WriteLine("Regular - $14.00"); + Console.WriteLine("Teenagers (aged 12 - 17) and elderly (65+) - $12.00\n"); + + Console.WriteLine("IMAX/4DX MOVIES"); + Console.WriteLine("Children up to 11 - $11.50"); + Console.WriteLine("Regular - $16.50\n"); + + bb(); + } + public static void Events() + { + bb(); + } + public static void Sally() + { + bb(); + } + public static void Subscribe() + { + bb(); + } + + public static void Choices() + { + string choice = Console.ReadLine(); + switch (choice) + //switch cases are pretty similar to if-else statements, only it looks better and works a bit faster + // also you don't have to deal with 80 else ifs back to back + { + case "1": + STARS(); + Console.WriteLine("Welcome to the current movies page!"); + Current(); + break; // <<<<< needed because switch cases REFUSE to work if the breaks are left out + case "2": + STARS(); + Console.WriteLine("Welcome to the upcoming movies page!"); + Upcoming(); + break; + case "3": + STARS(); + Prices(); + break; + case "4": + STARS(); + Console.WriteLine("Welcome to the events page!"); + Events(); + break; + case "5": + STARS(); + Console.WriteLine("Welcome to sally's cafe page!"); + Sally(); + break; + case "6": + STARS(); + Contact(); + break; + case "7": + STARS(); + Subscribe(); + break; + case "8": + Console.WriteLine("Goodbye."); + Environment.Exit(0); + break; + default: + Console.WriteLine("False input. Try again."); + Choices(); + break; + } + } + + public static void Menu() + { + STARS(); + Console.WriteLine("[1] - Current Movies"); + Console.WriteLine("[2] - Upcoming Movies"); + Console.WriteLine("[3] - Movie Prices"); + Console.WriteLine("[4] - Events"); + Console.WriteLine("[5] - Sally's Café"); + Console.WriteLine("[6] - Contact Information"); + Console.WriteLine("[7] - Cinema Newsletter Subscription"); + Console.WriteLine("[8] - Quit"); + STARS(); + Console.WriteLine("Please choose an option to continue."); + + Choices(); + + } + + } + + // menu screen for the admin + public class Admin + { + public static void Menu() + { + User.STARS(); + Console.WriteLine("[1] - Current Movies"); + Console.WriteLine("[2] - Upcoming Movies"); + Console.WriteLine("[3] - Movie Prices"); + Console.WriteLine("[4] - Events"); + Console.WriteLine("[5] - Sally's Café"); + Console.WriteLine("[6] - Contact Information"); + Console.WriteLine("[7] - Quit"); + User.STARS(); + Console.WriteLine("Please choose an option to continue."); + + Choices(); + } + public static void bb() + //works as a back button + { + Console.WriteLine("To go back to the main menu, please press Enter."); + string key = Console.ReadLine(); + + if (key == "" + "") //enter + Menu(); + else + bb(); + + } + public static void Current() + { + string tc = Console.ReadLine(); + bb(); + } + public static void Upcoming() + { + string tu = Console.ReadLine(); + bb(); + } + public static void Prices() + { + string tp = Console.ReadLine(); + bb(); + } + public static void Events() + { + string te = Console.ReadLine(); + bb(); + } + public static void Sally() + { + string ts = Console.ReadLine(); + bb(); + } + public static void Choices() + { + string choice = Console.ReadLine(); + switch (choice) + { + case "1": + Current(); + break; + case "2": + Upcoming(); + break; + case "3": + Prices(); + break; + case "4": + Events(); + break; + case "5": + Sally(); + break; + case "7": + Console.WriteLine("Goodbye."); + Environment.Exit(0); + break; + default: + Console.WriteLine("False input. Try again."); + Choices(); + break; + } + } + } class Program { static void Main(string[] args) { - Console.WriteLine("Hello World!"); + Login.Question(); + } } } diff --git a/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.deps.json b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.deps.json new file mode 100644 index 0000000..d79df6c --- /dev/null +++ b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.0": { + "CInemaApp/1.0.0": { + "runtime": { + "CInemaApp.dll": {} + } + } + } + }, + "libraries": { + "CInemaApp/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.dll b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.dll new file mode 100644 index 0000000..dc47007 Binary files /dev/null and b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.dll differ diff --git a/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.exe b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.exe new file mode 100644 index 0000000..596ff47 Binary files /dev/null and b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.exe differ diff --git a/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.pdb b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.pdb new file mode 100644 index 0000000..9672fc8 Binary files /dev/null and b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.pdb differ diff --git a/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.runtimeconfig.dev.json b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.runtimeconfig.dev.json new file mode 100644 index 0000000..c290457 --- /dev/null +++ b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.runtimeconfig.dev.json @@ -0,0 +1,8 @@ +{ + "runtimeOptions": { + "additionalProbingPaths": [ + "C:\\Users\\babyg\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\babyg\\.nuget\\packages" + ] + } +} \ No newline at end of file diff --git a/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.runtimeconfig.json b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.runtimeconfig.json new file mode 100644 index 0000000..33ec9d0 --- /dev/null +++ b/CInemaApp/bin/Debug/netcoreapp3.0/CInemaApp.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp3.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "3.0.0" + } + } +} \ No newline at end of file diff --git a/CInemaApp/obj/CInemaApp.csproj.nuget.cache b/CInemaApp/obj/CInemaApp.csproj.nuget.cache index 5ed2999..523d68c 100644 --- a/CInemaApp/obj/CInemaApp.csproj.nuget.cache +++ b/CInemaApp/obj/CInemaApp.csproj.nuget.cache @@ -1,5 +1,5 @@ { "version": 1, - "dgSpecHash": "9ms+ONlTM7CoijfZIBrvdlZWURJpkruBVMtyGqHAEdLcmV1B+HH0MlH+Aftez+ihSQYsIaL1mFgy4GdOVIP9lw==", + "dgSpecHash": "cs2m+fnGSN/zF95hVYcHPlu78E4uumO0+sbOzPdn4VF4OH1NjwnRFceysjjRxj34RVyUQVJwkEua/BN1rXGBSQ==", "success": true } \ No newline at end of file diff --git a/CInemaApp/obj/CInemaApp.csproj.nuget.dgspec.json b/CInemaApp/obj/CInemaApp.csproj.nuget.dgspec.json index cf3360b..590d1b4 100644 --- a/CInemaApp/obj/CInemaApp.csproj.nuget.dgspec.json +++ b/CInemaApp/obj/CInemaApp.csproj.nuget.dgspec.json @@ -1,27 +1,25 @@ { "format": 1, "restore": { - "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\CInemaApp.csproj": {} + "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\CInemaApp.csproj": {} }, "projects": { - "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\CInemaApp.csproj": { + "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\CInemaApp.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\CInemaApp.csproj", + "projectUniqueName": "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\CInemaApp.csproj", "projectName": "CInemaApp", - "projectPath": "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\CInemaApp.csproj", - "packagesPath": "C:\\Users\\Acer\\.nuget\\packages\\", - "outputPath": "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\obj\\", + "projectPath": "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\CInemaApp.csproj", + "packagesPath": "C:\\Users\\babyg\\.nuget\\packages\\", + "outputPath": "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ - "C:\\Users\\Acer\\AppData\\Roaming\\NuGet\\NuGet.Config", - "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + "C:\\Users\\babyg\\AppData\\Roaming\\NuGet\\NuGet.Config" ], "originalTargetFrameworks": [ "netcoreapp3.0" ], "sources": { - "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "https://api.nuget.org/v3/index.json": {} }, "frameworks": { @@ -47,12 +45,30 @@ ], "assetTargetFallback": true, "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[3.0.1, 3.0.1]" + }, + { + "name": "Microsoft.NETCore.App.Host.win-x64", + "version": "[3.0.3, 3.0.3]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[3.0.0, 3.0.0]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[3.0.0, 3.0.0]" + } + ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.0.100\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.201\\RuntimeIdentifierGraph.json" } } } diff --git a/CInemaApp/obj/CInemaApp.csproj.nuget.g.props b/CInemaApp/obj/CInemaApp.csproj.nuget.g.props index 0340cdf..898b449 100644 --- a/CInemaApp/obj/CInemaApp.csproj.nuget.g.props +++ b/CInemaApp/obj/CInemaApp.csproj.nuget.g.props @@ -5,9 +5,9 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Acer\.nuget\packages\ + C:\Users\babyg\.nuget\packages\ PackageReference - 5.3.0 + 5.5.0 $(MSBuildAllProjects);$(MSBuildThisFileFullPath) diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.assets.cache b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.assets.cache index b52fc9a..52a150e 100644 Binary files a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.assets.cache and b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.assets.cache differ diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csproj.CoreCompileInputs.cache b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..045918e --- /dev/null +++ b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +4af7630216278d8ecfe26afd8e2bcafb6f2620da diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csproj.FileListAbsolute.txt b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..63823de --- /dev/null +++ b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csproj.FileListAbsolute.txt @@ -0,0 +1,13 @@ +D:\School\Code\Github\Cinema-App\CInemaApp\bin\Debug\netcoreapp3.0\CInemaApp.exe +D:\School\Code\Github\Cinema-App\CInemaApp\bin\Debug\netcoreapp3.0\CInemaApp.deps.json +D:\School\Code\Github\Cinema-App\CInemaApp\bin\Debug\netcoreapp3.0\CInemaApp.runtimeconfig.json +D:\School\Code\Github\Cinema-App\CInemaApp\bin\Debug\netcoreapp3.0\CInemaApp.runtimeconfig.dev.json +D:\School\Code\Github\Cinema-App\CInemaApp\bin\Debug\netcoreapp3.0\CInemaApp.dll +D:\School\Code\Github\Cinema-App\CInemaApp\bin\Debug\netcoreapp3.0\CInemaApp.pdb +D:\School\Code\Github\Cinema-App\CInemaApp\obj\Debug\netcoreapp3.0\CInemaApp.csprojAssemblyReference.cache +D:\School\Code\Github\Cinema-App\CInemaApp\obj\Debug\netcoreapp3.0\CInemaApp.AssemblyInfoInputs.cache +D:\School\Code\Github\Cinema-App\CInemaApp\obj\Debug\netcoreapp3.0\CInemaApp.AssemblyInfo.cs +D:\School\Code\Github\Cinema-App\CInemaApp\obj\Debug\netcoreapp3.0\CInemaApp.dll +D:\School\Code\Github\Cinema-App\CInemaApp\obj\Debug\netcoreapp3.0\CInemaApp.pdb +D:\School\Code\Github\Cinema-App\CInemaApp\obj\Debug\netcoreapp3.0\CInemaApp.csproj.CoreCompileInputs.cache +D:\School\Code\Github\Cinema-App\CInemaApp\obj\Debug\netcoreapp3.0\CInemaApp.genruntimeconfig.cache diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csprojAssemblyReference.cache b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csprojAssemblyReference.cache index 74fe67b..60bb0c3 100644 Binary files a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csprojAssemblyReference.cache and b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.csprojAssemblyReference.cache differ diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.dll b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.dll new file mode 100644 index 0000000..dc47007 Binary files /dev/null and b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.dll differ diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.exe b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.exe new file mode 100644 index 0000000..596ff47 Binary files /dev/null and b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.exe differ diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.genruntimeconfig.cache b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.genruntimeconfig.cache new file mode 100644 index 0000000..3ac0ec7 --- /dev/null +++ b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.genruntimeconfig.cache @@ -0,0 +1 @@ +328f4b4fb17a823c610727a3f51bc5ac00ef805d diff --git a/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.pdb b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.pdb new file mode 100644 index 0000000..9672fc8 Binary files /dev/null and b/CInemaApp/obj/Debug/netcoreapp3.0/CInemaApp.pdb differ diff --git a/CInemaApp/obj/project.assets.json b/CInemaApp/obj/project.assets.json index a0eadd5..6fb872a 100644 --- a/CInemaApp/obj/project.assets.json +++ b/CInemaApp/obj/project.assets.json @@ -8,26 +8,24 @@ ".NETCoreApp,Version=v3.0": [] }, "packageFolders": { - "C:\\Users\\Acer\\.nuget\\packages\\": {} + "C:\\Users\\babyg\\.nuget\\packages\\": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\CInemaApp.csproj", + "projectUniqueName": "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\CInemaApp.csproj", "projectName": "CInemaApp", - "projectPath": "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\CInemaApp.csproj", - "packagesPath": "C:\\Users\\Acer\\.nuget\\packages\\", - "outputPath": "D:\\documenten\\GitHub\\Cinema-App\\CInemaApp\\obj\\", + "projectPath": "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\CInemaApp.csproj", + "packagesPath": "C:\\Users\\babyg\\.nuget\\packages\\", + "outputPath": "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ - "C:\\Users\\Acer\\AppData\\Roaming\\NuGet\\NuGet.Config", - "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + "C:\\Users\\babyg\\AppData\\Roaming\\NuGet\\NuGet.Config" ], "originalTargetFrameworks": [ "netcoreapp3.0" ], "sources": { - "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "https://api.nuget.org/v3/index.json": {} }, "frameworks": { @@ -53,12 +51,30 @@ ], "assetTargetFallback": true, "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[3.0.1, 3.0.1]" + }, + { + "name": "Microsoft.NETCore.App.Host.win-x64", + "version": "[3.0.3, 3.0.3]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[3.0.0, 3.0.0]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[3.0.0, 3.0.0]" + } + ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.0.100\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.201\\RuntimeIdentifierGraph.json" } } } diff --git a/CInemaApp/obj/project.nuget.cache b/CInemaApp/obj/project.nuget.cache new file mode 100644 index 0000000..81486d0 --- /dev/null +++ b/CInemaApp/obj/project.nuget.cache @@ -0,0 +1,13 @@ +{ + "version": 2, + "dgSpecHash": "huzEJIWbt8BGSG7bmjT0spCp78QqbaJDdk2LffVLY8lgme1XR6RgCm/CsAQOlQR8u5gTfW9fwQqi66Q1CFktxA==", + "success": true, + "projectFilePath": "D:\\School\\Code\\Github\\Cinema-App\\CInemaApp\\CInemaApp.csproj", + "expectedPackageFiles": [ + "C:\\Users\\babyg\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\3.0.1\\microsoft.aspnetcore.app.ref.3.0.1.nupkg.sha512", + "C:\\Users\\babyg\\.nuget\\packages\\microsoft.netcore.app.ref\\3.0.0\\microsoft.netcore.app.ref.3.0.0.nupkg.sha512", + "C:\\Users\\babyg\\.nuget\\packages\\microsoft.netcore.app.host.win-x64\\3.0.3\\microsoft.netcore.app.host.win-x64.3.0.3.nupkg.sha512", + "C:\\Users\\babyg\\.nuget\\packages\\microsoft.windowsdesktop.app.ref\\3.0.0\\microsoft.windowsdesktop.app.ref.3.0.0.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file