Add auto-DHCP option to teacher setting window
This commit is contained in:
parent
e086782532
commit
4779bf2425
14
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
14
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user