Browse Source

add modify detector

Don't reload server if config not change.
pull/45/head
wzxjohn 10 years ago
parent
commit
c22c841207
3 changed files with 3 additions and 22 deletions
  1. +1
    -19
      shadowsocks-csharp/Controller/ShadowsocksController.cs
  2. +0
    -1
      shadowsocks-csharp/View/ConfigForm.Designer.cs
  3. +2
    -2
      shadowsocks-csharp/View/QRCodeForm.cs

+ 1
- 19
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -52,7 +52,7 @@ namespace Shadowsocks.Controller
UpdateSystemProxy();
}
public Server GetCurrentServer()
{
return _config.GetCurrentServer();
@@ -179,23 +179,5 @@ namespace Shadowsocks.Controller
{
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());
}
}
}
}

+ 0
- 1
shadowsocks-csharp/View/ConfigForm.Designer.cs View File

@@ -434,7 +434,6 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ConfigForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Edit Servers";


+ 2
- 2
shadowsocks-csharp/View/QRCodeForm.cs View File

@@ -24,12 +24,12 @@ namespace Shadowsocks.View
private void GenQR(string ssconfig)
{
string qrText = ssconfig;
string qrText = ssconfig;
QRCode4CS.Options options = new QRCode4CS.Options();
options.Text = qrText;
QRCode4CS.QRCode qrCoded = null;
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++)
{


Loading…
Cancel
Save