Esempio n. 1
0
        /// <summary>
        /// Handles event fired when a child is added to the current item.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ChildItems_ItemAdded(object sender, Mulholland.Applications.QSet.QSetItemCollection.ItemMovedEventArgs e)
        {
            QSetItemTreeNode newNode = new QSetItemTreeNode(e.Item);

            base.Nodes.Add(newNode);
            base.Expand();
            newNode.EnsureVisible();
            newNode.TreeView.SelectedNode = newNode;
        }
Esempio n. 2
0
 /// <summary>
 /// Displays a QSet in the explorer.
 /// </summary>
 /// <param name="queueSet">QSet to display.</param>
 private void DisplayQSet(QSet queueSet)
 {
     _queueSetTreeView.Nodes.Clear();
     if (_queueSet != null)
     {
         QSetItemTreeNode queueSetNode = new QSetItemTreeNode(_queueSet);
         _queueSetTreeView.Nodes.Add((QSetItemTreeNode)queueSetNode);
         DisplayQSetChildItems(queueSet, queueSetNode);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Recursively populates the tree view with all child items of a folder item.
        /// </summary>
        /// <param name="parentItem">Parent folder item.</param>
        /// <param name="parentNode">Parent node.</param>
        private void DisplayQSetChildItems(QSetFolderItem parentFolderItem, TreeNode parentNode)
        {
            foreach (QSetItemBase item in parentFolderItem.ChildItems)
            {
                QSetItemTreeNode itemNode = new QSetItemTreeNode(item);
                parentNode.Nodes.Add((TreeNode)itemNode);

                if (item is QSetFolderItem)
                {
                    DisplayQSetChildItems((QSetFolderItem)item, itemNode);
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Searches for a node which contains a particular QSetItemBase object.
        /// </summary>
        /// <param name="item">QSetItemBase to search for.</param>
        /// <returns>The node hosting the item if found, else null.</returns>
        private QSetItemTreeNode FindNode(QSetItemBase item)
        {
            QSetItemTreeNode result = null;

            foreach (TreeNode node in _queueSetTreeView.Nodes)
            {
                if (((QSetItemTreeNode)node).QSetItem == item)
                {
                    result = (QSetItemTreeNode)node;
                    break;
                }
            }

            return(result);
        }
Esempio n. 5
0
		/// <summary>
		/// Handles event fired when a child is added to the current item.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void ChildItems_ItemAdded(object sender, Mulholland.Applications.QSet.QSetItemCollection.ItemMovedEventArgs e)
		{
			QSetItemTreeNode newNode = new QSetItemTreeNode(e.Item);
			base.Nodes.Add(newNode);
			base.Expand();
			newNode.EnsureVisible();
			newNode.TreeView.SelectedNode = newNode;
		}
Esempio n. 6
0
		/// <summary>
		/// Recursively populates the tree view with all child items of a folder item.
		/// </summary>
		/// <param name="parentItem">Parent folder item.</param>
		/// <param name="parentNode">Parent node.</param>
		private void DisplayQSetChildItems(QSetFolderItem parentFolderItem, TreeNode parentNode)
		{
			foreach (QSetItemBase item in parentFolderItem.ChildItems)
			{
				QSetItemTreeNode itemNode = new QSetItemTreeNode(item);
				parentNode.Nodes.Add((TreeNode)itemNode);

				if (item is QSetFolderItem)
					DisplayQSetChildItems((QSetFolderItem)item, itemNode);
			}
		}
Esempio n. 7
0
		/// <summary>
		/// Displays a QSet in the explorer.
		/// </summary>
		/// <param name="queueSet">QSet to display.</param>
		private void DisplayQSet(QSet queueSet)
		{
			_queueSetTreeView.Nodes.Clear();
			if (_queueSet != null)	
			{
				QSetItemTreeNode queueSetNode = new QSetItemTreeNode(_queueSet);
				_queueSetTreeView.Nodes.Add((QSetItemTreeNode)queueSetNode);
				DisplayQSetChildItems(queueSet, queueSetNode);
			}			
		}