Example #1
0
        protected override void CreateDragFeedbackImages(IList <Activity> draggedActivities)
        {
            base.CreateDragFeedbackImages(draggedActivities);
            List <Image> list = new List <Image>();

            using (Graphics graphics = base.ParentView.CreateGraphics())
            {
                foreach (Activity activity in draggedActivities)
                {
                    ActivityDesigner designer = ActivityDesigner.GetDesigner(activity);
                    if (designer == null)
                    {
                        designer = ActivityDesigner.CreateDesigner(base.ParentView, activity);
                    }
                    list.Add(designer.GetPreviewImage(graphics));
                }
            }
            base.ParentView.InvalidateClientRectangle(Rectangle.Empty);
            this.draggedDesignerImages = list;
        }
        protected override void CreateDragFeedbackImages(IList <Activity> draggedActivities)
        {
            base.CreateDragFeedbackImages(draggedActivities);

            List <Image> imageList = new List <Image>();

            using (Graphics graphics = ParentView.CreateGraphics())
            {
                foreach (Activity activity in draggedActivities)
                {
                    ActivityDesigner previewDesigner = ActivityDesigner.GetDesigner(activity);
                    if (previewDesigner == null)
                    {
                        previewDesigner = ActivityDesigner.CreateDesigner(ParentView, activity);
                    }
                    imageList.Add(previewDesigner.GetPreviewImage(graphics));
                }
            }

            //We create the designer images for designers associates with existing activities
            ParentView.InvalidateClientRectangle(Rectangle.Empty);
            this.draggedDesignerImages = imageList;
        }