diff --git a/EduNetworkBuilder/PersonProfileForm.Designer.cs b/EduNetworkBuilder/PersonProfileForm.Designer.cs index 3867402..42c4f67 100644 --- a/EduNetworkBuilder/PersonProfileForm.Designer.cs +++ b/EduNetworkBuilder/PersonProfileForm.Designer.cs @@ -69,6 +69,7 @@ this.tbStudentUsername = new System.Windows.Forms.TextBox(); this.tvClasswork = new System.Windows.Forms.TreeView(); this.btnExit = new System.Windows.Forms.Button(); + this.cbTeacherAutoDHCP = new System.Windows.Forms.CheckBox(); this.tcTabControl.SuspendLayout(); this.TabProfile.SuspendLayout(); this.TabClasswork.SuspendLayout(); @@ -94,6 +95,7 @@ // // TabProfile // + this.TabProfile.Controls.Add(this.cbTeacherAutoDHCP); this.TabProfile.Controls.Add(this.btnChangePassword); this.TabProfile.Controls.Add(this.lblFullName); this.TabProfile.Controls.Add(this.tbFullName); @@ -496,6 +498,17 @@ this.btnExit.UseVisualStyleBackColor = true; this.btnExit.Click += new System.EventHandler(this.btnExit_Click); // + // cbTeacherAutoDHCP + // + this.cbTeacherAutoDHCP.AutoSize = true; + this.cbTeacherAutoDHCP.Location = new System.Drawing.Point(20, 107); + this.cbTeacherAutoDHCP.Name = "cbTeacherAutoDHCP"; + this.cbTeacherAutoDHCP.Size = new System.Drawing.Size(210, 21); + this.cbTeacherAutoDHCP.TabIndex = 5; + this.cbTeacherAutoDHCP.Text = "Auto DHCP on network Load"; + this.cbTeacherAutoDHCP.UseVisualStyleBackColor = true; + this.cbTeacherAutoDHCP.CheckedChanged += new System.EventHandler(this.cbTeacherAutoDHCP_CheckedChanged); + // // PersonProfileForm // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); @@ -564,5 +577,6 @@ private System.Windows.Forms.Button btnAllHomeworkToStudents; private System.Windows.Forms.Button btnReadAllStudentHomework; private System.Windows.Forms.Button btnExportStudentPasswords; + private System.Windows.Forms.CheckBox cbTeacherAutoDHCP; } } \ No newline at end of file diff --git a/EduNetworkBuilder/PersonProfileForm.cs b/EduNetworkBuilder/PersonProfileForm.cs index b16fcd0..b1baf17 100644 --- a/EduNetworkBuilder/PersonProfileForm.cs +++ b/EduNetworkBuilder/PersonProfileForm.cs @@ -269,14 +269,19 @@ namespace EduNetworkBuilder if (CurrentUser.isAdmin) this.Text = "Admin: " + CurrentUser.UserName; else this.Text = "Student: " + CurrentUser.UserName; + cbTeacherAutoDHCP.Checked = CurrentUser.UserSettings.AutoDHCPAllMachinesAtNetworkLoad; + tvClasswork.Nodes.Clear(); if (CurrentUser.isAdmin) { + cbTeacherAutoDHCP.Visible = true; UpdateAdminFormFromUser(); } else + { + cbTeacherAutoDHCP.Visible = false; UpdateStudentFormFromUser(); - + } } private void UpdateAdminFormFromUser() @@ -978,5 +983,10 @@ namespace EduNetworkBuilder WriteStudentCSVFile(mydialog.FileName); } + + private void cbTeacherAutoDHCP_CheckedChanged(object sender, EventArgs e) + { + CurrentUser.UserSettings.AutoDHCPAllMachinesAtNetworkLoad = cbTeacherAutoDHCP.Checked; + } } } \ No newline at end of file