Example #1
0
 public KeyValue(TShapeOption aKey, TShapeOptionList List)
 {
     FKey      = Convert.ToString(aKey);
     FAs1616   = Convert.ToString(List.As1616(aKey, 0));
     FAsLong   = Convert.ToString(List.AsLong(aKey, 0));
     FAsString = List.AsUnicodeString(aKey, "");
 }
Example #2
0
        internal static bool GetBiff8Adjust(string AdjName, out TShapeOption so)
        {
            so = TShapeOption.None;
            if (!AdjName.StartsWith("adj", StringComparison.InvariantCultureIgnoreCase))
            {
                return(false);
            }
            if (AdjName.Length == 3)
            {
                so = TShapeOption.adjustValue;
                return(true);
            }

            string AdjNum = AdjName.Substring(3);
            int    n;

            if (!int.TryParse(AdjNum, NumberStyles.Integer, CultureInfo.InvariantCulture, out n))
            {
                return(false);
            }
            if (n < 1 || n > 10)
            {
                return(false);
            }

            so = TShapeOption.adjustValue + n - 1;
            return(true);
        }