diff --git a/Advanced Software Engineering/Advanced Software Engineering/Advanced Software Engineering.csproj b/Advanced Software Engineering/Advanced Software Engineering/Advanced Software Engineering.csproj
index cca31bb..a1327ac 100644
--- a/Advanced Software Engineering/Advanced Software Engineering/Advanced Software Engineering.csproj
+++ b/Advanced Software Engineering/Advanced Software Engineering/Advanced Software Engineering.csproj
@@ -12,6 +12,21 @@
512
true
true
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
AnyCPU
@@ -32,6 +47,10 @@
prompt
4
+
+
+
+
@@ -52,7 +71,7 @@
Console.cs
-
+
Form
@@ -89,5 +108,17 @@
+
+
+ False
+ Microsoft .NET Framework 4.7.2 %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
\ No newline at end of file
diff --git a/Advanced Software Engineering/Advanced Software Engineering/Console.cs b/Advanced Software Engineering/Advanced Software Engineering/Console.cs
index b32f29a..bbae546 100644
--- a/Advanced Software Engineering/Advanced Software Engineering/Console.cs
+++ b/Advanced Software Engineering/Advanced Software Engineering/Console.cs
@@ -19,8 +19,8 @@ namespace Advanced_Software_Engineering
private void Console_FormClosed(object sender, FormClosedEventArgs e)
{
- SettingsAndHelperFunctions.NumberOfWindows--;
-
+ SettingsAndHelperFunctions.WindowClosed();
}
+
}
}
diff --git a/Advanced Software Engineering/Advanced Software Engineering/Menu.cs b/Advanced Software Engineering/Advanced Software Engineering/Menu.cs
index 596930d..be9379a 100644
--- a/Advanced Software Engineering/Advanced Software Engineering/Menu.cs
+++ b/Advanced Software Engineering/Advanced Software Engineering/Menu.cs
@@ -41,11 +41,6 @@ namespace Advanced_Software_Engineering
this.Close();
}
- public static void CheckWindows()
- {
- if (SettingsAndHelperFunctions.NumberOfWindows == 0) Menu.Show();
- }
-
private void Menu_Load(object sender, EventArgs e)
{
//Do things on load
diff --git a/Advanced Software Engineering/Advanced Software Engineering/Program.cs b/Advanced Software Engineering/Advanced Software Engineering/Program.cs
index b6f6ba3..bcac0b0 100644
--- a/Advanced Software Engineering/Advanced Software Engineering/Program.cs
+++ b/Advanced Software Engineering/Advanced Software Engineering/Program.cs
@@ -8,6 +8,8 @@ namespace Advanced_Software_Engineering
{
static class Program
{
+ public static Form MainMenu;
+
///
/// The main entry point for the application.
///
@@ -16,7 +18,9 @@ namespace Advanced_Software_Engineering
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Menu());
+
+ MainMenu = new Menu();
+ Application.Run(MainMenu);
}
}
}
diff --git a/Advanced Software Engineering/Advanced Software Engineering/SettingsAndHelperFunctions.cs b/Advanced Software Engineering/Advanced Software Engineering/SettingsAndHelperFunctions.cs
index c5a2b31..d70eb8e 100644
--- a/Advanced Software Engineering/Advanced Software Engineering/SettingsAndHelperFunctions.cs
+++ b/Advanced Software Engineering/Advanced Software Engineering/SettingsAndHelperFunctions.cs
@@ -1,14 +1,20 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
+using System.Windows.Forms;
namespace Advanced_Software_Engineering
{
- class SettingsAndHelperFunctions
+ public class SettingsAndHelperFunctions
{
public static int NumberOfWindows = 0;
+
+ public static void WindowClosed()
+ {
+ NumberOfWindows--;
+ if (NumberOfWindows == 0)
+ {
+ System.Console.WriteLine("Showing MainMenu");
+ Program.MainMenu.Show();
+ }
+
+ }
}
}