protected override void SetChildrenProperties() { base.SetChildrenProperties(); background.Location = Location; background.Size = Size; background.TintColour = BackgroundColour; provincesItem.ForegroundColour = ForegroundColour; provincesItem.Location = new Point2D(Location.X + Spacing, Location.Y + (Size.Height - provincesItem.ClientRectangle.Height) / 2); provincesItem.Size = new Size2D((Size.Width - Spacing * 3) / 4, 16); provincesItem.Text = Provinces.ToString(); holdingsItem.ForegroundColour = ForegroundColour; holdingsItem.Location = new Point2D(provincesItem.ClientRectangle.Right + Spacing, provincesItem.Location.Y); holdingsItem.Size = new Size2D((Size.Width - Spacing * 3) / 4, 16); holdingsItem.Text = Holdings.ToString(); wealthItem.ForegroundColour = ForegroundColour; wealthItem.Location = new Point2D(holdingsItem.ClientRectangle.Right + Spacing, holdingsItem.Location.Y); wealthItem.Size = new Size2D((Size.Width - Spacing * 3) / 4, 16); wealthItem.Text = Wealth.ToString(); troopsItem.ForegroundColour = ForegroundColour; troopsItem.Location = new Point2D(wealthItem.ClientRectangle.Right + Spacing, wealthItem.Location.Y); troopsItem.Size = new Size2D((Size.Width - Spacing * 3) / 4, 16); troopsItem.Text = "0"; provincesTooltip.Location = new Point2D(provincesItem.Location.X, ClientRectangle.Bottom); holdingsTooltip.Location = new Point2D(holdingsItem.Location.X, ClientRectangle.Bottom); wealthTooltip.Location = new Point2D(wealthItem.Location.X, ClientRectangle.Bottom); troopsTooltip.Location = new Point2D(troopsItem.Location.X, ClientRectangle.Bottom); troopsTooltip.Text = string.Empty; if (Troops != null && Troops.Count > 0) { troopsItem.Text = Troops.Values.Sum().ToString(); Troops.ToList().ForEach(t => troopsTooltip.Text += $"{t.Key}: {t.Value}\n"); } }
public override string ToString() { return("Wealth=" + Wealth.ToString() + "\n" + "Wealth=" + Police.ToString() + "\n" + "Wealth=" + Heterogenity.ToString() + "\n" + "Wealth=" + Pollution.ToString() + "\n" + "Wealth=" + Corruption.ToString() + "\n\n" + "Wealth=" + Infrastructure.ToString() + "\n" + "Wealth=" + HealthServices.ToString() + "\n" + "Wealth=" + Crime.ToString() + "\n" + "Wealth=" + Religion.ToString() + "\n" + "Wealth=" + Food.ToString() + "\n" + "Wealth=" + Cleanness.ToString() + "\n" + "Wealth=" + Employment.ToString() + "\n" + "Wealth=" + Information.ToString() + "\n\n" + "Wealth=" + Nourishment.ToString() + "\n" + "Wealth=" + Health.ToString() + "\n" + "Wealth=" + Shelter.ToString() + "\n" + "Wealth=" + Trust.ToString() + "\n" + "Wealth=" + Safety.ToString()); }
public override string ToString() { return("Wealth: " + Wealth.ToString() + ", Alignment: " + Alignment.ToString() + ", Occupation: " + Occupation.ToString() + ", Region: " + Region.ToString() + ", Subject: " + Subject.ToString() + ", Faction: " + Faction.ToString()); }
public override string ToString() { string json = string.Concat( __jsonIgnore.ContainsKey("Id") ? string.Empty : string.Format(", Id : {0}", Id == null ? "null" : Id.ToString()), __jsonIgnore.ContainsKey("Order_id") ? string.Empty : string.Format(", Order_id : {0}", Order_id == null ? "null" : Order_id.ToString()), __jsonIgnore.ContainsKey("Productitem_id") ? string.Empty : string.Format(", Productitem_id : {0}", Productitem_id == null ? "null" : Productitem_id.ToString()), __jsonIgnore.ContainsKey("Create_time") ? string.Empty : string.Format(", Create_time : {0}", Create_time == null ? "null" : Create_time.Value.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds.ToString()), __jsonIgnore.ContainsKey("Descript") ? string.Empty : string.Format(", Descript : {0}", Descript == null ? "null" : string.Format("'{0}'", Descript.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), __jsonIgnore.ContainsKey("Email") ? string.Empty : string.Format(", Email : {0}", Email == null ? "null" : string.Format("'{0}'", Email.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), __jsonIgnore.ContainsKey("Img_url") ? string.Empty : string.Format(", Img_url : {0}", Img_url == null ? "null" : string.Format("'{0}'", Img_url.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), __jsonIgnore.ContainsKey("State") ? string.Empty : string.Format(", State : {0}", State == null ? "null" : string.Format("'{0}'", State.ToDescriptionOrString().Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), __jsonIgnore.ContainsKey("Tel") ? string.Empty : string.Format(", Tel : {0}", Tel == null ? "null" : string.Format("'{0}'", Tel.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), __jsonIgnore.ContainsKey("Telphone") ? string.Empty : string.Format(", Telphone : {0}", Telphone == null ? "null" : string.Format("'{0}'", Telphone.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))), __jsonIgnore.ContainsKey("Wealth") ? string.Empty : string.Format(", Wealth : {0}", Wealth == null ? "null" : Wealth.ToString()), " }"); return(string.Concat("{", json.Substring(1))); }
public void WealthTest2() { Wealth c = new Wealth(CardSuit.Club, (byte)1); Assert.AreEqual("Wealth", c.ToString()); }