Beispiel #1
0
 /// <summary>
 /// Returns a <see cref="T:System.String" /> that represents the current <see cref="T:System.Object" />.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.String" /> that represents the current <see cref="T:System.Object" />.
 /// </returns>
 public override string ToString()
 {
     if (this.type <= -1)
     {
         throw new FormatException();
     }
     return(DefaultTokens.AddSquareBracket("DBNum" + ((int)this.type)));
 }
Beispiel #2
0
 /// <summary>
 /// Returns a <see cref="T:System.String" /> that represents the current <see cref="T:System.Object" />.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.String" /> that represents the current <see cref="T:System.Object" />.
 /// </returns>
 public override string ToString()
 {
     if (this.content != null)
     {
         return(DefaultTokens.AddSquareBracket(this.content));
     }
     return(string.Empty);
 }
Beispiel #3
0
 /// <summary>
 /// Returns a <see cref="T:System.String" /> that represents the current <see cref="T:System.Object" />.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.String" /> that represents the current <see cref="T:System.Object" />.
 /// </returns>
 public override string ToString()
 {
     if (this.index > -1)
     {
         return(DefaultTokens.AddSquareBracket("Color" + ((int)this.index)));
     }
     if (this.colorName == null)
     {
         throw new FormatException();
     }
     return(DefaultTokens.AddSquareBracket(this.colorName));
 }
Beispiel #4
0
        /// <summary>
        /// Returns a string that represents the current conditional format.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String" /> that represents the current <see cref="T:Dt.Cells.Data.ConditionFormatPart" /> object.
        /// </returns>
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            switch (this.compareOperator)
            {
            case GeneralCompareType.EqualsTo:
                builder.Append("=");
                break;

            case GeneralCompareType.NotEqualsTo:
                builder.Append("<>");
                break;

            case GeneralCompareType.GreaterThan:
                builder.Append(">");
                break;

            case GeneralCompareType.GreaterThanOrEqualsTo:
                builder.Append(">=");
                break;

            case GeneralCompareType.LessThan:
                builder.Append("<");
                break;

            case GeneralCompareType.LessThanOrEqualsTo:
                builder.Append("<=");
                break;

            default:
                throw new FormatException();
            }
            builder.Append(this.value);
            return(DefaultTokens.AddSquareBracket(builder.ToString()));
        }