private void loginButton_Click(object sender, EventArgs e) { if (username_field.Text == "admin" && password_field.Text == "password") { LandingPanel.Visible = false; FirewallSplitContainer.Visible = true; HomePanel.BringToFront(); } }
private void btn_home_Click(object sender, EventArgs e) { HomePanel.BringToFront(); }
public MainForm() { InitializeComponent(); HomePanel.BringToFront(); }
private void homeButton_Click(object sender, EventArgs e) { // Home button go to welcome page HomePanel.BringToFront(); }
/// <summary> /// Method that is used to switch between the application's different pages. /// </summary> private void ChangePage(int pageNum) { switch (pageNum) { case 0: { HomePanel.Invoke((MethodInvoker)(() => { HomePanel.Visible = true; CompareRatingsButton.Enabled = true; HomePanel.BringToFront(); ComparatorCancelButton.Enabled = false; })); ComparatorResultsPanel.Invoke((MethodInvoker)(() => { ComparatorResultsPanel.Visible = false; })); FollowerStatsResultsPanel.Invoke((MethodInvoker)(() => { FollowerStatsResultsPanel.Visible = false; })); FollowerStatsPanel.Invoke((MethodInvoker)(() => { FollowerStatsPanel.Visible = false; })); RatingComparatorPanel.Invoke((MethodInvoker)(() => { RatingComparatorPanel.Visible = false; })); break; } case 1: { HomePanel.Invoke((MethodInvoker)(() => { HomePanel.Visible = false; })); RatingComparatorPanel.Invoke((MethodInvoker)(() => { RatingComparatorPanel.Enabled = true; RatingComparatorPanel.Visible = true; RatingComparatorPanel.BringToFront(); })); ComparatorResultsPanel.Invoke((MethodInvoker)(() => { ComparatorResultsPanel.Visible = false; })); break; } case 2: { RatingComparatorPanel.Invoke((MethodInvoker)(() => { RatingComparatorPanel.Visible = false; ToggleControls("RatingComparator"); })); ComparatorResultsPanel.Invoke((MethodInvoker)(() => { ComparatorResultsPanel.Visible = true; })); break; } case 3: { HomePanel.Invoke((MethodInvoker)(() => { HomePanel.Visible = false; })); FollowerStatsPanel.Invoke((MethodInvoker)(() => { FollowerStatsPanel.Visible = true; FollowerStatsPanel.BringToFront(); FollowerStatsPanel.Enabled = true; FollowerStatCancelButton.Enabled = false; })); FollowerStatsResultsPanel.Invoke((MethodInvoker)(() => { FollowerStatsResultsPanel.Visible = false; })); break; } case 4: { FollowerStatsPanel.Invoke((MethodInvoker)(() => { FollowerStatsPanel.Visible = false; ToggleControls("FollowerStat"); })); FollowerStatsResultsPanel.Invoke((MethodInvoker)(() => { FollowerStatsResultsPanel.Visible = true; })); break; } } }