예제 #1
0
        protected override void OnDragDrop(DragEventArgs drgevent)
        {
            base.OnDragDrop(drgevent);
            ColumnNode  node        = (ColumnNode)drgevent.Data.GetData(typeof(ColumnNode));
            Point       pt          = this.PointToClient(new Point(drgevent.X, drgevent.Y));
            SectionNode sectionNode = this.GetNodeAt(pt) as SectionNode;

            if (sectionNode != null)
            {
                if (sectionNode == this.nodeGrouping)
                {
                    this.nodeSorting.Nodes.Clear();
                }

                if (!ExplorerTree.NodeExist(sectionNode, node.Text))
                {
                    SortColumnNode newNode = new SortColumnNode(node.Text,
                                                                ExplorerTree.ascendingIcon,
                                                                ExplorerTree.sortColumnMenu);

                    newNode.SortDirection = ListSortDirection.Ascending;
                    this.SelectedNode     = newNode;
                    this.CheckNode(newNode);
                    sectionNode.Nodes.Add(newNode);
                    this.reportModel.ReportSettings.SortColumnCollection.Add(new SortColumn(newNode.Text,
                                                                                            ListSortDirection.Ascending,
                                                                                            typeof(System.String), false));
                    this.OnPropertyChanged("Sort_Group");
                }
            }
        }
예제 #2
0
        private void SetAvailableFields(AbstractColumn af)
        {
            ColumnNode node = new ColumnNode(af.ColumnName, columnIcon);

            node.Tag = this.nodeAvailableFields;
            node.SelectedImageIndex = columnIcon;
            this.nodeAvailableFields.Nodes.Add(node);
        }
예제 #3
0
        private void AddGrouping(SectionNode sectionNode, ColumnNode node)
        {
            this.nodeSorting.Nodes.Clear();
            GroupColumnNode groupNode = new GroupColumnNode(node.Text, ExplorerTree.ascendingIcon,
                                                            ExplorerTree.sortColumnMenuPath);

            groupNode.SortDirection = ListSortDirection.Ascending;
            this.SelectedNode       = groupNode;
            sectionNode.Nodes.Add(groupNode);
            this.reportModel.ReportSettings.GroupColumnsCollection.Add(new GroupColumn(groupNode.Text, 1, ListSortDirection.Ascending));
            this.OnPropertyChanged("Grouping");
        }
예제 #4
0
        private void AddSorting(SectionNode sectionNode, ColumnNode node)
        {
            SortColumnNode sortNode = new SortColumnNode(node.Text,
                                                         ExplorerTree.ascendingIcon,
                                                         ExplorerTree.sortColumnMenuPath);

            sortNode.SortDirection = ListSortDirection.Ascending;
            this.SelectedNode      = sortNode;
            sectionNode.Nodes.Add(sortNode);
            this.reportModel.ReportSettings.SortColumnsCollection.Add(new SortColumn(sortNode.Text,
                                                                                     ListSortDirection.Ascending,
                                                                                     typeof(System.String), false));
            this.OnPropertyChanged("Sorting");
        }
예제 #5
0
        protected override void OnItemDrag(ItemDragEventArgs e)
        {
            base.OnItemDrag(e);
            ColumnNode node = e.Item as ColumnNode;

            if (node != null)
            {
                if (node.ImageIndex == ExplorerTree.columnIcon)
                {
                    this.SelectedNode = node;
                    if (node != null)
                    {
                        this.DoDragDrop(node, DragDropEffects.Copy | DragDropEffects.Scroll);
                    }
                }
            }
        }
