@@ -52,7 +52,7 @@ namespace Shadowsocks.Controller | |||||
UpdateSystemProxy(); | UpdateSystemProxy(); | ||||
} | } | ||||
public Server GetCurrentServer() | public Server GetCurrentServer() | ||||
{ | { | ||||
return _config.GetCurrentServer(); | return _config.GetCurrentServer(); | ||||
@@ -179,23 +179,5 @@ namespace Shadowsocks.Controller | |||||
{ | { | ||||
UpdateSystemProxy(); | UpdateSystemProxy(); | ||||
} | } | ||||
private void SetLog() | |||||
{ | |||||
try | |||||
{ | |||||
FileStream fs = new FileStream("shadowsocks.log", FileMode.Append); | |||||
TextWriter tmp = Console.Out; | |||||
StreamWriter sw = new StreamWriter(fs); | |||||
sw.AutoFlush = true; | |||||
Console.SetOut(sw); | |||||
Console.SetError(sw); | |||||
} | |||||
catch (IOException e) | |||||
{ | |||||
Console.WriteLine(e.ToString()); | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -434,7 +434,6 @@ | |||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | ||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); | ||||
this.MaximizeBox = false; | this.MaximizeBox = false; | ||||
this.MinimizeBox = false; | |||||
this.Name = "ConfigForm"; | this.Name = "ConfigForm"; | ||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | ||||
this.Text = "Edit Servers"; | this.Text = "Edit Servers"; | ||||
@@ -24,12 +24,12 @@ namespace Shadowsocks.View | |||||
private void GenQR(string ssconfig) | private void GenQR(string ssconfig) | ||||
{ | { | ||||
string qrText = ssconfig; | |||||
string qrText = ssconfig; | |||||
QRCode4CS.Options options = new QRCode4CS.Options(); | QRCode4CS.Options options = new QRCode4CS.Options(); | ||||
options.Text = qrText; | options.Text = qrText; | ||||
QRCode4CS.QRCode qrCoded = null; | QRCode4CS.QRCode qrCoded = null; | ||||
bool success = false; | bool success = false; | ||||
foreach (var level in new QRErrorCorrectLevel[]{QRErrorCorrectLevel.H, QRErrorCorrectLevel.Q, QRErrorCorrectLevel.M, QRErrorCorrectLevel.L}) | |||||
foreach (var level in new QRErrorCorrectLevel[]{QRErrorCorrectLevel.H, QRErrorCorrectLevel.Q, QRErrorCorrectLevel.M, QRErrorCorrectLevel.L}) | |||||
{ | { | ||||
for (int i = 3; i < 10; i++) | for (int i = 3; i < 10; i++) | ||||
{ | { | ||||