From 70de795f4eba7c8998a249b9be7e26615ee70a26 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 27 Feb 2015 20:02:48 +0100 Subject: [PATCH] Changed Id format to N0 (with thousands separator) --- Logic/Support/Formatting.cs | 6 +++--- Logic/Swarm/Person.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Logic/Support/Formatting.cs b/Logic/Support/Formatting.cs index 229ed516..bf27966c 100644 --- a/Logic/Support/Formatting.cs +++ b/Logic/Support/Formatting.cs @@ -146,17 +146,17 @@ namespace Swarmops.Logic.Support { // The last sequence was just a single number. - result += ", #" + ids[index - 1]; + result += ", #" + ids[index - 1].ToString("N0"); } else if (indexOfLastDiscontinuity == index - 2) { // Two numbers in last sequence. Treat as discontinuous. - result += ", #" + ids[indexOfLastDiscontinuity] + ", #" + ids[index - 1]; + result += ", #" + ids[indexOfLastDiscontinuity].ToString("N0") + ", #" + ids[index - 1].ToString("N0"); } else { // Contiguity. - result += ", #" + ids[indexOfLastDiscontinuity] + "-" + ids[index - 1]; + result += ", #" + ids[indexOfLastDiscontinuity].ToString("N0") + "-" + ids[index - 1].ToString("N0"); } indexOfLastDiscontinuity = index; diff --git a/Logic/Swarm/Person.cs b/Logic/Swarm/Person.cs index 3cc6d9a7..c9f9b373 100644 --- a/Logic/Swarm/Person.cs +++ b/Logic/Swarm/Person.cs @@ -415,7 +415,7 @@ namespace Swarmops.Logic.Swarm public string Canonical // On the canonical format "Rick Falkvinge (#1)" { - get { return Name + " (#" + Identity + ")"; } + get { return Name + " (#" + Identity.ToString("N0") + ")"; } } public Image Portrait