Change to correct tab when student is selected, and when "students" (overview) is selected
This commit is contained in:
parent
cbc36d7b75
commit
2e535f1015
13
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
13
EduNetworkBuilder/PersonProfileForm.Designer.cs
generated
@ -55,6 +55,7 @@
|
||||
this.TabStudent = new System.Windows.Forms.TabPage();
|
||||
this.tvClasswork = new System.Windows.Forms.TreeView();
|
||||
this.btnExit = new System.Windows.Forms.Button();
|
||||
this.TabStudents = new System.Windows.Forms.TabPage();
|
||||
this.tcTabControl.SuspendLayout();
|
||||
this.TabProfile.SuspendLayout();
|
||||
this.TabClasswork.SuspendLayout();
|
||||
@ -152,6 +153,7 @@
|
||||
this.tcTreeData.Controls.Add(this.tabClass);
|
||||
this.tcTreeData.Controls.Add(this.TabHomework);
|
||||
this.tcTreeData.Controls.Add(this.TabStudent);
|
||||
this.tcTreeData.Controls.Add(this.TabStudents);
|
||||
this.tcTreeData.Location = new System.Drawing.Point(145, 9);
|
||||
this.tcTreeData.Name = "tcTreeData";
|
||||
this.tcTreeData.SelectedIndex = 0;
|
||||
@ -333,6 +335,16 @@
|
||||
this.btnExit.UseVisualStyleBackColor = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// TabStudents
|
||||
//
|
||||
this.TabStudents.Location = new System.Drawing.Point(4, 25);
|
||||
this.TabStudents.Name = "TabStudents";
|
||||
this.TabStudents.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.TabStudents.Size = new System.Drawing.Size(256, 206);
|
||||
this.TabStudents.TabIndex = 3;
|
||||
this.TabStudents.Text = "Student";
|
||||
this.TabStudents.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PersonProfileForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
@ -384,5 +396,6 @@
|
||||
private System.Windows.Forms.Button btnImportStudents;
|
||||
private System.Windows.Forms.Button btnHWDelete;
|
||||
private System.Windows.Forms.Button btnLaunch;
|
||||
private System.Windows.Forms.TabPage TabStudents;
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ namespace EduNetworkBuilder
|
||||
public partial class PersonProfileForm : Form
|
||||
{
|
||||
enum TopTab { profiletab=0, classworktab=1}
|
||||
enum TreeDataTab { classtab=0, homeworktab=1, studenttab=2 }
|
||||
enum TreeDataTab { classtab=0, homeworktab=1, studenttab=2 , studentstab =3}
|
||||
PersonClass CurrentUser = null;
|
||||
string FileName = "";
|
||||
PersonClass ViewedUser = null;
|
||||
@ -315,13 +315,18 @@ namespace EduNetworkBuilder
|
||||
ChangeTreeDataTab(TreeDataTab.homeworktab);
|
||||
UpdateFormFromSchoolwork(SWC);
|
||||
}
|
||||
if(Node.Tag is PersonClass)
|
||||
{
|
||||
//It is an individual student
|
||||
ChangeTreeDataTab(TreeDataTab.studenttab);
|
||||
}
|
||||
if(Node.Tag is string)
|
||||
{
|
||||
string Selected = (string)Node.Tag;
|
||||
if (Selected == "Class") //Do not translate this
|
||||
ChangeTreeDataTab(TreeDataTab.classtab);
|
||||
if (Selected == "Students") //Do not translate this
|
||||
ChangeTreeDataTab(TreeDataTab.studenttab);
|
||||
ChangeTreeDataTab(TreeDataTab.studentstab);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user