コード例 #1
0
        public override string ToString()
        {
            var lineSign   = IsDotted ? '.' : '-';
            var len        = Math.Max(2, ArrowLength);
            var leftLength = len / 2;
            var leftPart   = new string(lineSign, leftLength);
            var rightPart  = new string(lineSign, len - leftLength);
            var sugg       = ArrowDirection == UmlArrowDirections.Auto
                ? ""
                : ArrowDirection.ToString().ToLower();

            if (!Color.IsEmpty)
            {
                sugg = "[" + Color.PlantUmlCode + "]" + sugg;
            }
            var sb = new StringBuilder();

            if (!string.IsNullOrEmpty(LeftSignDescription))
            {
                sb.Append(LeftSignDescription.AddQuotes() + " ");
            }
            sb.Append(LeftSignText + leftPart + sugg + rightPart + RightSignText);
            if (!string.IsNullOrEmpty(RightSignDescription))
            {
                sb.Append(" " + RightSignDescription.AddQuotes());
            }
            return(sb.ToString());
        }
コード例 #2
0
ファイル: PlantUml.cs プロジェクト: hundker/AutoUml-2
            public override string ToString()
            {
                var line = Dotted ? "." : "-";
                var sugg = ArrowDirection == UmlArrowDirections.Auto
                    ? ""
                    : ArrowDirection.ToString().ToLower();

                return(LeftSign + line + sugg + line + RightSign);
            }
コード例 #3
0
ファイル: BoardSpace.cs プロジェクト: NickHeiner/chivalry
 public void SetArrowDirection(ArrowDirection direction)
 {
     VisualStateManager.GoToState(this, direction.ToString().ToLower(), true);
 }