-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLaunch.java
More file actions
62 lines (39 loc) · 1.33 KB
/
Copy pathLaunch.java
File metadata and controls
62 lines (39 loc) · 1.33 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
/*
Name: Dhrumil Shah
SID: ******
Group: M.A.R.D.D
Module: Software Principles (2022 MOD003484 TRI2 F01CAM)
Assignment: 011
*/
package dashboard;
import java.io.File;
import java.io.IOException;
public class Launch {
private static final String FILE_SEPARATOR = File.separator;
//Main Method:
public static void main(String[] args) {
CodeUtil.clearScreen();
// Intro:
System.out.println("Welcome To The SQL Code Dashboard\nCreated by Dhrumil Shah.\n");
System.out.println();
CodeUtil.delay(1000);
CodeUtil.clearScreen();
System.out.println("Loading...\n");
FileCreator.go();
CodeUtil.clearScreen();
String path = null;
try {
path = new File(".").getCanonicalPath();
} catch (IOException e) {
System.out.println("Error: while getting the path of the program.");
}
UserData userData = new UserData("", "", "", "", "");
userData.load(path + FILE_SEPARATOR + "dashboard" + FILE_SEPARATOR + "files"+ FILE_SEPARATOR + "users.csv");
CodeUtil.clearScreen();
//Redirect to login:
Login.login(userData.getUsers(),1);
UserData loggedInUser = Session.getLoggedInUser();
//Access homepage after successfully logging in:
Home.page();
}
}