diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..f97e9e6 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "msbuild", + "args": [ + // Ask msbuild to generate full paths for file names. + "/property:GenerateFullPaths=true", + "/t:build", + // Do not generate summary otherwise it leads to duplicate errors in Problems panel + "/consoleloggerparameters:NoSummary" + ], + "group": "build", + "presentation": { + // Reveal the output only if unrecognized errors occur. + "reveal": "silent" + }, + // Use the standard MS compiler pattern to detect errors, warnings and infos + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/SMS/Student.Designer.cs b/SMS/Student.Designer.cs index f645ad1..3967b71 100644 --- a/SMS/Student.Designer.cs +++ b/SMS/Student.Designer.cs @@ -58,247 +58,306 @@ private void InitializeComponent() this.Save_btn = new System.Windows.Forms.Button(); this.Browse_btn = new System.Windows.Forms.Button(); this.OFD_controler = new System.Windows.Forms.OpenFileDialog(); + this.MainPanel = new System.Windows.Forms.Panel(); + this.PersonalInfoPanel = new System.Windows.Forms.Panel(); + this.AcademicInfoPanel = new System.Windows.Forms.Panel(); + this.ContactInfoPanel = new System.Windows.Forms.Panel(); + this.PhotoPanel = new System.Windows.Forms.Panel(); + this.TitlePanel = new System.Windows.Forms.Panel(); + this.TitleLabel = new System.Windows.Forms.Label(); + this.SubtitleLabel = new System.Windows.Forms.Label(); + this.Minimize_btn = new System.Windows.Forms.Button(); + this.HeaderIcon = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.Photo_pb)).BeginInit(); + this.MainPanel.SuspendLayout(); + this.PersonalInfoPanel.SuspendLayout(); + this.AcademicInfoPanel.SuspendLayout(); + this.ContactInfoPanel.SuspendLayout(); + this.PhotoPanel.SuspendLayout(); + this.TitlePanel.SuspendLayout(); this.SuspendLayout(); // // Close_btn // this.Close_btn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Close_btn.FlatAppearance.BorderColor = System.Drawing.Color.White; + this.Close_btn.BackColor = System.Drawing.Color.Transparent; this.Close_btn.FlatAppearance.BorderSize = 0; - this.Close_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Red; - this.Close_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.Close_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(53)))), ((int)(((byte)(69))))); + this.Close_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(53)))), ((int)(((byte)(69))))); this.Close_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Close_btn.Font = new System.Drawing.Font("Nirmala UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Close_btn.ForeColor = System.Drawing.Color.Black; - this.Close_btn.Location = new System.Drawing.Point(956, 0); + this.Close_btn.Font = new System.Drawing.Font("Segoe UI", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Close_btn.ForeColor = System.Drawing.Color.White; + this.Close_btn.Location = new System.Drawing.Point(950, 8); this.Close_btn.Name = "Close_btn"; - this.Close_btn.Size = new System.Drawing.Size(32, 33); + this.Close_btn.Size = new System.Drawing.Size(30, 30); this.Close_btn.TabIndex = 4; - this.Close_btn.Text = "X"; - this.Close_btn.UseVisualStyleBackColor = true; + this.Close_btn.Text = "×"; + this.Close_btn.UseVisualStyleBackColor = false; this.Close_btn.Click += new System.EventHandler(this.Close_btn_Click); this.Close_btn.MouseEnter += new System.EventHandler(this.Close_btn_MouseEnter); this.Close_btn.MouseLeave += new System.EventHandler(this.Close_btn_MouseLeave); // + // Minimize_btn + // + this.Minimize_btn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.Minimize_btn.BackColor = System.Drawing.Color.Transparent; + this.Minimize_btn.FlatAppearance.BorderSize = 0; + this.Minimize_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(108)))), ((int)(((byte)(117)))), ((int)(((byte)(125))))); + this.Minimize_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(108)))), ((int)(((byte)(117)))), ((int)(((byte)(125))))); + this.Minimize_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Minimize_btn.Font = new System.Drawing.Font("Segoe UI", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Minimize_btn.ForeColor = System.Drawing.Color.White; + this.Minimize_btn.Location = new System.Drawing.Point(914, 8); + this.Minimize_btn.Name = "Minimize_btn"; + this.Minimize_btn.Size = new System.Drawing.Size(30, 30); + this.Minimize_btn.TabIndex = 5; + this.Minimize_btn.Text = "−"; + this.Minimize_btn.UseVisualStyleBackColor = false; + this.Minimize_btn.Click += new System.EventHandler(this.Minimize_btn_Click); + this.Minimize_btn.MouseEnter += new System.EventHandler(this.Minimize_btn_MouseEnter); + this.Minimize_btn.MouseLeave += new System.EventHandler(this.Minimize_btn_MouseLeave); + // // label1 // this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label1.Location = new System.Drawing.Point(28, 103); + this.label1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label1.Location = new System.Drawing.Point(25, 30); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(148, 28); + this.label1.Size = new System.Drawing.Size(75, 20); this.label1.TabIndex = 5; this.label1.Text = "Student ID"; // // label2 // this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label2.Location = new System.Drawing.Point(28, 157); + this.label2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label2.Location = new System.Drawing.Point(25, 80); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(189, 28); + this.label2.Size = new System.Drawing.Size(98, 20); this.label2.TabIndex = 6; this.label2.Text = "Student Name"; // // label3 // this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label3.Location = new System.Drawing.Point(28, 274); + this.label3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label3.Location = new System.Drawing.Point(25, 180); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(108, 28); + this.label3.Size = new System.Drawing.Size(62, 20); this.label3.TabIndex = 8; this.label3.Text = "Address"; // // label4 // this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label4.Location = new System.Drawing.Point(28, 220); + this.label4.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label4.Location = new System.Drawing.Point(25, 130); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(190, 28); + this.label4.Size = new System.Drawing.Size(95, 20); this.label4.TabIndex = 7; this.label4.Text = "Father\'s Name"; // // label5 // this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label5.Location = new System.Drawing.Point(28, 485); + this.label5.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label5.Location = new System.Drawing.Point(25, 80); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(115, 28); + this.label5.Size = new System.Drawing.Size(60, 20); this.label5.TabIndex = 12; - this.label5.Text = "Roll_No."; + this.label5.Text = "Roll No."; // // label6 // this.label6.AutoSize = true; - this.label6.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label6.Location = new System.Drawing.Point(28, 431); + this.label6.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label6.Location = new System.Drawing.Point(25, 30); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(76, 28); + this.label6.Size = new System.Drawing.Size(42, 20); this.label6.TabIndex = 11; this.label6.Text = "Class"; // // label7 // this.label7.AutoSize = true; - this.label7.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label7.Location = new System.Drawing.Point(28, 376); + this.label7.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label7.Location = new System.Drawing.Point(25, 30); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(117, 28); + this.label7.Size = new System.Drawing.Size(70, 20); this.label7.TabIndex = 10; - this.label7.Text = "Voter_id"; + this.label7.Text = "Voter ID"; // // label8 // this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label8.Location = new System.Drawing.Point(28, 322); + this.label8.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label8.Location = new System.Drawing.Point(25, 80); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(138, 28); + this.label8.Size = new System.Drawing.Size(99, 20); this.label8.TabIndex = 9; - this.label8.Text = "Phone No."; + this.label8.Text = "Phone Number"; // // Student_id_tbx // - this.Student_id_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Student_id_tbx.Location = new System.Drawing.Point(247, 103); - this.Student_id_tbx.Multiline = true; + this.Student_id_tbx.BackColor = System.Drawing.Color.White; + this.Student_id_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Student_id_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Student_id_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Student_id_tbx.Location = new System.Drawing.Point(25, 55); this.Student_id_tbx.Name = "Student_id_tbx"; - this.Student_id_tbx.Size = new System.Drawing.Size(233, 28); + this.Student_id_tbx.Size = new System.Drawing.Size(320, 25); this.Student_id_tbx.TabIndex = 13; // // StudentName_tbx // - this.StudentName_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.StudentName_tbx.Location = new System.Drawing.Point(247, 157); - this.StudentName_tbx.Multiline = true; + this.StudentName_tbx.BackColor = System.Drawing.Color.White; + this.StudentName_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.StudentName_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.StudentName_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.StudentName_tbx.Location = new System.Drawing.Point(25, 105); this.StudentName_tbx.Name = "StudentName_tbx"; - this.StudentName_tbx.Size = new System.Drawing.Size(233, 28); + this.StudentName_tbx.Size = new System.Drawing.Size(320, 25); this.StudentName_tbx.TabIndex = 14; // // Add_tbx // - this.Add_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Add_tbx.Location = new System.Drawing.Point(247, 274); + this.Add_tbx.BackColor = System.Drawing.Color.White; + this.Add_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Add_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Add_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Add_tbx.Location = new System.Drawing.Point(25, 205); this.Add_tbx.Multiline = true; this.Add_tbx.Name = "Add_tbx"; - this.Add_tbx.Size = new System.Drawing.Size(233, 28); + this.Add_tbx.Size = new System.Drawing.Size(320, 60); this.Add_tbx.TabIndex = 16; // // FatherName_tbx // - this.FatherName_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.FatherName_tbx.Location = new System.Drawing.Point(247, 220); - this.FatherName_tbx.Multiline = true; + this.FatherName_tbx.BackColor = System.Drawing.Color.White; + this.FatherName_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.FatherName_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FatherName_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.FatherName_tbx.Location = new System.Drawing.Point(25, 155); this.FatherName_tbx.Name = "FatherName_tbx"; - this.FatherName_tbx.Size = new System.Drawing.Size(233, 28); + this.FatherName_tbx.Size = new System.Drawing.Size(320, 25); this.FatherName_tbx.TabIndex = 15; // // Voter_tbx // - this.Voter_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Voter_tbx.Location = new System.Drawing.Point(247, 376); - this.Voter_tbx.Multiline = true; + this.Voter_tbx.BackColor = System.Drawing.Color.White; + this.Voter_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Voter_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Voter_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Voter_tbx.Location = new System.Drawing.Point(25, 55); this.Voter_tbx.Name = "Voter_tbx"; - this.Voter_tbx.Size = new System.Drawing.Size(233, 28); + this.Voter_tbx.Size = new System.Drawing.Size(320, 25); this.Voter_tbx.TabIndex = 18; // // Phone_tbx // - this.Phone_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Phone_tbx.Location = new System.Drawing.Point(247, 322); - this.Phone_tbx.Multiline = true; + this.Phone_tbx.BackColor = System.Drawing.Color.White; + this.Phone_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Phone_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Phone_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Phone_tbx.Location = new System.Drawing.Point(25, 105); this.Phone_tbx.Name = "Phone_tbx"; - this.Phone_tbx.Size = new System.Drawing.Size(233, 28); + this.Phone_tbx.Size = new System.Drawing.Size(320, 25); this.Phone_tbx.TabIndex = 17; // // Roll_tbx // - this.Roll_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Roll_tbx.Location = new System.Drawing.Point(247, 485); - this.Roll_tbx.Multiline = true; + this.Roll_tbx.BackColor = System.Drawing.Color.White; + this.Roll_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Roll_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Roll_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Roll_tbx.Location = new System.Drawing.Point(25, 105); this.Roll_tbx.Name = "Roll_tbx"; - this.Roll_tbx.Size = new System.Drawing.Size(233, 28); + this.Roll_tbx.Size = new System.Drawing.Size(320, 25); this.Roll_tbx.TabIndex = 20; // // Class_tbx // - this.Class_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Class_tbx.Location = new System.Drawing.Point(247, 431); - this.Class_tbx.Multiline = true; + this.Class_tbx.BackColor = System.Drawing.Color.White; + this.Class_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Class_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Class_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Class_tbx.Location = new System.Drawing.Point(25, 55); this.Class_tbx.Name = "Class_tbx"; - this.Class_tbx.Size = new System.Drawing.Size(233, 28); + this.Class_tbx.Size = new System.Drawing.Size(320, 25); this.Class_tbx.TabIndex = 19; // // Sec_tbx // - this.Sec_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Sec_tbx.Location = new System.Drawing.Point(710, 103); - this.Sec_tbx.Multiline = true; + this.Sec_tbx.BackColor = System.Drawing.Color.White; + this.Sec_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Sec_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Sec_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Sec_tbx.Location = new System.Drawing.Point(25, 105); this.Sec_tbx.Name = "Sec_tbx"; - this.Sec_tbx.Size = new System.Drawing.Size(233, 28); + this.Sec_tbx.Size = new System.Drawing.Size(320, 25); this.Sec_tbx.TabIndex = 24; // // label9 // this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label9.Location = new System.Drawing.Point(512, 212); + this.label9.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label9.Location = new System.Drawing.Point(25, 180); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(57, 28); + this.label9.Size = new System.Drawing.Size(30, 20); this.label9.TabIndex = 23; this.label9.Text = "Bus"; // // label10 // this.label10.AutoSize = true; - this.label10.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label10.Location = new System.Drawing.Point(512, 158); + this.label10.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label10.Location = new System.Drawing.Point(25, 130); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(167, 28); + this.label10.Size = new System.Drawing.Size(80, 20); this.label10.TabIndex = 22; this.label10.Text = "Library Card"; // // label11 // this.label11.AutoSize = true; - this.label11.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label11.Location = new System.Drawing.Point(512, 103); + this.label11.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label11.Location = new System.Drawing.Point(25, 80); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(107, 28); + this.label11.Size = new System.Drawing.Size(55, 20); this.label11.TabIndex = 21; this.label11.Text = "Section"; // // Library_tbx // - this.Library_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Library_tbx.Location = new System.Drawing.Point(710, 158); - this.Library_tbx.Multiline = true; + this.Library_tbx.BackColor = System.Drawing.Color.White; + this.Library_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Library_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Library_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Library_tbx.Location = new System.Drawing.Point(25, 155); this.Library_tbx.Name = "Library_tbx"; - this.Library_tbx.Size = new System.Drawing.Size(233, 28); + this.Library_tbx.Size = new System.Drawing.Size(320, 25); this.Library_tbx.TabIndex = 25; // // Bus_tbx // - this.Bus_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Bus_tbx.Location = new System.Drawing.Point(710, 212); - this.Bus_tbx.Multiline = true; + this.Bus_tbx.BackColor = System.Drawing.Color.White; + this.Bus_tbx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Bus_tbx.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Bus_tbx.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.Bus_tbx.Location = new System.Drawing.Point(25, 205); this.Bus_tbx.Name = "Bus_tbx"; - this.Bus_tbx.Size = new System.Drawing.Size(233, 28); + this.Bus_tbx.Size = new System.Drawing.Size(320, 25); this.Bus_tbx.TabIndex = 26; // // label12 @@ -323,53 +382,57 @@ private void InitializeComponent() // label13 // this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Bookman Old Style", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.label13.Location = new System.Drawing.Point(512, 274); + this.label13.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Medium, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.label13.Location = new System.Drawing.Point(25, 30); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(85, 28); + this.label13.Size = new System.Drawing.Size(45, 20); this.label13.TabIndex = 29; this.label13.Text = "Photo"; // // Photo_pb // - this.Photo_pb.BackColor = System.Drawing.SystemColors.Control; + this.Photo_pb.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(249)))), ((int)(((byte)(250))))); this.Photo_pb.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.Photo_pb.Location = new System.Drawing.Point(710, 274); + this.Photo_pb.Location = new System.Drawing.Point(25, 55); this.Photo_pb.Name = "Photo_pb"; - this.Photo_pb.Size = new System.Drawing.Size(127, 138); + this.Photo_pb.Size = new System.Drawing.Size(120, 140); this.Photo_pb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.Photo_pb.TabIndex = 30; this.Photo_pb.TabStop = false; // // Save_btn // + this.Save_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(167)))), ((int)(((byte)(69))))); this.Save_btn.FlatAppearance.BorderSize = 0; - this.Save_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.MediumSpringGreen; + this.Save_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(136)))), ((int)(((byte)(56))))); + this.Save_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(136)))), ((int)(((byte)(56))))); this.Save_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Save_btn.Font = new System.Drawing.Font("Bookman Old Style", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Save_btn.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Save_btn.Location = new System.Drawing.Point(719, 481); + this.Save_btn.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Save_btn.ForeColor = System.Drawing.Color.White; + this.Save_btn.Location = new System.Drawing.Point(420, 620); this.Save_btn.Name = "Save_btn"; - this.Save_btn.Size = new System.Drawing.Size(105, 38); + this.Save_btn.Size = new System.Drawing.Size(150, 45); this.Save_btn.TabIndex = 31; - this.Save_btn.Text = "SAVE"; - this.Save_btn.UseVisualStyleBackColor = true; + this.Save_btn.Text = "💾 Save Student"; + this.Save_btn.UseVisualStyleBackColor = false; this.Save_btn.Click += new System.EventHandler(this.Save_btn_Click); // // Browse_btn // + this.Browse_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(123)))), ((int)(((byte)(255))))); this.Browse_btn.FlatAppearance.BorderSize = 0; - this.Browse_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.MediumSpringGreen; + this.Browse_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(105)))), ((int)(((byte)(217))))); + this.Browse_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(105)))), ((int)(((byte)(217))))); this.Browse_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Browse_btn.Font = new System.Drawing.Font("Bookman Old Style", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Browse_btn.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(31)))), ((int)(((byte)(62))))); - this.Browse_btn.Location = new System.Drawing.Point(719, 414); + this.Browse_btn.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Browse_btn.ForeColor = System.Drawing.Color.White; + this.Browse_btn.Location = new System.Drawing.Point(160, 55); this.Browse_btn.Name = "Browse_btn"; - this.Browse_btn.Size = new System.Drawing.Size(105, 38); + this.Browse_btn.Size = new System.Drawing.Size(100, 35); this.Browse_btn.TabIndex = 34; - this.Browse_btn.Text = "Browse"; - this.Browse_btn.UseVisualStyleBackColor = true; + this.Browse_btn.Text = "📁 Browse"; + this.Browse_btn.UseVisualStyleBackColor = false; this.Browse_btn.Click += new System.EventHandler(this.Browse_btn_Click); // // Student @@ -383,42 +446,159 @@ private void InitializeComponent() this.Controls.Add(this.Photo_pb); this.Controls.Add(this.label13); this.Controls.Add(this.panel1); - this.Controls.Add(this.label12); - this.Controls.Add(this.Bus_tbx); - this.Controls.Add(this.Library_tbx); - this.Controls.Add(this.Sec_tbx); - this.Controls.Add(this.label9); - this.Controls.Add(this.label10); - this.Controls.Add(this.label11); - this.Controls.Add(this.Roll_tbx); - this.Controls.Add(this.Class_tbx); - this.Controls.Add(this.Voter_tbx); - this.Controls.Add(this.Phone_tbx); - this.Controls.Add(this.Add_tbx); - this.Controls.Add(this.FatherName_tbx); - this.Controls.Add(this.StudentName_tbx); - this.Controls.Add(this.Student_id_tbx); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); - this.Controls.Add(this.label7); - this.Controls.Add(this.label8); - this.Controls.Add(this.label3); - this.Controls.Add(this.label4); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); + // + // MainPanel + // + this.MainPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(249)))), ((int)(((byte)(250))))); + this.MainPanel.Controls.Add(this.ContactInfoPanel); + this.MainPanel.Controls.Add(this.AcademicInfoPanel); + this.MainPanel.Controls.Add(this.PersonalInfoPanel); + this.MainPanel.Controls.Add(this.PhotoPanel); + this.MainPanel.Controls.Add(this.TitlePanel); + this.MainPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.MainPanel.Location = new System.Drawing.Point(0, 0); + this.MainPanel.Name = "MainPanel"; + this.MainPanel.Padding = new System.Windows.Forms.Padding(20); + this.MainPanel.Size = new System.Drawing.Size(1000, 700); + this.MainPanel.TabIndex = 0; + // + // PersonalInfoPanel + // + this.PersonalInfoPanel.BackColor = System.Drawing.Color.White; + this.PersonalInfoPanel.Controls.Add(this.label1); + this.PersonalInfoPanel.Controls.Add(this.Student_id_tbx); + this.PersonalInfoPanel.Controls.Add(this.label2); + this.PersonalInfoPanel.Controls.Add(this.StudentName_tbx); + this.PersonalInfoPanel.Controls.Add(this.label3); + this.PersonalInfoPanel.Controls.Add(this.FatherName_tbx); + this.PersonalInfoPanel.Controls.Add(this.label4); + this.PersonalInfoPanel.Controls.Add(this.Add_tbx); + this.PersonalInfoPanel.Location = new System.Drawing.Point(20, 120); + this.PersonalInfoPanel.Name = "PersonalInfoPanel"; + this.PersonalInfoPanel.Padding = new System.Windows.Forms.Padding(20); + this.PersonalInfoPanel.Size = new System.Drawing.Size(370, 280); + this.PersonalInfoPanel.TabIndex = 0; + // + // AcademicInfoPanel + // + this.AcademicInfoPanel.BackColor = System.Drawing.Color.White; + this.AcademicInfoPanel.Controls.Add(this.label5); + this.AcademicInfoPanel.Controls.Add(this.Roll_tbx); + this.AcademicInfoPanel.Controls.Add(this.label6); + this.AcademicInfoPanel.Controls.Add(this.Class_tbx); + this.AcademicInfoPanel.Controls.Add(this.label7); + this.AcademicInfoPanel.Controls.Add(this.Sec_tbx); + this.AcademicInfoPanel.Controls.Add(this.label9); + this.AcademicInfoPanel.Controls.Add(this.Library_tbx); + this.AcademicInfoPanel.Controls.Add(this.label10); + this.AcademicInfoPanel.Controls.Add(this.Bus_tbx); + this.AcademicInfoPanel.Location = new System.Drawing.Point(410, 120); + this.AcademicInfoPanel.Name = "AcademicInfoPanel"; + this.AcademicInfoPanel.Padding = new System.Windows.Forms.Padding(20); + this.AcademicInfoPanel.Size = new System.Drawing.Size(370, 280); + this.AcademicInfoPanel.TabIndex = 1; + // + // ContactInfoPanel + // + this.ContactInfoPanel.BackColor = System.Drawing.Color.White; + this.ContactInfoPanel.Controls.Add(this.label8); + this.ContactInfoPanel.Controls.Add(this.Voter_tbx); + this.ContactInfoPanel.Controls.Add(this.label11); + this.ContactInfoPanel.Controls.Add(this.Phone_tbx); + this.ContactInfoPanel.Location = new System.Drawing.Point(20, 420); + this.ContactInfoPanel.Name = "ContactInfoPanel"; + this.ContactInfoPanel.Padding = new System.Windows.Forms.Padding(20); + this.ContactInfoPanel.Size = new System.Drawing.Size(370, 140); + this.ContactInfoPanel.TabIndex = 2; + // + // PhotoPanel + // + this.PhotoPanel.BackColor = System.Drawing.Color.White; + this.PhotoPanel.Controls.Add(this.Photo_pb); + this.PhotoPanel.Controls.Add(this.Browse_btn); + this.PhotoPanel.Controls.Add(this.label13); + this.PhotoPanel.Location = new System.Drawing.Point(410, 420); + this.PhotoPanel.Name = "PhotoPanel"; + this.PhotoPanel.Padding = new System.Windows.Forms.Padding(20); + this.PhotoPanel.Size = new System.Drawing.Size(370, 220); + this.PhotoPanel.TabIndex = 3; + // + // TitlePanel + // + this.TitlePanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(73)))), ((int)(((byte)(94))))); + this.TitlePanel.Controls.Add(this.SubtitleLabel); + this.TitlePanel.Controls.Add(this.TitleLabel); + this.TitlePanel.Controls.Add(this.HeaderIcon); + this.TitlePanel.Controls.Add(this.Minimize_btn); + this.TitlePanel.Controls.Add(this.Close_btn); + this.TitlePanel.Dock = System.Windows.Forms.DockStyle.Top; + this.TitlePanel.Location = new System.Drawing.Point(20, 20); + this.TitlePanel.Name = "TitlePanel"; + this.TitlePanel.Size = new System.Drawing.Size(960, 80); + this.TitlePanel.TabIndex = 4; + // + // TitleLabel + // + this.TitleLabel.AutoSize = true; + this.TitleLabel.Font = new System.Drawing.Font("Segoe UI", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TitleLabel.ForeColor = System.Drawing.Color.White; + this.TitleLabel.Location = new System.Drawing.Point(60, 20); + this.TitleLabel.Name = "TitleLabel"; + this.TitleLabel.Size = new System.Drawing.Size(240, 37); + this.TitleLabel.TabIndex = 0; + this.TitleLabel.Text = "Student Admission"; + // + // SubtitleLabel + // + this.SubtitleLabel.AutoSize = true; + this.SubtitleLabel.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.SubtitleLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.SubtitleLabel.Location = new System.Drawing.Point(65, 50); + this.SubtitleLabel.Name = "SubtitleLabel"; + this.SubtitleLabel.Size = new System.Drawing.Size(200, 20); + this.SubtitleLabel.TabIndex = 1; + this.SubtitleLabel.Text = "Enter student information below"; + // + // HeaderIcon + // + this.HeaderIcon.AutoSize = true; + this.HeaderIcon.Font = new System.Drawing.Font("Segoe UI", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.HeaderIcon.ForeColor = System.Drawing.Color.White; + this.HeaderIcon.Location = new System.Drawing.Point(20, 20); + this.HeaderIcon.Name = "HeaderIcon"; + this.HeaderIcon.Size = new System.Drawing.Size(35, 45); + this.HeaderIcon.TabIndex = 2; + this.HeaderIcon.Text = "🎓"; + // + // Student + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1000, 700); + this.Controls.Add(this.Save_btn); + this.Controls.Add(this.Minimize_btn); this.Controls.Add(this.Close_btn); + this.Controls.Add(this.MainPanel); this.DoubleBuffered = true; - this.ForeColor = System.Drawing.Color.MediumSpringGreen; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "Student"; - this.Opacity = 0.95D; - this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Student"; - this.TopMost = true; + this.Text = "Student Admission"; this.Load += new System.EventHandler(this.Student_Load); this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Student_MouseDown); ((System.ComponentModel.ISupportInitialize)(this.Photo_pb)).EndInit(); + this.MainPanel.ResumeLayout(false); + this.PersonalInfoPanel.ResumeLayout(false); + this.PersonalInfoPanel.PerformLayout(); + this.AcademicInfoPanel.ResumeLayout(false); + this.AcademicInfoPanel.PerformLayout(); + this.ContactInfoPanel.ResumeLayout(false); + this.ContactInfoPanel.PerformLayout(); + this.PhotoPanel.ResumeLayout(false); + this.PhotoPanel.PerformLayout(); + this.TitlePanel.ResumeLayout(false); + this.TitlePanel.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -456,5 +636,15 @@ private void InitializeComponent() private System.Windows.Forms.Button Save_btn; private System.Windows.Forms.Button Browse_btn; private System.Windows.Forms.OpenFileDialog OFD_controler; + private System.Windows.Forms.Panel MainPanel; + private System.Windows.Forms.Panel PersonalInfoPanel; + private System.Windows.Forms.Panel AcademicInfoPanel; + private System.Windows.Forms.Panel ContactInfoPanel; + private System.Windows.Forms.Panel PhotoPanel; + private System.Windows.Forms.Panel TitlePanel; + private System.Windows.Forms.Label TitleLabel; + private System.Windows.Forms.Label SubtitleLabel; + private System.Windows.Forms.Button Minimize_btn; + private System.Windows.Forms.Label HeaderIcon; } } \ No newline at end of file diff --git a/SMS/Student.cs b/SMS/Student.cs index 244ffe4..00bc344 100644 --- a/SMS/Student.cs +++ b/SMS/Student.cs @@ -62,12 +62,79 @@ private void Close_btn_MouseEnter(object sender, EventArgs e) private void Close_btn_MouseLeave(object sender, EventArgs e) { - Close_btn.ForeColor= Color.Black; + Close_btn.ForeColor = Color.White; + } + + private void Minimize_btn_Click(object sender, EventArgs e) + { + this.WindowState = FormWindowState.Minimized; + } + + private void Minimize_btn_MouseEnter(object sender, EventArgs e) + { + Minimize_btn.ForeColor = Color.White; + } + + private void Minimize_btn_MouseLeave(object sender, EventArgs e) + { + Minimize_btn.ForeColor = Color.White; } private void Student_Load(object sender, EventArgs e) { + // Add modern styling and animations + SetupModernStyling(); + } + private void SetupModernStyling() + { + // Add hover effects to text boxes + foreach (Control control in this.Controls) + { + if (control is TextBox) + { + TextBox textBox = control as TextBox; + textBox.Enter += TextBox_Enter; + textBox.Leave += TextBox_Leave; + } + } + + // Add hover effects to panels + foreach (Control control in this.MainPanel.Controls) + { + if (control is Panel && control != this.TitlePanel) + { + Panel panel = control as Panel; + panel.MouseEnter += Panel_MouseEnter; + panel.MouseLeave += Panel_MouseLeave; + } + } + } + + private void TextBox_Enter(object sender, EventArgs e) + { + TextBox textBox = sender as TextBox; + textBox.BackColor = Color.FromArgb(240, 248, 255); + textBox.BorderStyle = BorderStyle.FixedSingle; + } + + private void TextBox_Leave(object sender, EventArgs e) + { + TextBox textBox = sender as TextBox; + textBox.BackColor = Color.White; + textBox.BorderStyle = BorderStyle.FixedSingle; + } + + private void Panel_MouseEnter(object sender, EventArgs e) + { + Panel panel = sender as Panel; + panel.BackColor = Color.FromArgb(252, 252, 252); + } + + private void Panel_MouseLeave(object sender, EventArgs e) + { + Panel panel = sender as Panel; + panel.BackColor = Color.White; } @@ -86,6 +153,11 @@ private void Save_btn_Click(object sender, EventArgs e) { try { + // Visual validation feedback + if (!ValidateForm()) + { + return; + } string[] inputs = new string[] { @@ -105,6 +177,7 @@ private void Save_btn_Click(object sender, EventArgs e) if (inputs.Any(input => string.IsNullOrWhiteSpace(input))) { WControls.ShowToasterMsg("ACTION NEEDED", "Missing Data", "Fill all Details Carefully!!"); + HighlightEmptyFields(); } else { @@ -112,10 +185,12 @@ private void Save_btn_Click(object sender, EventArgs e) Sql_Query = "Insert into Student values(@S_ID, @S_Name, @F_Name, @Address, @Phone, @Voter, @Class, @Roll, @Sec, @Library, @Bus, @Photo)"; byte[] image = null; - FileStream stream = new FileStream(query, FileMode.Open, FileAccess.Read); - BinaryReader brs = new BinaryReader(stream); - image = brs.ReadBytes((int)stream.Length); - + if (!string.IsNullOrEmpty(query)) + { + FileStream stream = new FileStream(query, FileMode.Open, FileAccess.Read); + BinaryReader brs = new BinaryReader(stream); + image = brs.ReadBytes((int)stream.Length); + } cmd = new SqlCommand(Sql_Query, WControls.connection); cmd.Parameters.AddWithValue("@S_ID", Student_id_tbx.Text); @@ -129,7 +204,7 @@ private void Save_btn_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@Sec", Sec_tbx.Text); cmd.Parameters.AddWithValue("@Library", Library_tbx.Text); cmd.Parameters.AddWithValue("@Bus", Bus_tbx.Text); - cmd.Parameters.AddWithValue("@Photo", image); + cmd.Parameters.AddWithValue("@Photo", image ?? (object)DBNull.Value); cmd.ExecuteNonQuery(); ClearInputFields(); WControls.ShowToasterMsg("SUCCESS", "Saved Successfully ", "Data Stored in Database"); @@ -146,6 +221,50 @@ private void Save_btn_Click(object sender, EventArgs e) WControls.DBConClose(); } } + + private bool ValidateForm() + { + bool isValid = true; + + // Reset all field colors + ResetFieldColors(); + + // Check if photo is selected + if (Photo_pb.Image == null) + { + WControls.ShowToasterMsg("WARNING", "Photo Required", "Please select a student photo before saving."); + isValid = false; + } + + return isValid; + } + + private void HighlightEmptyFields() + { + TextBox[] textBoxes = { Student_id_tbx, StudentName_tbx, FatherName_tbx, Add_tbx, + Phone_tbx, Voter_tbx, Class_tbx, Roll_tbx, Sec_tbx, Library_tbx, Bus_tbx }; + + foreach (TextBox textBox in textBoxes) + { + if (string.IsNullOrWhiteSpace(textBox.Text)) + { + textBox.BackColor = Color.FromArgb(255, 240, 240); + textBox.BorderStyle = BorderStyle.FixedSingle; + } + } + } + + private void ResetFieldColors() + { + TextBox[] textBoxes = { Student_id_tbx, StudentName_tbx, FatherName_tbx, Add_tbx, + Phone_tbx, Voter_tbx, Class_tbx, Roll_tbx, Sec_tbx, Library_tbx, Bus_tbx }; + + foreach (TextBox textBox in textBoxes) + { + textBox.BackColor = Color.White; + textBox.BorderStyle = BorderStyle.FixedSingle; + } + } private void ClearInputFields() { Student_id_tbx.Text = string.Empty; @@ -160,6 +279,10 @@ private void ClearInputFields() Library_tbx.Text = string.Empty; Bus_tbx.Text = string.Empty; Photo_pb.Image = null; + query = string.Empty; + + // Reset field colors + ResetFieldColors(); } } }