Пример #1
0
 public void Find <T>(TreeViewX treeView, Action <T> handler) where T : IDataModel
 {
     foreach (var child in treeView.Nodes)
     {
         NavigateChild(child as DataTreeNodeX,
                       node => { handler((T)node.Model); }, SearchNodeFind);
     }
 }
Пример #2
0
 public void Goto(TreeViewX treeView)
 {
     foreach (var child in treeView.Nodes)
     {
         NavigateChild(child as DataTreeNodeX,
                       node => {
             node.TreeView.SelectedNode = node;
             if (onNavigated != null)
             {
                 onNavigated(node);
             }
         }, SearchNodeGoto);
     }
 }
Пример #3
0
		public Analyzer(IApp app) {
			Text = "Analyzer";
			HideOnClose = true;

			treeView = new TreeViewX(app) {
				Dock = DockStyle.Fill,
				BorderStyle = BorderStyle.None
			};
			treeView.KeyDown += OnTreeViewKeyDown;
			Controls.Add(treeView);

			app.DockArea.DockWindows[DockState.DockBottom].BringToFront();
			Show(app.DockArea, DockState.DockBottom);
			Hide();
		}
Пример #4
0
		public ModuleManager(IApp app) {
			this.app = app;

			Text = "Modules";
			Height = 600;
			CloseButtonVisible = false;
			CloseButton = false;

			var split = new SplitContainer {
				Orientation = Orientation.Horizontal,
				Dock = DockStyle.Fill
			};
			Controls.Add(split);

			treeView = new TreeViewX(app) {
				Dock = DockStyle.Fill,
				BorderStyle = BorderStyle.None
			};
			treeView.AfterSelect += OnNodeSelected;
			treeView.KeyDown += OnTreeViewKeyDown;
			split.Panel1.Controls.Add(treeView);

			infos = new InfoPanel {
				Dock = DockStyle.Fill
			};
			split.Panel2.Controls.Add(infos);

			split.SplitterDistance = 400;
			Icon = null;

			history.Navigated += (sender, e) => {
				navCount++;
				try {
					if (history.Current.Model.Node != null &&
					    history.Current.Model.Node.TreeView != null)
						treeView.SelectedNode = history.Current.Model.Node;
					else
						NavigateModel(history.Current.Model);
				}
				finally {
					navCount--;
				}
			};
			resolver = new ModuleResolver(this);
		}