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)); }
public JournalItem(int type) { Type = type; Text = ""; Turn = DEFAULT_TURN; DateTime = null; InitColor(); }
public JournalItem(int type, string text, int color, NWDateTime dateTime) { Type = type; Text = text; Color = color; Turn = DEFAULT_TURN; DateTime = dateTime; InitColor(); }
public JournalItem(int type, string text, int color, int turn) { Type = type; Text = text; Color = color; Turn = turn; DateTime = null; InitColor(); }
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); } }
public void StoreMessage(int type, string text, int color, NWDateTime dateTime) { JournalItem m = new JournalItem(type, text, color, dateTime); fMessages.Add(m); }
public void StoreTime(NWDateTime time) { StoreMessage(JournalItem.SIT_DAY, " <" + time.ToString(false, false) + ">", Colors.SkyBlue, time); }
public UserPlayedScenario() { TimeStamp = new NWDateTime(DateTime.Now); }