When students or class selected in tree, jump to the apropriate tab
This commit is contained in:
parent
5c6fe6ffbb
commit
7f8879a19b
@ -153,7 +153,7 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
//We have a class tree
|
//We have a class tree
|
||||||
Node = new TreeNode(NB.Translate("PPF_Class"));
|
Node = new TreeNode(NB.Translate("PPF_Class"));
|
||||||
Node.Tag = "Class";
|
Node.Tag = "Class"; //Do not translate this
|
||||||
TreeNode Top = Node;
|
TreeNode Top = Node;
|
||||||
tvClasswork.Nodes.Add(Node);
|
tvClasswork.Nodes.Add(Node);
|
||||||
foreach(SchoolworkClass SWC in CurrentUser.Projects)
|
foreach(SchoolworkClass SWC in CurrentUser.Projects)
|
||||||
@ -164,7 +164,7 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
//we have a students tree
|
//we have a students tree
|
||||||
Node = new TreeNode(NB.Translate("PPF_Students"));
|
Node = new TreeNode(NB.Translate("PPF_Students"));
|
||||||
Node.Tag = "Students";
|
Node.Tag = "Students"; //Do not translate this
|
||||||
tvClasswork.Nodes.Add(Node);
|
tvClasswork.Nodes.Add(Node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,6 +238,14 @@ namespace EduNetworkBuilder
|
|||||||
ChangeTreeDataTab(TreeDataTab.homeworktab);
|
ChangeTreeDataTab(TreeDataTab.homeworktab);
|
||||||
UpdateFormFromSchoolwork(SWC);
|
UpdateFormFromSchoolwork(SWC);
|
||||||
}
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveSchoolworkDataFromForm(object sender, EventArgs e)
|
void SaveSchoolworkDataFromForm(object sender, EventArgs e)
|
||||||
|
Loading…
Reference in New Issue
Block a user