コード例 #1
0
        private void CreateCommentRelationship()
        {
            CommentShape shape1 = first as CommentShape;
            CommentShape shape2 = second as CommentShape;

            if (shape1 != null)
            {
                diagram.AddCommentRelationship(shape1.Comment, second.Entity);
            }
            else if (shape2 != null)
            {
                diagram.AddCommentRelationship(shape2.Comment, first.Entity);
            }
            else
            {
                MessageBox.Show(Strings.ErrorCannotCreateRelationship);
            }
        }