public void AddPart2GUI(Part part, RenderInterface iRen, ListBox PartBox, TreeView Tree) { // Define Part TreeView item TreeViewItem TreePart = (TreeViewItem)Tree.Items[0]; // Add Part to Selection Box and Viewport PartBox.Items.Add("PID " + part.ID.ToString() + ": " + part.Name); iRen.AddActor(part.Get_Actor()); iRen.AddActor(part.GetEdges()); iRen.AppendFaces.AddInput(part.GetFaces()); // Add Part to TreeView TreeViewItem item = new TreeViewItem() { Header = "Part ID " + part.ID.ToString() + ": " + part.Name }; TreePart.Items.Add(item); TreePart.IsExpanded = true; // Expand Parts in Tree }
public void AddBC2GUI(BoundaryCondition BC, RenderInterface iRen, TreeView Tree, bool Selected) { // Define BC TreeView item TreeViewItem TreeBC = (TreeViewItem)Tree.Items[2]; // Add BC actor to Viewport iRen.AddActor(BC.GetActor()[0]); iRen.AddActor(BC.GetActor()[1]); iRen.AddActor(BC.GetActor()[2]); BC.HideActor(); // Add BC to TreeView TreeViewItem item = new TreeViewItem() { Header = "BC ID " + BC.ID.ToString() + ": " + BC.Name, IsSelected = Selected }; TreeBC.Items.Add(item); TreeBC.IsExpanded = true; }