-
Notifications
You must be signed in to change notification settings - Fork 0
/
clsCurrencyMainScreen.h
122 lines (102 loc) · 3.65 KB
/
clsCurrencyMainScreen.h
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
112
113
114
115
116
117
118
119
120
121
#pragma once
#include "clsScreen.h"
#include "clsInputValidate.h"
#include "clsCurrenciesListScreen.h"
#include "clsFindCurrency.h"
#include "clsUpdateCurrencyRate.h"
#include "clsCurrencyCalculatorScreen.h"
class clsCurrencyMainScreen : protected clsScreen
{
private:
enum enCurrencyMenuOptions {
eListCurrencies = 1, eFindCurrency = 2, eUpdateRate= 3,
eCurrencyCalculator = 4, eMainMenu = 5
};
static short _ReadCurrencyMenuOption()
{
cout << setw(37) << left << "";
cout << "Choose do you want to do ?[1 to 5]";
short Choice = clsInputValidate::ReadShortNumberBetween(1, 5, "Enter Number between 1 to 5 :");
return Choice;
}
static void _ShowCurrencyListScreen()
{
/* cout << "\n_Show Currency List will be here.....";*/
clsCurrenciesListScreen::ShowCurrenciesListScreen();
}
static void _ShowFindCurrencyScreen()
{
/* cout << "\n_Show Find Currency will be here.....";*/
clsFindCurrency::ShowFindCurrencyScreen();
}
static void _ShowUpdateRateScreen()
{
/* cout << "\n_Show Update Rate will be here.....";*/
clsUpdateCurrencyRate::ShowUpdateCurrencyRate();
}
static void _ShowCurrencyCalculatorScreen()
{
/* cout << "\n_Show Currency Calculator will be here.....";*/
clsCurrencyCalculatorScreen::ShowCurrencyCalculatorScreen();
}
static void _GoBackToCurrencyMainMenuScreen()
{
/* cout << "\n_Go Back To Main Menu Screen will be here.....";*/
cout << setw(37) << left << "" << "\nPress any key to go Back To Main Menu...\n";
system("pause>0");
ShowCurrencyScreen();
}
static void _PerformanceCurrencyMenuOption(enCurrencyMenuOptions MenuOption)
{
switch (MenuOption)
{
case enCurrencyMenuOptions::eListCurrencies:
{
system("cls");
_ShowCurrencyListScreen();
_GoBackToCurrencyMainMenuScreen();
break;
}
case enCurrencyMenuOptions::eFindCurrency:
{
system("cls");
_ShowFindCurrencyScreen();
_GoBackToCurrencyMainMenuScreen();
break;
}
case enCurrencyMenuOptions::eUpdateRate:
{
system("cls");
_ShowUpdateRateScreen();
_GoBackToCurrencyMainMenuScreen();
break;
}
case enCurrencyMenuOptions::eCurrencyCalculator:
{
system("cls");
_ShowCurrencyCalculatorScreen();
_GoBackToCurrencyMainMenuScreen();
break;
}
case enCurrencyMenuOptions::eMainMenu:
//do nothing here the main screen will handle it :-) ;
break;
}
}
public:
static void ShowCurrencyScreen()
{
system("cls");
_DrawMainScreenHeader("\t Currency Exchange Main Screen");
cout << setw(37) << left << "" << "===========================================\n";
cout << setw(37) << left << "" << "\t\t Currency Exchange Menu\n";
cout << setw(37) << left << "" << "===========================================\n";
cout << setw(37) << left << "" << "\t[1] List Currencies.\n";
cout << setw(37) << left << "" << "\t[2] Find Currnecy.\n";
cout << setw(37) << left << "" << "\t[3] Update Rate.\n";
cout << setw(37) << left << "" << "\t[4] Currency Calculator.\n";
cout << setw(37) << left << "" << "\t[5] Main Menu.\n";
cout << setw(37) << left << "" << "===========================================\n";
_PerformanceCurrencyMenuOption((enCurrencyMenuOptions)_ReadCurrencyMenuOption());
}
};