Example #1
0
 public void Load(string filename)
 {
     using (var stream = File.OpenRead(filename)) {
         Document = DiagramDocument.Load(stream);
         AfterAction(true);
     }
 }
Example #2
0
        public DiagramControl()
        {
            _mainLayer = Layers[0];             // predefined

            _mainLayer.Shapes = new MSet <LLShape> {
                _shapeGroup
            };
            _selAdornerLayer        = AddLayerAbove(_mainLayer, false);
            _selAdornerLayer.Shapes = new MSet <LLShape> {
                _selAdornerGroup
            };
            _dragAdornerLayer        = AddLayerAbove(_selAdornerLayer, false);
            _dragAdornerLayer.Shapes = new MSet <LLShape> {
                _dragAdornerGroup
            };
            _shapeGroup.Transform       = _scrollZoom;
            _selAdornerGroup.Transform  = _scrollZoom;
            _dragAdornerGroup.Transform = _scrollZoom;

            _gestureAnalyzer = new DiagramGestureAnalyzer(this);
            Document         = new DiagramDocument();

            LineStyle = new DiagramDrawStyle {
                LineColor = Color.Black, LineWidth = 2, TextColor = Color.Blue, FillColor = Color.FromArgb(64, Color.Gray)
            };
            LineStyle.Name     = "Default";
            BoxStyle           = (DiagramDrawStyle)LineStyle.Clone();
            BoxStyle.LineColor = Color.DarkGreen;
            MarkerRadius       = 5;
            MarkerType         = MarkerPolygon.Circle;
            FromArrow          = null;
            ToArrow            = Arrowhead.Arrow30deg;
        }
Example #3
0
		public void Load(string filename)
		{
			using (var stream = File.OpenRead(filename)) {
				Document = DiagramDocument.Load(stream);
				AfterAction(true);
			}
		}
Example #4
0
		public DiagramControl()
		{
			_mainLayer = Layers[0]; // predefined
			
			_mainLayer.Shapes = new MSet<LLShape> { _shapeGroup };
			_selAdornerLayer = AddLayerAbove(_mainLayer, false);
			_selAdornerLayer.Shapes = new MSet<LLShape> { _selAdornerGroup };
			_dragAdornerLayer = AddLayerAbove(_selAdornerLayer, false);
			_dragAdornerLayer.Shapes = new MSet<LLShape> { _dragAdornerGroup };
			_shapeGroup.Transform = _scrollZoom;
			_selAdornerGroup.Transform = _scrollZoom;
			_dragAdornerGroup.Transform = _scrollZoom;

			_gestureAnalyzer = new DiagramGestureAnalyzer(this);
			Document = new DiagramDocument();
			
			LineStyle = new DiagramDrawStyle { LineColor = Color.Black, LineWidth = 2, TextColor = Color.Blue, FillColor = Color.FromArgb(64, Color.Gray) };
			LineStyle.Name = "Default";
			BoxStyle = (DiagramDrawStyle)LineStyle.Clone();
			BoxStyle.LineColor = Color.DarkGreen;
			MarkerRadius = 5;
			MarkerType = MarkerPolygon.Circle;
			FromArrow = null;
			ToArrow = Arrowhead.Arrow30deg;
		}
Example #5
0
 public DDUndoStack(DiagramDocument self)
 {
     _self = self;
 }
Example #6
0
			public DDUndoStack(DiagramDocument self) { _self = self; }