Exemplo n.º 1
0
        } //   ***  THIS LOAD FUNCTION HAS PURPOSE.  ***   It sets the data in the textboxes to the correct data for the currently slected month.

        private void buttonBackMonthEdit_Click(object sender, EventArgs e)
        {
            var formMonthDisplay = new FormMonthsDisplay(locations, location, year);

            formMonthDisplay.Location      = this.Location;
            formMonthDisplay.StartPosition = FormStartPosition.Manual;
            this.Hide();
            formMonthDisplay.Show();
        } // Creates a copy of the previous form(month display) and sets it to the same location as this form, with the same information as this form has.
        } // Iterates through the relevant data (The years' dates and descriptions) and copies it into row arrays which are then added to the data grid.

        private void buttonDisplay_Click(object sender, EventArgs e)
        {
            int year             = dataGridViewYears.CurrentCellAddress.Y;
            var formMonthDisplay = new FormMonthsDisplay(locations, location, year);

            formMonthDisplay.Location      = this.Location;
            formMonthDisplay.StartPosition = FormStartPosition.Manual;
            this.Hide();
            formMonthDisplay.Show();
        } // Creates a new MonthDisplay form, passes it the index of the current selected location, month and year, the main data structure, and sets it to the current position of the form.