private IUIControl CreateTreeControl() { UIInput input = new UIInput(); List <IDataNode> dataNodes = new List <IDataNode>(); ExperimentNode experiment1 = new ExperimentNode("Experiment1"); CompoundsGroupNode compoundsGroup = new CompoundsGroupNode("CompoundsGroup1"); ClusterNode cluster = new ClusterNode("Cluster1"); cluster.AddChild(new ExperimentNode("Experiment2")); ExperimentNode experiment3 = new ExperimentNode("Experiment3"); experiment3.HoverText = "My experiment"; experiment3.AddChild(new CompoundsGroupNode("CompoundsGroup2")); experiment3.AddChild(new CompoundsGroupNode("CompoundsGroup3")); cluster.AddChild(experiment3); experiment1.AddChild(compoundsGroup); experiment1.AddChild(cluster); dataNodes.Add(experiment1); input.AddInput("TreeRoots", dataNodes); //Action SingleClickAction = SingleClick; //input.AddInput("SingleClickAction", SingleClickAction); //Action DoubleClickAction = DoubleClick; //input.AddInput("DoubleClickAction", DoubleClickAction); IUIControl panel = this.UnityContainer.Resolve <IUIControl>("Tree"); panel.SetInput(input); return(panel); }
private void CreateDataNodeTree() { experiment1 = new ExperimentNode("Experiment1"); CompoundsGroupNode compoundsGroup = new CompoundsGroupNode("CompoundsGroup1"); ClusterNode cluster = new ClusterNode("Cluster1"); cluster.AddChild(new ExperimentNode("Experiment2")); ExperimentNode experiment3 = new ExperimentNode("Experiment3"); experiment3.HoverText = "My experiment"; experiment3.AddChild(new CompoundsGroupNode("CompoundsGroup2")); experiment3.AddChild(new CompoundsGroupNode("CompoundsGroup3")); cluster.AddChild(experiment3); experiment1.AddChild(compoundsGroup); experiment1.AddChild(cluster); //return Util.GetTree(experiment1); }
private XamDataTree CreateXamDataTree() { XamDataTree MyTree = new XamDataTree(); ExperimentNode experiment1 = new ExperimentNode("Experiment1"); CompoundsGroupNode compoundsGroup = new CompoundsGroupNode("CompoundsGroup1"); ClusterNode cluster = new ClusterNode("Cluster1"); cluster.AddChild(new ExperimentNode("Experiment2")); ExperimentNode experiment3 = new ExperimentNode("Experiment3"); experiment3.HoverText = "My experiment"; experiment3.AddChild(new CompoundsGroupNode("CompoundsGroup2")); experiment3.AddChild(new CompoundsGroupNode("CompoundsGroup3")); cluster.AddChild(experiment3); experiment1.AddChild(compoundsGroup); experiment1.AddChild(cluster); MyTree.ItemsSource = new ObservableCollection <IDataNode> { experiment1 }; NodeLayout mylayout = new NodeLayout(); mylayout.Key = "NodeLayout1"; mylayout.TargetTypeName = "IDataNode"; mylayout.DisplayMemberPath = "Name"; MyTree.GlobalNodeLayouts.Add(mylayout); return(MyTree); }