use culture number format
This commit is contained in:
		
							parent
							
								
									8796078b67
								
							
						
					
					
						commit
						81e17e7700
					
				| @ -1,21 +1,18 @@ | |||||||
| using System; | using System.Globalization; | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.Linq; |  | ||||||
| using System.Text; |  | ||||||
| using System.Threading.Tasks; |  | ||||||
| 
 | 
 | ||||||
| namespace NonaBGS.Journal { | namespace NonaBGS.Journal { | ||||||
|     public class Credits { |     public class Credits { | ||||||
|         public static string FormatCredits(int amount) { |         public static string FormatCredits(int amount) { | ||||||
|  |             var format = CultureInfo.CurrentCulture.NumberFormat; | ||||||
|             if ((amount % 1000000) == 0) { |             if ((amount % 1000000) == 0) { | ||||||
|                 amount /= 1000000; |                 amount /= 1000000; | ||||||
|                 return string.Format("{0}M CR", amount); |                 return string.Format("{0}M CR", amount.ToString(format)); | ||||||
|             } else if ((amount % 1000) == 0) { |             } else if ((amount % 1000) == 0) { | ||||||
|                 amount /= 1000; |                 amount /= 1000; | ||||||
|                 return string.Format("{0}K CR", amount); |                 return string.Format("{0}K CR", amount.ToString(format)); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             return string.Format("{0} CR", amount); |             return string.Format("{0} CR", amount.ToString(format)); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user