Exemple #1
0
        public String toDisplayString()
        {
            String str  = fNumber + ".";
            long   span = fOpenTime - DateTime.Now.Ticks;

            if (span > 0)
            {
                Timespan t = new Timespan(span);
                str += " " + t.toDisplayString();
            }
            else
            {
                span = fTreasureTime - DateTime.Now.Ticks;
                if (span <= 0 && fContent != "")
                {
                    str += " " + fContent + " - ";
                }
                str += " " + this.fName;
            }
            return(str);
        }
Exemple #2
0
        public String toString()
        {
            Utility.Trace("DungeonRecord.toString - enter");
            String str = this.fNumber + ". " + this.fName + "\n";

            //      if (explored_rooms != null)
            //      {
            //          str += " explored: ";
            //          for (int i = 0; i < explored_rooms.length; i++)
            //          {
            //              str += explored_rooms[i] + " ";
            //          }
            //          str += "\n";
            //      }
            str += " compl: " + fCompleted;
            long span = fOpenTime - DateTime.Now.Ticks;

            Utility.Trace("DungeonRecord.toString - open span: " + span);
            if (span <= 0)
            {
                span = fTreasureTime - DateTime.Now.Ticks;
                Utility.Trace("DungeonRecord.toString - treasure span: " + span);
                if (span > 0)
                {
                    Timespan t = new Timespan(span);
                    str += " empty. " + t.toDisplayString();
                }
                else
                {
                    str += " open.";
                }
            }
            else
            {
                Timespan t = new Timespan(span);
                str += " closed. " + t.toDisplayString();
            }
            Utility.Trace("DungeonRecord.toString - returns: " + str);
            return(str);
        }