コード例 #1
0
		void SelectNode(OptionPanelNode node)
		{
			while (!node.OptionPanelDescriptor.HasOptionPanel && node.Children.Count > 0)
				node = node.Children[0];
			
			if (node == activeNode)
				return;
			
			while (activeNode != null) {
				activeNode.IsActive = false;
				activeNode.IsExpanded = false;
				activeNode = activeNode.Parent;
			}
			
			activeNode = node;
			optionPanelTitle.Text = node.Title;
			if (node.Content is System.Windows.Forms.Control) {
				optionPanelScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
			} else {
				optionPanelScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
			}
			optionPanelContent.SetContent(node.Content);
			
			node.IsExpanded = true;
			node.IsActive = true;
		}
コード例 #2
0
 public OptionPanelNode(IOptionPanelDescriptor optionPanel, OptionPanelNode parent)
 {
     this.OptionPanelDescriptor = optionPanel;
     this.Parent = parent;
     this.dialog = parent.dialog;
 }