add GUI for user rule support

This commit is contained in:
clowwindy
2015-03-06 23:02:07 +08:00
parent 3e16978968
commit eb2e5cc242
8 changed files with 55 additions and 9 deletions
@@ -38,6 +38,7 @@ namespace Shadowsocks.Controller
// when user clicked Edit PAC, and PAC file has already created
public event EventHandler<PathEventArgs> PACFileReadyToOpen;
public event EventHandler<PathEventArgs> UserRuleFileReadyToOpen;
public event EventHandler<GFWListUpdater.ResultEventArgs> UpdatePACFromGFWListCompleted;
@@ -166,6 +167,15 @@ namespace Shadowsocks.Controller
}
}
public void TouchUserRuleFile()
{
string userRuleFilename = _pacServer.TouchUserRuleFile();
if (UserRuleFileReadyToOpen != null)
{
UserRuleFileReadyToOpen(this, new PathEventArgs() { Path = userRuleFilename });
}
}
public string GetQRCodeForCurrentServer()
{
Server server = GetCurrentServer();