-
Notifications
You must be signed in to change notification settings - Fork 0
/
clsScreen.h
49 lines (41 loc) · 1.1 KB
/
clsScreen.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
#pragma once
#include "iomanip"
#include "Global.h"
#include "clsDate.h"
#pragma warning(disable : 4996)
#include"clsString.h"
#include "clsUtil.h"
using namespace std;
class clsScreen
{
protected:
static void _DrawMainScreenHeader(string Title , string SubTitle = "")
{
cout << "\t\t\t\t\t----------------------------------";
cout << "\n\n\t\t\t\t " << Title;
if (SubTitle != "")
{
cout << "\n\n\t\t\t\t\t " << SubTitle;
}
cout << setw(37) << left << "" << "\t\t\n";
cout << "\t\t\t\t\t----------------------------------\n";
string RegisterDate = clsDate::DateToString(clsDate());
cout << "\t\t\t\t\tUser:" << CurrentUser.UserName << endl;
cout << "\t\t\t\t\tDate:" << RegisterDate;
cout << "\n\n";
}
static bool CheckAccessRights(clsUser::enPermissions Permission)
{
if (!CurrentUser.CheckAccessPermission(Permission))
{
cout << "\t\t\t\t\t______________________________________";
cout << "\n\n\t\t\t\t\t Access Denied! Contact your Admin.";
cout << "\n\t\t\t\t\t______________________________________\n\n";
return false;
}
else
{
return true;
}
}
};