uploaded full backend brains, no face yet
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
/// <summary>
|
||||
/// Manages navigation between different views.
|
||||
/// </summary>
|
||||
public class NavigationManager
|
||||
{
|
||||
private Stack<Control> navigationHistory = new Stack<Control>(); // Holds previous views
|
||||
@@ -71,4 +74,19 @@ public class NavigationManager
|
||||
{
|
||||
navigationHistory.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Switches directly to the main panel, clearing the navigation history.
|
||||
/// </summary>
|
||||
public void GoToMain()
|
||||
{
|
||||
if (mainPanel != null)
|
||||
{
|
||||
navigationHistory.Clear(); // Clear the navigation history
|
||||
panelContainer.Controls.Clear();
|
||||
panelContainer.Controls.Add(mainPanel);
|
||||
mainPanel.Dock = DockStyle.Fill;
|
||||
mainPanel.BringToFront();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user