private void buttonTasks_Click(object sender, EventArgs e)
        {
            TaskPage page = new TaskPage(-1, userInfo);

            page.FormClosed += Page_FormClosed;
            Hide();
            page.ShowDialog();
        }
        // Show tasks of the selected project
        private void buttonViewTasks_Click(object sender, EventArgs e)
        {
            int projectIndex = listBoxProjects.SelectedIndex;

            if (projectIndex == -1)
            {
                MessageBox.Show("Please select a project");
                return;
            }

            Data.ProjectInfo project = (Data.ProjectInfo)projects[projectIndex];
            TaskPage         page    = new TaskPage(int.Parse(project.projectid), userInfo);

            page.FormClosed += Page_FormClosed;
            Hide();
            page.ShowDialog();
        }