Exemplo n.º 1
0
        private void initLine(Color c, LinkHeadType headType)
        {
            line            = new ArrowLine();
            line.ArrowAngle = 40;
            line.Stroke     = new SolidColorBrush(c);
            switch (headType)
            {
            case LinkHeadType.DoubleHeaded:
                line.ArrowEnds = ArrowEnds.Both;
                break;

            case LinkHeadType.SingleHeaded:
                line.ArrowEnds = ArrowEnds.End;
                break;

            default:
                throw new NotSupportedException();
            }
            line.StrokeThickness = ShapeUtils.LINE_WIDTH;
            line.Effect          = ShapeUtils.ShadowProvider();
            line.Tag             = this;

            selMarker1     = ShapeUtils.MakeLinkEnd();
            selMarker1.Tag = this;

            selMarker2     = ShapeUtils.MakeLinkEnd();
            selMarker2.Tag = this;

            line.MouseWheel += MouseWheel;
        }
Exemplo n.º 2
0
 void initImg()
 {
     if (img == null)
     {
         img        = new Image();
         img.Source = new DrawingImage(drawGrp);
         img.Effect = ShapeUtils.ShadowProvider();
         img.Tag    = this;
     }
 }
Exemplo n.º 3
0
 void initText(Color c)
 {
     _textEnterUC = new TextUC(this);
     _textEnterUC.txtLabel.Effect     = ShapeUtils.ShadowProvider();
     _textEnterUC.txtLabel.Foreground = new SolidColorBrush(c);
     _textEnterUC.DataContext         = this;
     _textEnterUC.Tag          = this;
     _textEnterUC.field.Tag    = this;
     _textEnterUC.handle.Tag   = this;
     _textEnterUC.textChanged += TextChanged;
     _textEnterUC.MouseWheel  += MouseWheel;
 }
Exemplo n.º 4
0
        void initLine(Color c)
        {
            line                 = new Line();
            line.Stroke          = new SolidColorBrush(c);
            line.StrokeThickness = ShapeUtils.LINE_WIDTH;
            line.Effect          = ShapeUtils.ShadowProvider();
            line.Tag             = this;

            selMarker1     = ShapeUtils.MakeMarker();
            selMarker1.Tag = this;

            selMarker2     = ShapeUtils.MakeMarker();
            selMarker2.Tag = this;
        }
Exemplo n.º 5
0
        private void initLine(Color c)
        {
            line                 = new ArrowLine();
            line.Stroke          = new SolidColorBrush(c);
            line.ArrowEnds       = ArrowEnds.Start;
            line.ArrowAngle      = 40;
            line.StrokeThickness = ShapeUtils.LINE_WIDTH;
            line.Effect          = ShapeUtils.ShadowProvider();
            line.Tag             = this;

            selMarker1     = ShapeUtils.MakeMarker();
            selMarker1.Tag = this;

            selMarker2     = ShapeUtils.MakeMarker();
            selMarker2.Tag = this;
        }
Exemplo n.º 6
0
        private void initImg()
        {
            if (img == null)
            {
                img        = new Image();
                img.Source = new DrawingImage(drawGrp);
                img.Effect = ShapeUtils.ShadowProvider();
                img.Tag    = this;

                manipulationBorder                 = new Border();
                manipulationBorder.Tag             = this;
                manipulationBorder.BorderThickness = new Thickness(BORDER_THICK);
                //manipulationBorder.BorderBrush = new SolidColorBrush(Colors.Transparent);
                manipulationBorder.Child = img;
            }
        }
Exemplo n.º 7
0
        void initLine(Color c)
        {
            line                 = new ArrowLine();
            line.ArrowAngle      = 40;
            line.Stroke          = new SolidColorBrush(c);
            line.StrokeThickness = ShapeUtils.LINE_WIDTH;
            line.Effect          = ShapeUtils.ShadowProvider();
            line.Tag             = this;

            selMarker1     = ShapeUtils.MakeLinkEnd();
            selMarker1.Tag = this;

            selMarker2     = ShapeUtils.MakeLinkEnd();
            selMarker2.Tag = this;

            line.MouseWheel += MouseWheel;
        }