- Timestamp:
- 08/05/09 11:18:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP/3.3/FunctionTreeView.cs
r2235 r2236 30 30 private IFunctionTree functionTree; 31 31 private IFunctionTree selectedBranch; 32 //private IFunctionTreeNameGenerator nameGenerator;33 //private IFunctionTreeNameGenerator[] allNameGenerators;34 //private MenuItem representationsMenu;35 32 36 33 public FunctionTreeView() { 37 //nameGenerator = new DefaultFunctionTreeNameGenerator();38 34 InitializeComponent(); 39 40 DiscoveryService discoveryService = new DiscoveryService();41 //allNameGenerators = discoveryService.GetInstances<IFunctionTreeNameGenerator>();42 //representationsMenu = new MenuItem();43 //representationsMenu.Text = "Tree representation";44 //representationsMenu.Name = "Tree representation";45 //foreach (IFunctionTreeNameGenerator generator in allNameGenerators) {46 // MenuItem mi = new MenuItem(generator.Name, MakeNameGeneratorDelegate(generator), Shortcut.None);47 // if (generator is DefaultFunctionTreeNameGenerator) mi.Checked = true;48 // else mi.Checked = false;49 // mi.Tag = generator;50 // representationsMenu.MenuItems.Add(mi);51 //}52 35 } 53 36 … … 61 44 funTreeView.Nodes.Clear(); 62 45 TreeNode rootNode = new TreeNode(); 63 rootNode.Name = functionTree.ToString(); // functionTree.Function.Name;64 rootNode.Text = functionTree.ToString(); // nameGenerator.GetName(functionTree);46 rootNode.Name = functionTree.ToString(); 47 rootNode.Text = functionTree.ToString(); 65 48 rootNode.Tag = functionTree; 66 49 treeNodeContextMenu.MenuItems.Clear(); 67 //treeNodeContextMenu.MenuItems.Add(representationsMenu);68 50 DiscoveryService discoveryService = new DiscoveryService(); 69 51 IFunctionTreeSerializer[] exporters = discoveryService.GetInstances<IFunctionTreeSerializer>(); … … 90 72 funTreeView.ExpandAll(); 91 73 } 92 93 //private EventHandler MakeNameGeneratorDelegate(IFunctionTreeNameGenerator generator) {94 // return delegate(object source, EventArgs args) {95 // IFunctionTreeNameGenerator g = (IFunctionTreeNameGenerator)((MenuItem)source).Tag;96 // this.nameGenerator = g;97 // foreach (MenuItem otherMenuItem in representationsMenu.MenuItems) otherMenuItem.Checked = false;98 // ((MenuItem)source).Checked = true;99 // UpdateControls();100 // };101 //}102 74 103 75 private EventHandler MakeExporterDelegate(IFunctionTreeSerializer exporter) {
Note: See TracChangeset
for help on using the changeset viewer.