Example #1
0
        private void homeButton_Click(object sender, EventArgs e)
        {
            //Create instance of home screen to instert into mainViewPanel
            var homeCustomControl = new homeCustomControl();

            //Navigation highlight
            navShowCurrent.Height = homeButton.Height;
            navShowCurrent.Top    = homeButton.Top;

            //Hide the navigation logo
            logoPicBox.Visible = false;

            //Main display area for user controls
            mainViewPanel.Controls.Clear();
            mainViewPanel.Controls.Add(homeCustomControl);

            //Changes dataGridView Label
            mainDataLabel.Text = "All State Parks";

            //Changes dataGridView viewLabel
            viewLabel.Text = "Select a park and press view to see more information.";

            //Show view button
            viewButton.Visible = true;
            updateTheView();
        }
Example #2
0
        public MainForm()
        {
            var homeCustomControl = new homeCustomControl();

            InitializeComponent();
            this.getParks();
            //Navigation highlight default position
            navShowCurrent.Height = homeButton.Height;
            navShowCurrent.Top    = homeButton.Top;

            mainViewPanel.Controls.Add(homeCustomControl);
        }