示例#1
0
        public virtual DiagramSelection CreateDragSelection()
        {
            DiagramSelection selection1 = new DiagramSelection(null);

            Shapes.RectangleGraph rectangle1 = new Shapes.RectangleGraph();
            rectangle1.Bounds  = base.CurrentObject.Bounds;
            rectangle1.Visible = false;
            base.View.Layers.Default.Add(rectangle1);
            selection1.Add(rectangle1);
            Shapes.DiagramShapeCollection collection1 = new Shapes.DiagramShapeCollection();
            CollectionEnumerator          enumerator1 = ((this.EffectiveSelection != null) ? this.EffectiveSelection : base.Selection).GetEnumerator();

            while (enumerator1.MoveNext())
            {
                Shapes.DiagramShape obj1 = enumerator1.Current;
                collection1.Add(obj1.DraggingObject);
            }
            RectangleF ef1     = DiagramDocument.ComputeBounds(collection1, base.View);
            float      single1 = base.View.WorldScale.Width;

            if (((ef1.Width * single1) > 2000f) || ((ef1.Height * single1) > 2000f))
            {
                single1 *= System.Math.Min((float)(2000f / (ef1.Width * single1)), (float)(2000f / (ef1.Height * single1)));
            }
            Bitmap bitmap1 = base.View.GetBitmapFromCollection(collection1, ef1, single1, false);

            Shapes.DiagramImage image1 = new Shapes.DiagramImage();
            image1.Image  = bitmap1;
            image1.Bounds = new RectangleF(ef1.X, ef1.Y, ((float)bitmap1.Width) / single1, ((float)bitmap1.Height) / single1);
            base.View.Layers.Default.Add(image1);
            selection1.Add(image1);
            return(selection1);
        }
示例#2
0
 protected virtual DiagramShape CreateBackground()
 {
     RectangleGraph rectangle1 = new RectangleGraph();
     rectangle1.Shadowed = true;
     rectangle1.Selectable = false;
     rectangle1.Pen = DiagramGraph.Pens_LightGray;
     rectangle1.Brush = DiagramGraph.Brushes_LemonChiffon;
     return rectangle1;
 }
示例#3
0
        protected virtual DiagramShape CreateBackground()
        {
            RectangleGraph rectangle1 = new RectangleGraph();

            rectangle1.Selectable = false;
            rectangle1.Pen        = null;
            rectangle1.Brush      = DiagramGraph.SystemBrushes_Control;
            return(rectangle1);
        }
示例#4
0
        protected virtual DiagramShape CreateBackground()
        {
            RectangleGraph rectangle1 = new RectangleGraph();

            rectangle1.Selectable = false;
            rectangle1.Resizable  = false;
            rectangle1.Reshapable = false;
            rectangle1.Brush      = DiagramGraph.Brushes_LightGray;
            return(rectangle1);
        }
示例#5
0
        protected virtual DiagramShape CreateBackground()
        {
            RectangleGraph rectangle1 = new RectangleGraph();

            rectangle1.Shadowed   = true;
            rectangle1.Selectable = false;
            rectangle1.Pen        = DiagramGraph.Pens_LightGray;
            rectangle1.Brush      = DiagramGraph.Brushes_LemonChiffon;
            return(rectangle1);
        }
示例#6
0
        protected virtual DiagramShape CreateIcon(ResourceManager res, string iconname)
        {
            if (iconname != null)
            {
                NodeIcon icon1 = new NodeIcon();
                if (res != null)
                {
                    icon1.ResourceManager = res;
                }
                icon1.Name            = iconname;
                icon1.MinimumIconSize = new SizeF(20f, 20f);
                icon1.MaximumIconSize = new SizeF(1000f, 2000f);
                icon1.Size            = icon1.MinimumIconSize;
                return(icon1);
            }
            RectangleGraph rectangle1 = new RectangleGraph();

            rectangle1.Selectable = false;
            rectangle1.Size       = new SizeF(20f, 20f);
            return(rectangle1);
        }
示例#7
0
 protected virtual DiagramShape CreateBackground()
 {
     RectangleGraph rectangle1 = new RectangleGraph();
     rectangle1.Selectable = false;
     rectangle1.Resizable = false;
     rectangle1.Reshapable = false;
     rectangle1.Brush = DiagramGraph.Brushes_LightGray;
     return rectangle1;
 }
示例#8
0
 protected virtual DiagramShape CreateIcon(ResourceManager res, string iconname)
 {
     if (iconname != null)
     {
         NodeIcon icon1 = new NodeIcon();
         if (res != null)
         {
             icon1.ResourceManager = res;
         }
         icon1.Name = iconname;
         icon1.MinimumIconSize = new SizeF(20f, 20f);
         icon1.MaximumIconSize = new SizeF(100f, 200f);
         icon1.Size = icon1.MinimumIconSize;
         return icon1;
     }
     RectangleGraph rectangle1 = new RectangleGraph();
     rectangle1.Selectable = false;
     rectangle1.Size = new SizeF(20f, 20f);
     return rectangle1;
 }
示例#9
0
 public virtual DiagramSelection CreateDragSelection()
 {
     DiagramSelection selection1 = new DiagramSelection(null);
     Shapes.RectangleGraph rectangle1 = new Shapes.RectangleGraph();
     rectangle1.Bounds = base.CurrentObject.Bounds;
     rectangle1.Visible = false;
     base.View.Layers.Default.Add(rectangle1);
     selection1.Add(rectangle1);
     Shapes.DiagramShapeCollection collection1 = new Shapes.DiagramShapeCollection();
     CollectionEnumerator enumerator1 = ((this.EffectiveSelection != null) ? this.EffectiveSelection : base.Selection).GetEnumerator();
     while (enumerator1.MoveNext())
     {
         Shapes.DiagramShape obj1 = enumerator1.Current;
         collection1.Add(obj1.DraggingObject);
     }
     RectangleF ef1 = DiagramDocument.ComputeBounds(collection1, base.View);
     float single1 = base.View.WorldScale.Width;
     if (((ef1.Width * single1) > 2000f) || ((ef1.Height * single1) > 2000f))
     {
         single1 *= System.Math.Min((float)(2000f / (ef1.Width * single1)), (float)(2000f / (ef1.Height * single1)));
     }
     Bitmap bitmap1 = base.View.GetBitmapFromCollection(collection1, ef1, single1, false);
     Shapes.DiagramImage image1 = new Shapes.DiagramImage();
     image1.Image = bitmap1;
     image1.Bounds = new RectangleF(ef1.X, ef1.Y, ((float)bitmap1.Width) / single1, ((float)bitmap1.Height) / single1);
     base.View.Layers.Default.Add(image1);
     selection1.Add(image1);
     return selection1;
 }