mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-09 23:34:06 +02:00
Go fuck yourself CurrentCulture and stop messing with string interpolation
This commit is contained in:
parent
8de7e13aa3
commit
9811f40a53
@ -2,7 +2,6 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
@ -13,7 +12,7 @@ static class BrowserUtils{
|
||||
|
||||
public static string HeaderAcceptLanguage{
|
||||
get{
|
||||
string culture = CultureInfo.CurrentCulture.Name;
|
||||
string culture = Program.Culture.Name;
|
||||
|
||||
if (culture == "en"){
|
||||
return "en-us,en";
|
||||
|
@ -1,6 +1,7 @@
|
||||
using CefSharp;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
@ -51,9 +52,15 @@ static class Program{
|
||||
public static UserConfig UserConfig { get; private set; }
|
||||
public static SystemConfig SystemConfig { get; private set; }
|
||||
public static Reporter Reporter { get; private set; }
|
||||
public static CultureInfo Culture { get; }
|
||||
|
||||
public static event EventHandler UserConfigReplaced;
|
||||
|
||||
static Program(){
|
||||
Culture = CultureInfo.CurrentCulture;
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
|
||||
|
||||
[STAThread]
|
||||
private static void Main(){
|
||||
Application.EnableVisualStyles();
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
@ -32,7 +31,7 @@ public bool Log(string data){
|
||||
build.Append("Please, report all issues to: https://github.com/chylex/TweetDuck/issues\r\n\r\n");
|
||||
}
|
||||
|
||||
build.Append("[").Append(DateTime.Now.ToString("G", CultureInfo.CurrentCulture)).Append("]\r\n");
|
||||
build.Append("[").Append(DateTime.Now.ToString("G", Program.Culture)).Append("]\r\n");
|
||||
build.Append(data).Append("\r\n\r\n");
|
||||
|
||||
try{
|
||||
|
Loading…
Reference in New Issue
Block a user