//============================================================================// public void mouseclick(Label lb, Guna2TextBox txt, Guna2Panel pn) { lb.Visible = true; txt.PlaceholderText = ""; pn.CustomBorderColor = Color.FromArgb(255, 128, 0); lb.ForeColor = Color.FromArgb(255, 128, 0); }
void panel_Click(object sender, EventArgs e) { Guna2Panel btn = sender as Guna2Panel; readerpanel.Reader.src = btn.Name; addusercontrol(readerpanel, panel2); }
private void LoadStudentsAll(string intake) { students_layout.Controls.Clear(); databaseConnection.Open(); MySqlCommand getIntakeId = new MySqlCommand("Select id from intakes where intake='" + intake + "'", databaseConnection); Int32 intake_id = Convert.ToInt32(getIntakeId.ExecuteScalar()); MySqlCommand getStudents = new MySqlCommand("Select student_reg_no,student_name,student_course_stream,student_email,student_mobile from student_info where intake_id='" + intake_id + "'", databaseConnection); MySqlDataAdapter sda = new MySqlDataAdapter(getStudents); DataTable dt = new DataTable(); sda.Fill(dt); sda.Dispose(); databaseConnection.Close(); foreach (DataRow dr in dt.Rows) { createPanel(dr); } Guna2Panel final_panel = new Guna2Panel(); final_panel.BackColor = Color.White; final_panel.Margin = new Padding(10, 37, 10, 10); final_panel.Padding = new Padding(5, 5, 5, 5); final_panel.Size = new Size(1060, 25); students_layout.Controls.Add(final_panel); }
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); }
public static void ChangeSubform(Guna2Panel panel, dynamic form) { var currentForm = form as Form; panel.Controls.Clear(); currentForm.TopLevel = false; panel.Controls.Add(currentForm); currentForm.Show(); }
public void GetallPdfs() { if (!string.IsNullOrEmpty(FileWritter.Pdfs.Text)) { Point position = new Point(6, 21); foreach (var pdf in FileWritter.Pdfs.Lines) { if (!string.IsNullOrWhiteSpace(pdf)) { Guna2Panel pdflayoutpanel = new Guna2Panel(); Label pdfnameLabel = new Label(); pdfnameLabel.BackColor = Color.Transparent; pdfnameLabel.ForeColor = Color.Blue; pdfnameLabel.Visible = true; pdfnameLabel.Location = label1.Location; pdfnameLabel.AutoSize = true; PictureBox pBox = new PictureBox(); pBox.Size = pictureBox1.Size; pBox.Location = pictureBox1.Location; pBox.Image = Image.FromFile(@"C:\Users\Mr-Goodebag\Desktop\images.jpeg"); pBox.SizeMode = pictureBox1.SizeMode; pdflayoutpanel.BackColor = PanToAdds.BackColor; pdflayoutpanel.BorderRadius = PanToAdds.BorderRadius; pdflayoutpanel.BorderColor = PanToAdds.BorderColor; pdflayoutpanel.BorderThickness = PanToAdds.BorderThickness; pdflayoutpanel.FillColor = PanToAdds.FillColor; pdflayoutpanel.Size = PanToAdds.Size; pdflayoutpanel.Controls.Add(pBox); pdflayoutpanel.Controls.Add(pdfnameLabel); pdflayoutpanel.Click += new EventHandler(this.panel_Click); pdflayoutpanel.Location = position; pdflayoutpanel.Visible = true; foreach (Control item in pdflayoutpanel.Controls) { pdflayoutpanel.Name = pdf; if (item is PictureBox) { item.Name = pdf; item.Click += new EventHandler(this.picture_Click); } if (item is Label) { item.Text = pdf; item.Click += new EventHandler(this.label_Click); } } PdflistView.Controls.Add(pdflayoutpanel); position.Y += 55; } } } }
public void leave(Label lb, Guna2TextBox txt, Guna2Panel pn) { if (txt.Text.Length == 0) { lb.Visible = false; txt.PlaceholderText = lb.Text; } pn.CustomBorderColor = Color.FromArgb(224, 224, 224); lb.ForeColor = Color.FromArgb(255, 255, 255); }
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()); } } }
private void ShowSubMenu(Guna2Panel subMenu) { if (subMenu.Visible == false) { HideSubMenu(); currentGunnaPanel = subMenu; subMenu.Visible = true; } else { subMenu.Visible = false; } }
private void InitializarePanelDetaliiComanda(Form form) { PanelDetaliiComanda = new Guna2Panel { Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right))), BackColor = System.Drawing.Color.Transparent, BorderColor = System.Drawing.Color.Transparent, BorderRadius = 15, FillColor = Color.FromArgb(47, 49, 55), Location = new Point(657, 12), Name = "PanelDetaliiComanda", Size = new Size(292, 30), Visible = false }; PanelDetaliiComanda.ShadowDecoration.BorderRadius = 15; PanelDetaliiComanda.ShadowDecoration.Depth = 5; PanelDetaliiComanda.ShadowDecoration.Enabled = true; PanelDetaliiComanda.ShadowDecoration.Shadow = new System.Windows.Forms.Padding(0, 0, 5, 6); form.Controls.Add(PanelDetaliiComanda); }
private void showSubMenu(Guna2Panel subMenu = null, Guna2Button button = null) { if (button != null) { button.Enabled = false; } if (subMenu.Visible) { subMenu.Visible = false; } else { hideSubMenu(); subMenu.Visible = true; } if (button != null) { button.Enabled = true; } }
private void LoadStudentsAll() { databaseConnection.Open(); MySqlCommand getStudents = new MySqlCommand("Select lecturer_id,lecturer_name,lecturer_email,lecturer_mobile from lecturer_info", databaseConnection); MySqlDataAdapter sda = new MySqlDataAdapter(getStudents); DataTable dt = new DataTable(); sda.Fill(dt); databaseConnection.Close(); foreach (DataRow dr in dt.Rows) { createPanel(dr); } Guna2Panel final_panel = new Guna2Panel(); final_panel.BackColor = Color.White; final_panel.Margin = new Padding(10, 37, 10, 10); final_panel.Padding = new Padding(5, 5, 5, 5); final_panel.Size = new Size(1060, 25); students_layout.Controls.Add(final_panel); }
public ElementeGraficeDetaliiComanda(Form form, Guna2Panel PanelDetaliiComanda, int idComanda, string PretComanda, string Adresa) { PanelDetaliiComanda.Visible = false; DateTime start = DateTime.Now; PictureBox animatie = new PictureBox { Name = "animatie", //Image = Image.FromFile(Application.StartupPath + @"\img\waiting.gif"), Image = Properties.Resources.waiting, Width = 120, Height = 120, SizeMode = PictureBoxSizeMode.StretchImage, Enabled = true }; animatie.Location = new Point(800 - animatie.Size.Width / 2, 235); form.Controls.Add(animatie); string[][] DetaliiComanda = VariabileGlobale.bazaDeDate.ReturneazaDetaliiComanda(Convert.ToInt32(idComanda)); int nrProduseComanda = DetaliiComanda.Length; string[] imaginiProduseComanda = new string[nrProduseComanda]; string[] numeProduse = new string[nrProduseComanda]; string[] CantitatiProduse = new string[nrProduseComanda]; string[] preturiProduse = new string[nrProduseComanda]; for (int i = 0; i < nrProduseComanda; i++) { imaginiProduseComanda[i] = DetaliiComanda[i][1]; numeProduse[i] = DetaliiComanda[i][2]; CantitatiProduse[i] = DetaliiComanda[i][3]; preturiProduse[i] = DetaliiComanda[i][4]; } PanelDetaliiComanda.Controls.Clear(); PanelDetaliiComanda.Height = 30; InitializareTabelGeneralProduse(PanelDetaliiComanda.Width); AlocareMemorie(nrProduseComanda); InitializareTabelProduseComanda(nrProduseComanda); InitializarePicturesImagineProdusComanda(nrProduseComanda, imaginiProduseComanda); InitializareNumeProduseComanda(nrProduseComanda, numeProduse); InitializareCantitateProduseComanda(nrProduseComanda, CantitatiProduse); InitializarePretProduseComanda(nrProduseComanda, preturiProduse); AdaugareElementeInTabele(nrProduseComanda); PanelDetaliiComanda.Controls.Add(tabelGeneralProduse); PanelDetaliiComanda.Height += tabelGeneralProduse.Height + 60; Label labelDetaliiLivrare = new Label() { ForeColor = Color.White, Font = new Font("Roboto", 9, FontStyle.Bold), Width = 100, Height = 20, BackColor = Color.Transparent, Location = new Point(15, tabelGeneralProduse.Height + 60), Text = "Detalii Livrare: " }; PanelDetaliiComanda.Controls.Add(labelDetaliiLivrare); PanelDetaliiComanda.Height += labelDetaliiLivrare.Height; Label labelAdresaComanda = new Label() { ForeColor = Color.White, Font = new Font("Roboto", 8, FontStyle.Regular), Width = 262, Height = 60, BackColor = Color.Transparent, Location = new Point(15, labelDetaliiLivrare.Location.Y + 30), Text = Adresa }; PanelDetaliiComanda.Controls.Add(labelAdresaComanda); PanelDetaliiComanda.Height += labelAdresaComanda.Height; Label labelPretComanda = new Label() { ForeColor = Color.White, Font = new Font("Roboto", 12, FontStyle.Bold), AutoSize = true, Width = 100, Height = 40, BackColor = Color.Transparent, Text = "Total: " + PretComanda }; labelPretComanda.Location = new Point(PanelDetaliiComanda.Width / 2 - labelPretComanda.Width / 2, labelAdresaComanda.Location.Y + labelAdresaComanda.Height + 50); PanelDetaliiComanda.Controls.Add(labelPretComanda); PanelDetaliiComanda.Height += labelPretComanda.Height + 50; PanelDetaliiComanda.Location = new Point(657, 12); while ((DateTime.Now - start).TotalMilliseconds < 2000) { Application.DoEvents(); } PanelDetaliiComanda.Visible = true; form.Controls.Remove(animatie); }
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 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); }
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); }