Ejemplo n.º 1
0
 public StrongString GetForServer()
 {
     return(Bil.ToString() + CharSeparater +
            Mil.ToString() + CharSeparater +
            Kil.ToString() + CharSeparater +
            Nil.ToString() + CharSeparater);
 }
Ejemplo n.º 2
0
        //-------------------------------------------------
        #region Overrided Methods Region
        /// <summary>
        /// Warning: Don't use this function for saving this object to the server,
        /// this is just for showing this object in the Design of the Game.
        /// If you want to save this to the server, use this: <see cref="GetForServer()"/>!
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            if (IsNegative)
            {
                return("-" + (-this));
            }

            if (Bil == 0)
            {
                if (Mil == 0)
                {
                    if (Kil == 0)
                    {
                        return(Nil.ToString());
                    }
                    else
                    {
                        return(Kil.ToString() + " K");
                    }
                }
                else
                {
                    return(Mil.ToString() + " M");
                }
            }
            else
            {
                return(Bil.ToString() + " B");
            }
        }
Ejemplo n.º 3
0
        public StrongString GetForServer()
        {
            var _s = CharSeparater;

            _s +=
                (IsNegative ? NegetiveSerialized :
                 PossitiveSerialized) +
                Bil.ToString() + CharSeparater +
                Mil.ToString() + CharSeparater +
                Kil.ToString() + CharSeparater +
                Nil.ToString() + CharSeparater;;
            return(_s);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Get the string of this Unit, by indecating whether you want it full or not.
 /// <!--This is not an overrided method,
 /// but this is a overloaded method for ToString() method,
 /// so I thought it it'd be better to right it here.-->
 /// </summary>
 /// <param name="fullUnit">
 /// if true, it returns a full mode unit string.
 /// </param>
 /// <returns></returns>
 public string ToString(bool fullUnit)
 {
     if (fullUnit)
     {
         string myString = string.Empty;
         if (Bil != 0)
         {
             myString += Bil.ToString() + FullTosStringSeparater;
             myString += Mil.ToString(FullUnitFormatConvertor) + FullTosStringSeparater;
             myString += Kil.ToString(FullUnitFormatConvertor) + FullTosStringSeparater;
             myString += Nil.ToString(FullUnitFormatConvertor);
         }
         else
         {
             if (Mil != 0)
             {
                 myString += Mil.ToString() + FullTosStringSeparater;
                 myString += Kil.ToString(FullUnitFormatConvertor) + FullTosStringSeparater;
                 myString += Nil.ToString(FullUnitFormatConvertor);
             }
             else
             {
                 if (Kil != 0)
                 {
                     myString += Kil.ToString() + FullTosStringSeparater;
                     myString += Nil.ToString(FullUnitFormatConvertor);
                 }
                 else
                 {
                     myString += Nil.ToString();
                 }
             }
         }
         return(myString);
     }
     else
     {
         return(ToString());
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Возращает (String) дату и время события гггг.мм.дд.чч.мм.сс.мм.мм.нн
 /// </summary>
 /// <returns></returns>
 public string DateTimeString()
 {
     return(GG.ToString("0000") + "." + MM.ToString("00") + "." + DD.ToString("00") + "." + HH.ToString("00") + "." + Min.ToString("00") + "." + CC.ToString("00") + "." + Mil.ToString("00") + "." + ML.ToString("00") + "." + NN.ToString("00"));
 }
Ejemplo n.º 6
0
 public string TimeString()
 {
     return(DD.ToString("00") + "." + HH.ToString("00") + "." + Min.ToString("00") + "." + CC.ToString("00") + "." + Mil.ToString("00") + "." + ML.ToString("00") + "." + NN.ToString("00"));
 }