private void showSchedule(Schedule task)
        {
            frmScheduleDetails frm = new frmScheduleDetails(task);

            frm.Show();
            frm.FormClosed += (s, events) => Show();
            Hide();
        }
        private void treeNode_OnScheduleClick(object sender, EventArgs e)
        {
            Task task = (Task)treeSchedules.SelectedNode.Tag;
            frmScheduleDetails frm = new frmScheduleDetails(task, true);

            frm.Show();
            frm.FormClosed += (s, events) =>
            {
                treeSchedules.Nodes.Clear();
                buildTree();
                Show();
            };
            Hide();
        }