This repository was archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
111 lines (98 loc) · 4.12 KB
/
Copy pathProgram.cs
File metadata and controls
111 lines (98 loc) · 4.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
using System;
using System.Threading;
using System.IO;
using BookingFiles;
using BookingFilms;
namespace BookingMain
{
class Program
{
public static void Main(string[] args)
{
while(true) // A while loop that when true which it is always, clears the console and sends the user to the Menu Method
{
Console.Clear();
Menu();
}
}
public static void Menu()
{
BookingFile.CreateDirectory(); // Executes the CreateDirectory Method in the BookingFile Class
BookingFile.CreateFiles(); // Executes the CreateFiles Method in the BookingFile Class
/*
* Gives the user a choice to start the program or see the help menu
* If a user doesn't choose any of the choices they will be brought back
*/
Console.Write("\nCinema Booking System\n\n\n");
Console.Write("Please choose one of the following options:");
Console.Write("\n\n[1] START \n[2] HELP \n\n");
try
{
int choice1 = int.Parse(Console.ReadLine());
if (choice1 == 1)
{
// FILM CHOICES - BookingFim Class
Thread.Sleep(1000);
BookingFilm.Films();
}
else if (choice1 == 2)
{
// HELP MENU
Thread.Sleep(1000);
Help();
}
else
{
// BACK TO MENU
Console.Write("\nIncorrect Option");
Thread.Sleep(2000);
}
}
catch (Exception)
{
// BACK TO MENU
Console.Write("\nIncorrect Option");
Thread.Sleep(2000);
}
}
/*
* The help menu is only given at the start of the program and will contain a bit of help on Choosing Films, Type of Seats and Confirming the Ticket
*/
public static void Help()
{
Console.Clear();
Console.Write("\n==================================================\n\n");
Console.Write("Films: \n\nStart by choosing a film by inputting a number that represents the film then pressing the enter key to confirm your choice. \n\n");
Console.Write("==================================================\n\n");
Console.Write("Type of Seats: \n\nThe different types of seats available are Standard or VIP seats. \nOnce the film has been chosen you will be given the choice of choosing the type of seats, input the number represented next to the seat type and press enter to continue. \nChoose carefully as you will have to wait till you get to the ticket confirmation to be able to start over. \n\n");
Console.Write("==================================================\n\n");
Console.Write("Ticket: \n\nThe ticket confirmation is the last stage, here will be the details of your ticket and will be given a choice to confirm the booking or go back to the menu. \nIf the choice is to go back to the menu and it was done by accident, you will be given another chance to confirm your option. \n\n");
Console.Write("==================================================\n\n");
Console.Write("Please choose the following option:");
Console.Write("\n\n[1] BACK \n\n");
try
{
int choice2 = int.Parse(Console.ReadLine());
if (choice2 == 1)
{
// BACK TO MENU
Thread.Sleep(1000);
}
else
{
// BACK TO HELP
Console.WriteLine();
Thread.Sleep(2000);
Help();
}
}
catch (Exception)
{
// BACK TO HELP
Console.WriteLine();
Thread.Sleep(2000);
Help();
}
}
}
}