Пример #1
0
        private void CommentBox_TextChanged(object sender, EventArgs args)
        {
            CommentBoxControl commentBoxControl = sender as CommentBoxControl;

            if (commentBoxControl != null)
            {
                CommentText = commentBoxControl.Text;
            }
        }
Пример #2
0
        public Annotation(Pen pen, RectangleGeometry marking, CommentBoxControl commentBox, bool isReadOnly)
        {
            _Pen        = pen;
            _Marking    = marking;
            _CommentBox = commentBox;
            _IsReadOnly = isReadOnly;

            if (_CommentBox != null)
            {
                _CommentBox.TextChangedEvent += new EventHandler(CommentBox_TextChanged);
            }
        }
Пример #3
0
        private Annotation Create(Rect rect, string commentText, bool IsReadOnly, double radiusX, double radiusY)
        {
            Pen pen = new Pen(Brushes.Goldenrod, 3);

            pen.LineJoin = PenLineJoin.Round;

            CommentBoxControl commentBox = new CommentBoxControl();

            commentBox.IsReadOnly = IsReadOnly;
            commentBox.Text       = commentText;
            commentBox.Width      = 275;
            commentBox.Height     = 165;
            visualChildren.Add(commentBox);

            Annotation annotation = new Annotation(pen, new RectangleGeometry(rect, radiusX, radiusY), commentBox, commentText, IsReadOnly);

            return(annotation);
        }
        public void ShowUI()
        {
            Form form = new Form();

            form.Size            = new Size(1080, 490);
            form.FormBorderStyle = FormBorderStyle.FixedSingle;
            form.Text            = "Video trực tiếp";

            VideoViewerWF videoViewer = new VideoViewerWF();

            videoViewer.Location = new Point(0, 0);
            videoViewer.Size     = new Size(800, 450);
            videoViewer.SetImageProvider(provider);
            videoViewer.Start();
            form.Controls.Add(videoViewer);

            CommentBoxControl commentControls = new CommentBoxControl();

            commentControls.Location = new Point(810, 0);
            form.Controls.Add(commentControls);

            form.ShowDialog();
        }
Пример #5
0
 public Annotation(Pen pen, RectangleGeometry marking, CommentBoxControl commentBox, string commentText, bool isReadOnly, bool isSelected) :
     this(pen, marking, commentBox, commentText, isReadOnly)
 {
     _IsSelected = isSelected;
 }
Пример #6
0
 public Annotation(Pen pen, RectangleGeometry marking, CommentBoxControl commentBox, string commentText, bool isReadOnly) :
     this(pen, marking, commentBox, isReadOnly)
 {
     _CommentText = commentText;
 }