public void ClassInitialize() { // Setup initial conditions. listTree = new ListTreeView(Html.CreateDiv()); listTree.SetSize(250, 500); listTree.Background = "#f2f2f2"; TestHarness.AddControl(listTree); // Wire up events. listTree.SelectedNodeChanged += delegate { Log.Info("!! SelectedNodeChanged | SelectedNode: " + listTree.SelectedNode); }; listTree.SelectedParentChanged += delegate { Log.Info("!! SelectedParentChanged | SelectedParent: " + listTree.SelectedParent); }; }
/// <summary>Constructor.</summary> /// <param name="listTree">The list tree under control.</param> /// <param name="backButton">The back button.</param> /// <param name="backMask">The mask which causes the back-button to look like a back button.</param> public ListTreeBackController(ListTreeView listTree, jQueryObject backButton, jQueryObject backMask) { // Store values. this.listTree = listTree; this.backButton = backButton; this.backMask = backMask; // Wire up events. listTree.PropertyChanged += OnPropertyChanged; backButton.Click(OnBackClick); backMask.Click(OnBackClick); }
/// <summary>Constructor.</summary> /// <param name="container">The containing div.</param> public MethodListView(jQueryObject container) : base(container) { // Setup initial conditions. events = Common.Events; // Create the list-tree. listView = new ListTreeView(jQuery.Select(CssSelectors.MethodListContent)); listView.Slide.Duration = SidebarView.SlideDuration; // Construct the data-model root. rootNode = new ListItem(); listView.RootNode = rootNode; // Construct buttons. InsertButtons(); }
/// <summary>Constructor.</summary> public SidebarView(): base(jQuery.Select(CssSelectors.Sidebar)) { // Create the list-tree. rootList = new ListTreeView(jQuery.Select(CssSelectors.SidebarRootList)); rootList.Slide.Duration = SlideDuration; // Create the test-list. methodList = new MethodListView(jQuery.Select(CssSelectors.MethodList)); // Create controllers. backController = new ListTreeBackController( rootList, jQuery.Select(CssSelectors.SidebarToolbar), jQuery.Select(CssSelectors.BackMask)); methodListHeightController = new MethodListHeightController(this); // Wire up events. GlobalEvents.WindowResizeComplete += OnSizeChanged; GlobalEvents.PanelResizeComplete += OnSizeChanged; // Finish up. UpdateLayout(); }
public ListTreePanel(ListTreeView parentList, ITreeNode node) : base(Html.CreateDiv()) { // Store value. this.parentList = parentList; this.node = node; // Insert HTML container. Hide(); Css.AbsoluteFill(Container); // Create list. listView = new ListView(Container); listView.Load(node.Children); // Wire up events. GlobalEvents.HorizontalPanelResized += OnHorizontalPanelResized; node.ChildSelectionChanged += OnChildSelectionChanged; node.AddedChild += OnAddedChild; node.RemovedChild += OnRemovedChild; if (node.Parent != null) node.Parent.RemovingChild += OnParentRemovingChild; // Finish up. SyncWidth(); }