Exemplo n.º 1
0
        private void loadLecturers()
        {
            MySqlCommand command = new MySqlCommand("SELECT lecturer_email FROM lecturer_info", databaseConnection);

            command.Connection = databaseConnection;
            DataSet          dataset = new DataSet();
            MySqlDataAdapter adp     = new MySqlDataAdapter(command);

            adp.Fill(dataset);

            foreach (DataTable table in dataset.Tables)
            {
                foreach (DataRow row in table.Rows)
                {
                    foreach (object item in row.ItemArray)
                    {
                        Guna2HtmlLabel recipients = new Guna2HtmlLabel();
                        recipients.Text = item.ToString();
                        recipients.Font = new Font("SegoeUI", 10);
                        flowLayoutPanel1.Controls.Add(recipients);
                        //   hello += item + ", ";
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void guna2Button3_Click(object sender, EventArgs e)
        {
            button3Clicked         = true;
            attachment.Title       = "Browse a file to send";
            attachment.Multiselect = true;
            //attachment.ShowDialog();

            if (attachment.ShowDialog() == DialogResult.OK)
            {
                foreach (String file in attachment.FileNames)
                {
                    try
                    {
                        if ((myStream = attachment.OpenFile()) != null)
                        {
                            using (myStream)
                            {
                                Guna2HtmlLabel newFilename = new Guna2HtmlLabel();
                                newFilename.Text      = Path.GetFileName(file);
                                newFilename.ForeColor = Color.FromArgb(94, 148, 255);
                                newFilename.Font      = new Font("SegoeUI", 10);
                                flowLayoutPanel2.Controls.Add(newFilename);
                            }
                        }
                    }
                    catch (System.Exception ex)
                    {
                        MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
                    }
                }
            }
        }
        private void createLecturerSlot(FlowLayoutPanel control_panel_slot, DataRow dr, int lay, int lcy, int lhy, int stry, int intakey, int height)
        {
            Guna2Panel panel_slot = new Guna2Panel();

            panel_slot.BackColor = Color.White;
            panel_slot.ShadowDecoration.Color   = Color.Black;
            panel_slot.ShadowDecoration.Depth   = 5;
            panel_slot.ShadowDecoration.Enabled = true;
            panel_slot.ShadowDecoration.Shadow  = new Padding(10, 10, 10, 10);
            panel_slot.Size = new Size(204, height);

            Guna2HtmlLabel lecture_abbr = new Guna2HtmlLabel();

            lecture_abbr.Text      = dr["lecture_abbr"].ToString();
            lecture_abbr.Font      = new Font("Segoe UI Semibold", 12);
            lecture_abbr.ForeColor = Color.FromArgb(100, 88, 255);
            lecture_abbr.Location  = new Point(10, lay);

            Guna2HtmlLabel lecture_code = new Guna2HtmlLabel();

            lecture_code.Text      = dr["lecture_code"].ToString();
            lecture_code.Font      = new Font("Segoe UI", 9);
            lecture_code.ForeColor = Color.Orange;
            lecture_code.Location  = new Point(153, lcy);

            Guna2HtmlLabel lecture_hall = new Guna2HtmlLabel();

            lecture_hall.Text          = "Lecture Hall :- " + dr["lecture_hall"].ToString();
            lecture_hall.AutoSize      = false;
            lecture_hall.Size          = new Size(194, 17);
            lecture_hall.TextAlignment = ContentAlignment.MiddleRight;
            lecture_hall.Font          = new Font("Segoe UI", 9);
            lecture_hall.ForeColor     = Color.Tomato;
            lecture_hall.Location      = new Point(0, lhy);

            Guna2HtmlLabel str = new Guna2HtmlLabel();

            str.Text      = "STR: " + dr["strength"].ToString();
            str.Font      = new Font("Segoe UI", 9);
            str.ForeColor = Color.DimGray;
            str.Location  = new Point(107, stry);

            Guna2HtmlLabel intake = new Guna2HtmlLabel();

            intake.Text      = "Intake: " + dr["intake"].ToString();
            intake.Font      = new Font("Segoe UI Semibold", 12);
            intake.ForeColor = Color.Black;
            intake.Location  = new Point(10, intakey);

            panel_slot.Controls.Add(lecture_abbr);
            panel_slot.Controls.Add(lecture_code);
            panel_slot.Controls.Add(lecture_hall);
            panel_slot.Controls.Add(str);
            panel_slot.Controls.Add(intake);

            control_panel_slot.Controls.Add(panel_slot);
        }
        private void setIntakes(string intake, string no)
        {
            Guna2ImageButton deleteBtn = new Guna2ImageButton();

            deleteBtn.Image                = Resources.remove;
            deleteBtn.Name                 = intake;
            deleteBtn.Size                 = new Size(22, 22);
            deleteBtn.Location             = new Point(168, 14);
            deleteBtn.HoverState.ImageSize = new Size(22, 22);
            deleteBtn.Click               += new EventHandler(deleteBtn_Click);

            Guna2Panel back_panel = new Guna2Panel();

            back_panel.Name      = intake;
            back_panel.Tag       = deleteBtn;
            back_panel.FillColor = Color.White;
            back_panel.BackColor = Color.White;
            back_panel.Size      = new Size(200, 160);
            back_panel.ShadowDecoration.Depth        = 5;
            back_panel.ShadowDecoration.Color        = Color.Black;
            back_panel.ShadowDecoration.BorderRadius = 0;
            back_panel.Margin = new Padding(20, 3, 3, 3);
            back_panel.ShadowDecoration.Shadow  = new Padding(5, 5, 5, 5);
            back_panel.ShadowDecoration.Enabled = true;

            Guna2Panel top_panel = new Guna2Panel();

            top_panel.FillColor = Color.FromArgb(100, 88, 255);
            top_panel.BackColor = Color.FromArgb(100, 88, 255);
            top_panel.Dock      = DockStyle.Top;
            top_panel.Size      = new Size(200, 50);

            Guna2HtmlLabel intake_name = new Guna2HtmlLabel();

            intake_name.Text      = "Intake " + intake;
            intake_name.Font      = new Font("Segoe UI", 12);
            intake_name.ForeColor = Color.White;
            intake_name.Location  = new Point(60, 12);

            Guna2HtmlLabel count = new Guna2HtmlLabel();

            count.Text      = no;
            count.ForeColor = Color.Black;
            count.Font      = new Font("Segoe UI", 18);
            count.Location  = new Point(84, 84);

            top_panel.Controls.Add(intake_name);
            top_panel.Controls.Add(deleteBtn);
            back_panel.Controls.Add(count);
            back_panel.Controls.Add(top_panel);
            intakes_flowlayout_panel.Controls.Add(back_panel);
        }
        public void GetAllCalendarItems()
        {
            Microsoft.Office.Interop.Outlook.Application oApp = null;
            NameSpace  mapiNamespace        = null;
            MAPIFolder CalendarFolder       = null;
            Items      outlookCalendarItems = null;

            oApp                 = new Microsoft.Office.Interop.Outlook.Application();
            mapiNamespace        = oApp.GetNamespace("MAPI");;
            CalendarFolder       = mapiNamespace.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
            outlookCalendarItems = CalendarFolder.Items;
            outlookCalendarItems.IncludeRecurrences = true;

            foreach (AppointmentItem item in outlookCalendarItems)
            {
                if (item.IsRecurring)
                {
                    RecurrencePattern rp   = item.GetRecurrencePattern();
                    DateTime          date = DateTime.Now;

                    DateTime        first = new DateTime((int)date.Year, (int)date.Month, (int)date.Day, item.Start.Hour, item.Start.Minute, 0);
                    DateTime        last  = new DateTime((int)date.Year, (int)date.Month, (int)date.Day);
                    AppointmentItem recur = null;

                    for (DateTime cur = first; cur <= last; cur = cur.AddDays(1))
                    {
                        try
                        {
                            recur = rp.GetOccurrence(cur);
                            //MessageBox.Show(recur.Subject + " -> " + cur.ToLongDateString());
                        }
                        catch
                        { }
                    }
                }
                else
                {
                    Guna2Panel panel = new Guna2Panel();
                    panel.BackColor = Color.White;
                    panel.Size      = new Size(1080, 50);
                    Guna2HtmlLabel message = new Guna2HtmlLabel();
                    message.Text      = item.Subject + " --> " + item.Start.ToLongDateString();
                    message.Font      = new Font("SegoeUI", 10);
                    message.Location  = new Point(0, 15);
                    message.ForeColor = Color.FromArgb(71, 69, 94);
                    panel.Controls.Add(message);

                    //flowLayoutPanel3.Controls.Add(panel);
                    //MessageBox.Show(item.Subject + " -> " + item.Start.ToLongDateString());
                }
            }
        }
Exemplo n.º 6
0
        private void createPanel(DataRow dr)
        {
            Guna2Panel back_panel = new Guna2Panel();

            back_panel.BackColor = Color.White;
            back_panel.Size      = new Size(250, 225);
            back_panel.Margin    = new Padding(10, 37, 10, 10);
            back_panel.Padding   = new Padding(5, 5, 5, 5);

            Guna2Panel top_panel = new Guna2Panel();

            top_panel.BackColor = Color.WhiteSmoke;
            top_panel.Dock      = DockStyle.Top;
            top_panel.Size      = new Size(240, 86);
            top_panel.ShadowDecoration.Depth   = 5;
            top_panel.ShadowDecoration.Shadow  = new Padding(3, 3, 3, 0);
            top_panel.ShadowDecoration.Enabled = true;

            Guna2Panel bottom_panel = new Guna2Panel();

            bottom_panel.BackColor = Color.WhiteSmoke;
            bottom_panel.Dock      = DockStyle.Bottom;
            bottom_panel.Size      = new Size(240, 127);
            bottom_panel.ShadowDecoration.Depth   = 5;
            bottom_panel.ShadowDecoration.Shadow  = new Padding(3, 0, 3, 3);
            bottom_panel.ShadowDecoration.Enabled = true;

            Guna2PictureBox profile_pic = new Guna2PictureBox();

            profile_pic.Size     = new Size(60, 60);
            profile_pic.SizeMode = PictureBoxSizeMode.Zoom;
            profile_pic.Location = new Point(20, 13);
            profile_pic.Image    = Resources.default_profile_pic;
            //Get profile pic
            //databaseConnection.Open();
            //MySqlCommand cmd = databaseConnection.CreateCommand();
            //cmd.CommandType = CommandType.Text;
            //cmd.CommandText = "select student_profile_pic from student_info WHERE student_reg_no = '" + dr["student_reg_no"].ToString() + "'";
            //cmd.ExecuteNonQuery();
            //DataTable dt = new DataTable();
            //MySqlDataAdapter sda = new MySqlDataAdapter(cmd);
            //sda.Fill(dt);
            //int i = dt.Rows.Count;
            //if (i > 0)
            //{
            //    String selectQuery = "SELECT student_profile_pic FROM student_info WHERE student_reg_no = '" + dr["student_reg_no"].ToString() + "'";
            //    MySqlCommand command = new MySqlCommand(selectQuery, databaseConnection);
            //    MySqlDataAdapter da = new MySqlDataAdapter(command);
            //    DataTable table = new DataTable();
            //    da.Fill(table);
            //    byte[] img = (byte[])table.Rows[0]["student_profile_pic"];
            //    MemoryStream ms = new MemoryStream(img);
            //    profile_pic.Image = Image.FromStream(ms);
            //   da.Dispose();
            //}
            //else
            //{
            //    profile_pic.Image = Resources.default_profile_pic;
            //}
            //databaseConnection.Close();
            //

            Guna2HtmlLabel student_name = new Guna2HtmlLabel();

            student_name.ForeColor = Color.Black;
            student_name.Font      = new Font("Segoe UI Semibold", 10);
            student_name.Location  = new Point(86, 21);
            student_name.Text      = dr["student_name"].ToString();

            Guna2HtmlLabel index_no = new Guna2HtmlLabel();

            index_no.Font      = new Font("Segoe UI", 10);
            index_no.ForeColor = Color.DimGray;
            index_no.Location  = new Point(86, 46);
            index_no.Text      = dr["student_reg_no"].ToString();

            Guna2PictureBox mail_pic = new Guna2PictureBox();

            mail_pic.Image    = Resources.mail;
            mail_pic.Size     = new Size(20, 20);
            mail_pic.SizeMode = PictureBoxSizeMode.Zoom;
            mail_pic.Location = new Point(40, 32);

            Guna2PictureBox phone_pic = new Guna2PictureBox();

            phone_pic.Image    = Resources.phone;
            phone_pic.Size     = new Size(20, 20);
            phone_pic.SizeMode = PictureBoxSizeMode.Zoom;
            phone_pic.Location = new Point(40, 71);

            Guna2HtmlLabel email = new Guna2HtmlLabel();

            email.ForeColor = Color.DimGray;
            email.Font      = new Font("Segoe UI", 9);
            email.Location  = new Point(69, 33);
            email.Text      = dr["student_email"].ToString();

            Guna2HtmlLabel phone = new Guna2HtmlLabel();

            phone.ForeColor = Color.DimGray;
            phone.Font      = new Font("Segoe UI", 9);
            phone.Location  = new Point(69, 73);
            phone.Text      = dr["student_mobile"].ToString();

            back_panel.Controls.Add(top_panel);
            back_panel.Controls.Add(bottom_panel);
            top_panel.Controls.Add(profile_pic);
            top_panel.Controls.Add(index_no);
            top_panel.Controls.Add(student_name);

            bottom_panel.Controls.Add(mail_pic);
            bottom_panel.Controls.Add(email);
            bottom_panel.Controls.Add(phone);
            bottom_panel.Controls.Add(phone_pic);

            students_layout.Controls.Add(back_panel);
        }
Exemplo n.º 7
0
        private void getLecturers()
        {
            databaseConnection.Open();
            MySqlCommand cmd = databaseConnection.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "select lecturer_name,lecturer_email,lecturer_mobile,lecturer_profile_pic from lecturer_info";
            cmd.ExecuteNonQuery();
            DataTable        dt  = new DataTable();
            MySqlDataAdapter sda = new MySqlDataAdapter(cmd);

            sda.Fill(dt);
            foreach (DataRow row in dt.Rows)
            {
                Guna2Panel panel = new Guna2Panel();
                panel.Size = new Size(1053, 100);
                Guna2HtmlLabel lecturer_name = new Guna2HtmlLabel();
                lecturer_name.Text     = row["lecturer_name"].ToString();
                lecturer_name.Location = new Point(126, 22);

                Guna2HtmlLabel email = new Guna2HtmlLabel();
                email.Text     = "Email";
                email.Location = new Point(126, 64);
                Guna2HtmlLabel mobile = new Guna2HtmlLabel();
                mobile.Text     = "Mobile Number";
                mobile.Location = new Point(333, 64);

                LinkLabel email_address = new LinkLabel();
                email_address.Text     = row["lecturer_email"].ToString();
                email_address.Location = new Point(160, 64);

                LinkLabel mobile_number = new LinkLabel();
                mobile_number.Text     = row["lecturer_mobile"].ToString();
                mobile_number.Location = new Point(413, 64);

                Guna2PictureBox profile_pic = new Guna2PictureBox();
                profile_pic.Size     = new Size(100, 100);
                profile_pic.SizeMode = PictureBoxSizeMode.Zoom;
                profile_pic.Dock     = DockStyle.Left;
                profile_pic.Image    = Resources.default_profile_pic;
                //if (string.IsNullOrEmpty(row["lecturer_profile_pic"].ToString()))
                //{
                //    profile_pic.Image = Resources.download__1_;
                //}
                //else
                //{
                //    byte[] img = (byte[])row["lecturer_profile_pic"];
                //    MemoryStream ms = new MemoryStream(img);
                //    Image imgs = Image.FromStream(ms);
                //    profile_pic.Image = imgs;
                //}

                panel.Controls.Add(lecturer_name);
                panel.Controls.Add(email);
                panel.Controls.Add(mobile);
                panel.Controls.Add(email_address);
                panel.Controls.Add(mobile_number);
                panel.Controls.Add(profile_pic);

                flowLayoutPanel1.Controls.Add(panel);
            }
        }
        private void createSlot(DataRow dr)
        {
            Guna2Panel lecture_panel = new Guna2Panel();

            lecture_panel.BackColor = Color.White;
            lecture_panel.ShadowDecoration.Color   = Color.Black;
            lecture_panel.ShadowDecoration.Depth   = 5;
            lecture_panel.ShadowDecoration.Enabled = true;
            lecture_panel.ShadowDecoration.Shadow  = new Padding(5, 5, 5, 5);
            lecture_panel.Size = new Size(300, 270);

            Guna2HtmlLabel time_slot = new Guna2HtmlLabel();

            time_slot.Text      = dr["time_slot"].ToString();
            time_slot.Font      = new Font("Segoe UI Semibold", 14);
            time_slot.ForeColor = Color.DimGray;
            time_slot.Location  = new Point(18, 34);

            Guna2HtmlLabel str = new Guna2HtmlLabel();

            str.Text      = "Strength - " + dr["strength"].ToString();
            str.Font      = new Font("Segoe UI", 10);
            str.ForeColor = Color.DimGray;
            str.Location  = new Point(18, 162);

            Guna2HtmlLabel credit = new Guna2HtmlLabel();

            credit.Text      = dr["credit"].ToString() + " Credit";
            credit.Font      = new Font("Segoe UI", 10);
            credit.ForeColor = Color.DimGray;
            credit.Location  = new Point(117, 162);

            Guna2HtmlLabel module_type = new Guna2HtmlLabel();

            module_type.Text      = dr["module_type"].ToString();
            module_type.Font      = new Font("Segoe UI", 10);
            module_type.ForeColor = Color.DimGray;
            module_type.Location  = new Point(187, 162);

            Guna2HtmlLabel gpa_type = new Guna2HtmlLabel();

            gpa_type.Text      = dr["gpatype"].ToString();
            gpa_type.Font      = new Font("Segoe UI", 10);
            gpa_type.ForeColor = Color.DimGray;
            gpa_type.Location  = new Point(225, 162);

            Guna2HtmlLabel lecture_abbr = new Guna2HtmlLabel();

            lecture_abbr.Text      = dr["lecture_abbr"].ToString();
            lecture_abbr.Font      = new Font("Segoe UI Semibold", 14);
            lecture_abbr.ForeColor = Color.FromArgb(100, 88, 255);
            lecture_abbr.Location  = new Point(127, 34);

            Guna2HtmlLabel lecture_module = new Guna2HtmlLabel();

            lecture_module.Text      = dr["lecture_module"].ToString();
            lecture_module.Font      = new Font("Segoe UI", 10);
            lecture_module.ForeColor = Color.FromArgb(100, 88, 255);
            lecture_module.Location  = new Point(18, 67);

            Guna2HtmlLabel intake = new Guna2HtmlLabel();

            intake.Text      = "INTAKE " + dr["intake"].ToString();
            intake.Font      = new Font("Segoe UI Semibold", 14);
            intake.ForeColor = Color.DimGray;
            intake.Location  = new Point(19, 95);

            Guna2HtmlLabel lecture_code = new Guna2HtmlLabel();

            lecture_code.Text      = dr["lecture_code"].ToString();
            lecture_code.Font      = new Font("Segoe UI", 10);
            lecture_code.ForeColor = Color.Orange;
            lecture_code.Location  = new Point(18, 132);

            Guna2HtmlLabel lecture_hall = new Guna2HtmlLabel();

            lecture_hall.Text      = "Lecture Hall :- " + dr["lecture_hall"].ToString();
            lecture_hall.Font      = new Font("Segoe UI Semibold", 12);
            lecture_hall.ForeColor = Color.Tomato;
            lecture_hall.Location  = new Point(18, 197);

            lecture_panel.Controls.Add(time_slot);
            lecture_panel.Controls.Add(str);
            lecture_panel.Controls.Add(credit);
            lecture_panel.Controls.Add(module_type);
            lecture_panel.Controls.Add(gpa_type);
            lecture_panel.Controls.Add(lecture_abbr);
            lecture_panel.Controls.Add(lecture_module);
            lecture_panel.Controls.Add(intake);
            lecture_panel.Controls.Add(lecture_code);
            lecture_panel.Controls.Add(lecture_hall);

            lectures_today_flowlayout.Controls.Add(lecture_panel);
        }
        private void createSlot(DataRow dr)
        {
            Guna2Panel top_panel = new Guna2Panel();

            top_panel.BackColor = Color.White;
            top_panel.ShadowDecoration.Color   = Color.Black;
            top_panel.ShadowDecoration.Depth   = 5;
            top_panel.ShadowDecoration.Enabled = true;
            top_panel.ShadowDecoration.Shadow  = new Padding(5, 5, 5, 5);
            top_panel.Size = new Size(1007, 45);

            Guna2Panel lecture_panel = new Guna2Panel();

            lecture_panel.BackColor = Color.White;
            lecture_panel.ShadowDecoration.Color   = Color.Black;
            lecture_panel.ShadowDecoration.Depth   = 5;
            lecture_panel.ShadowDecoration.Enabled = true;
            lecture_panel.ShadowDecoration.Shadow  = new Padding(5, 5, 5, 5);
            lecture_panel.Size = new Size(1007, 90);

            Guna2HtmlLabel time_slot = new Guna2HtmlLabel();

            time_slot.Text      = dr["time_slot"].ToString();
            time_slot.Font      = new Font("Segoe UI", 14);
            time_slot.ForeColor = Color.DimGray;
            time_slot.Location  = new Point(13, 9);

            Guna2HtmlLabel str = new Guna2HtmlLabel();

            str.Text      = "Strength - " + dr["strength"].ToString();
            str.Font      = new Font("Segoe UI", 12);
            str.ForeColor = Color.DimGray;
            str.Location  = new Point(717, 11);

            Guna2HtmlLabel credit = new Guna2HtmlLabel();

            credit.Text      = dr["credit"].ToString() + " Credit";
            credit.Font      = new Font("Segoe UI", 12);
            credit.ForeColor = Color.DimGray;
            credit.Location  = new Point(837, 11);

            Guna2HtmlLabel module_type = new Guna2HtmlLabel();

            module_type.Text      = dr["module_type"].ToString();
            module_type.Font      = new Font("Segoe UI", 12);
            module_type.ForeColor = Color.DimGray;
            module_type.Location  = new Point(920, 11);

            Guna2HtmlLabel gpa_type = new Guna2HtmlLabel();

            gpa_type.Text      = dr["gpatype"].ToString();
            gpa_type.Font      = new Font("Segoe UI", 12);
            gpa_type.ForeColor = Color.DimGray;
            gpa_type.Location  = new Point(958, 11);

            Guna2HtmlLabel lecture_abbr = new Guna2HtmlLabel();

            lecture_abbr.Text      = dr["lecture_abbr"].ToString();
            lecture_abbr.Font      = new Font("Segoe UI Semibold", 18);
            lecture_abbr.ForeColor = Color.FromArgb(100, 88, 255);
            lecture_abbr.Location  = new Point(13, 14);

            Guna2HtmlLabel lecture_module = new Guna2HtmlLabel();

            lecture_module.Text      = dr["lecture_module"].ToString();
            lecture_module.Font      = new Font("Segoe UI", 12);
            lecture_module.ForeColor = Color.FromArgb(100, 88, 255);
            lecture_module.Location  = new Point(13, 54);

            Guna2HtmlLabel lecturer = new Guna2HtmlLabel();

            lecturer.Text      = dr["lecturer"].ToString();
            lecturer.Font      = new Font("Segoe UI Semibold", 12);
            lecturer.ForeColor = Color.DimGray;
            lecturer.Location  = new Point(661, 14);

            Guna2HtmlLabel lecture_code = new Guna2HtmlLabel();

            lecture_code.Text      = dr["lecture_code"].ToString();
            lecture_code.Font      = new Font("Segoe UI", 12);
            lecture_code.ForeColor = Color.Orange;
            lecture_code.Location  = new Point(666, 54);

            Guna2HtmlLabel lecture_hall = new Guna2HtmlLabel();

            lecture_hall.Text          = "Lecture Hall :- " + dr["lecture_hall"].ToString();
            lecture_hall.AutoSize      = false;
            lecture_hall.Size          = new Size(155, 23);
            lecture_hall.TextAlignment = ContentAlignment.MiddleRight;
            lecture_hall.Font          = new Font("Segoe UI", 12);
            lecture_hall.ForeColor     = Color.Tomato;
            lecture_hall.Location      = new Point(836, 54);

            top_panel.Controls.Add(time_slot);
            top_panel.Controls.Add(str);
            top_panel.Controls.Add(credit);
            top_panel.Controls.Add(module_type);
            top_panel.Controls.Add(gpa_type);

            today_all_slots.Controls.Add(top_panel);

            lecture_panel.Controls.Add(lecture_abbr);
            lecture_panel.Controls.Add(lecture_module);
            lecture_panel.Controls.Add(lecturer);
            lecture_panel.Controls.Add(lecture_code);
            lecture_panel.Controls.Add(lecture_hall);

            today_all_slots.Controls.Add(lecture_panel);
        }