예제 #6
0
        protected override void OnDragDrop(DragEventArgs drgevent)
        {
            base.OnDragDrop(drgevent);
            ColumnNode  node        = (ColumnNode)drgevent.Data.GetData(typeof(ColumnNode));
            Point       pt          = this.PointToClient(new Point(drgevent.X, drgevent.Y));
            SectionNode sectionNode = this.GetNodeAt(pt) as SectionNode;

            if ((sectionNode != null) && (!ExplorerTree.NodeExist(sectionNode, node.Text)))
            {
                if (sectionNode == this.nodeGrouping)
                {
                    this.nodeSorting.Nodes.Clear();
                    AddGrouping(sectionNode, node);
                }
                else
                {
                    AddSorting(sectionNode, node);
                }
            }
        }
예제 #7
0
 private void SetGroupColumns()
 {
     foreach (GroupColumn groupColumn in this.reportModel.ReportSettings.GroupColumnsCollection)
     {
         var groupNode = new GroupColumnNode(groupColumn.ColumnName, groupContextMenuPath);
         if (groupColumn.SortDirection == ListSortDirection.Ascending)
         {
             groupNode.ImageIndex = ascendingIcon;
         }
         else
         {
             groupNode.ImageIndex = descendingIcon;
         }
         this.nodeGrouping.Nodes.Add(groupNode);
         foreach (var p in this.reportModel.ReportSettings.AvailableFieldsCollection.Where(p => (p.ColumnName != groupColumn.ColumnName)))
         {
             var cn = new ColumnNode(p.ColumnName, columnIcon);
             groupNode.Nodes.Add(cn);
         }
     }
 }
예제 #8
0
		private void SetAvailableFields (AbstractColumn af)
		{
			ColumnNode node = new ColumnNode(af.ColumnName,columnIcon);
			node.Tag = this.nodeAvailableFields;
			node.SelectedImageIndex = columnIcon;
			this.nodeAvailableFields.Nodes.Add(node);
		}
예제 #9
0
		private void SetGroupColumns()
		{
			foreach (GroupColumn groupColumn in this.reportModel.ReportSettings.GroupColumnsCollection)
			{
				var groupNode  = new GroupColumnNode(groupColumn.ColumnName,groupContextMenuPath);
				if (groupColumn.SortDirection  == ListSortDirection.Ascending) {
					groupNode.ImageIndex  = ascendingIcon;
				} else {
					groupNode.ImageIndex = descendingIcon;
				}
				this.nodeGrouping.Nodes.Add(groupNode);
				foreach (var p in this.reportModel.ReportSettings.AvailableFieldsCollection.Where(p => (p.ColumnName != groupColumn.ColumnName))) 
				{
					var cn = new ColumnNode(p.ColumnName,columnIcon);
					groupNode.Nodes.Add(cn);
				}
			}
		}
예제 #10
0
		private void AddGrouping(SectionNode sectionNode,ColumnNode node)
		{
			this.nodeSorting.Nodes.Clear();
			GroupColumnNode groupNode = new GroupColumnNode(node.Text,ExplorerTree.ascendingIcon,
			                                                ExplorerTree.sortColumnMenuPath);
			groupNode.SortDirection = ListSortDirection.Ascending;
			this.SelectedNode = groupNode;
			sectionNode.Nodes.Add(groupNode);
			this.reportModel.ReportSettings.GroupColumnsCollection.Add(new GroupColumn(groupNode.Text, 1,ListSortDirection.Ascending));
			this.OnPropertyChanged ("Grouping");
		}
예제 #11
0
		private void AddSorting(SectionNode sectionNode, ColumnNode node)
		{
			SortColumnNode sortNode = new SortColumnNode (node.Text,
			                                              ExplorerTree.ascendingIcon,
			                                              ExplorerTree.sortColumnMenuPath);

			sortNode.SortDirection = ListSortDirection.Ascending;
			this.SelectedNode = sortNode;
			sectionNode.Nodes.Add(sortNode);
			this.reportModel.ReportSettings.SortColumnsCollection.Add(new SortColumn(sortNode.Text,
			                                                                         ListSortDirection.Ascending,
			                                                                         typeof(System.String),false));
			this.OnPropertyChanged ("Sorting");
			
		}