private void gridPanel_MouseLeave(object sender, MouseEventArgs e)
        {
            try
            {
                Grid            gridMain = this.Parent as Grid;
                TimetableWindow main     = (((gridMain.Parent as UControl).Parent as Grid).Parent as Grid).Parent as TimetableWindow;

                pnlBackground.Opacity += 0.5;
                int lectures = int.Parse(main.txtNumberofLectures.Text);
                switch (pnlBackground.Background.ToString())
                {
                case red: break;

                case green:
                case yellow:
                case orange:
                    leaveInfluencedChilds(lectures, main);
                    break;

                case gray: break;
                }
                pnlBackground.BorderThickness = new Thickness(0);
            }
            catch (Exception)
            { }
        }
        private void leaveInfluencedChilds(int lectures, TimetableWindow main)
        {
            int breaks = 0;

            switch (lectures % 2)
            {
            case 0:
                breaks = (lectures - 2) / 2;
                break;

            case 1:
                breaks = (lectures - 1) / 2;
                break;
            }

            int             lecturePeriods = 3 * lectures;
            int             endPeriod      = int.Parse(Row) + (3 * lectures) + breaks;
            List <UControl> childs         = main.getChilds().FindAll(x => x.Column == Column && int.Parse(x.Row) > int.Parse(Row) && int.Parse(x.Row) < endPeriod);

            foreach (UControl child in childs)
            {
                child.Opacity += 0.5;
            }
        }