コード例 #1
0
 public override string ToString()
 {
     if (TimeStamp == null)
     {
         TimeStamp = new NWDateTime(DateTime.Now);
     }
     return(string.Format("UserPlayedScenario Campaign {0}  Scenario {1} at  {2}", CampaignId, ScenarioId, TimeStamp));
 }
コード例 #2
0
        public JournalItem(int type)
        {
            Type     = type;
            Text     = "";
            Turn     = DEFAULT_TURN;
            DateTime = null;

            InitColor();
        }
コード例 #3
0
        public JournalItem(int type, string text, int color, NWDateTime dateTime)
        {
            Type     = type;
            Text     = text;
            Color    = color;
            Turn     = DEFAULT_TURN;
            DateTime = dateTime;

            InitColor();
        }
コード例 #4
0
        public JournalItem(int type, string text, int color, int turn)
        {
            Type     = type;
            Text     = text;
            Color    = color;
            Turn     = turn;
            DateTime = null;

            InitColor();
        }
コード例 #5
0
        public void LoadFromStream(BinaryReader stream, FileVersion version)
        {
            Type  = StreamUtils.ReadInt(stream);
            Text  = StreamUtils.ReadString(stream, StaticData.DefEncoding);
            Color = StreamUtils.ReadInt(stream);
            Turn  = StreamUtils.ReadInt(stream);

            if (Type == SIT_DAY)
            {
                DateTime = new NWDateTime();
                DateTime.LoadFromStream(stream, version);
            }
        }
コード例 #6
0
        public void StoreMessage(int type, string text, int color, NWDateTime dateTime)
        {
            JournalItem m = new JournalItem(type, text, color, dateTime);

            fMessages.Add(m);
        }
コード例 #7
0
 public void StoreTime(NWDateTime time)
 {
     StoreMessage(JournalItem.SIT_DAY, "    <" + time.ToString(false, false) + ">", Colors.SkyBlue, time);
 }
コード例 #8
0
 public UserPlayedScenario()
 {
     TimeStamp = new NWDateTime(DateTime.Now);
 }