Skip to content

Commit 4bdde2b

Browse files
committed
Remove code that runs login screen
1 parent 3319bc5 commit 4bdde2b

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

MyHome.UI/Program.cs

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,40 @@ static void Main()
1717
Application.SetCompatibleTextRenderingDefault(false);
1818
Globals.LogFiles["ProgramActivityLog"].AddMessage("The program was started at: " + DateTime.Now);
1919

20+
Application.Run(new MenuMDIUI());
21+
22+
// With the current configuration there is no login needed.
23+
// The code is left as it may change soon, and while we do have source control it will be easier to simply uncomment this
2024
// If the settings for connecting to the database are not set yet
21-
if (!Globals.SettingFiles["DatabaseSettings"].AreSettingsSet(
22-
new List<string>() { "Database Name", "User Id", "Password" }))
23-
{
24-
// Intializes and runs an instance of the login form
25-
Login connecting = new Login();
26-
Application.Run(connecting);
25+
//if (!Globals.SettingFiles["DatabaseSettings"].AreSettingsSet(
26+
// new List<string>() { "Database Name", "User Id", "Password" }))
27+
//{
28+
// // Intializes and runs an instance of the login form
29+
// Login connecting = new Login();
30+
// Application.Run(connecting);
2731

28-
// If the user enters correct connection parameters
29-
if (connecting.ConnectionSuccess)
30-
{
31-
// Runs the main application
32-
Application.Run(new MenuMDIUI());
33-
}
34-
}
35-
// If the database settings where previously set
36-
else
37-
{
38-
// Getse all the settings
39-
Dictionary<string, string> allSettings =
40-
Globals.SettingFiles["DatabaseSettings"].GetAllSettings();
32+
// // If the user enters correct connection parameters
33+
// if (connecting.ConnectionSuccess)
34+
// {
35+
// // Runs the main application
36+
// Application.Run(new MenuMDIUI());
37+
// }
38+
//}
39+
//// If the database settings where previously set
40+
//else
41+
//{
42+
// // Getse all the settings
43+
// Dictionary<string, string> allSettings =
44+
// Globals.SettingFiles["DatabaseSettings"].GetAllSettings();
4145

42-
// Sets the local variables with the parameters saved in the database
43-
Globals.DataBaseName = allSettings["Database Name"];
44-
Globals.UserId = allSettings["User Id"];
45-
Globals.Password = allSettings["Password"];
46+
// // Sets the local variables with the parameters saved in the database
47+
// Globals.DataBaseName = allSettings["Database Name"];
48+
// Globals.UserId = allSettings["User Id"];
49+
// Globals.Password = allSettings["Password"];
4650

47-
// Runs the main application
48-
Application.Run(new MenuMDIUI());
49-
}
51+
// // Runs the main application
52+
// Application.Run(new MenuMDIUI());
53+
//}
5054

5155
Globals.LogFiles["ProgramActivityLog"].AddMessage("The program was closed at: " + DateTime.Now);
5256
}

0 commit comments

Comments
 (0)