Browse Source

update some menu title

tags/2.3
clowwindy 10 years ago
parent
commit
7cb863b0c2
2 changed files with 11 additions and 5 deletions
  1. +3
    -3
      shadowsocks-csharp/Data/cn.txt
  2. +8
    -2
      shadowsocks-csharp/View/MenuViewController.cs

+ 3
- 3
shadowsocks-csharp/Data/cn.txt View File

@@ -1,6 +1,6 @@
Shadowsocks=Shadowsocks Shadowsocks=Shadowsocks
Enable System Proxy=启用系统代理 Enable System Proxy=启用系统代理
Mode=代理模式
Mode=系统代理模式
PAC=PAC 模式 PAC=PAC 模式
Global=全局模式 Global=全局模式
Servers=服务器 Servers=服务器
@@ -38,8 +38,8 @@ Shadowsocks {0} Update Found=Shadowsocks {0} 更新
Click here to download=点击这里下载 Click here to download=点击这里下载
Shadowsocks is here=Shadowsocks 在这里 Shadowsocks is here=Shadowsocks 在这里
You can turn on/off Shadowsocks in the context menu=可以在右键菜单中开关 Shadowsocks You can turn on/off Shadowsocks in the context menu=可以在右键菜单中开关 Shadowsocks
Enabled=已启用代理
Disabled=已禁用代理
System Proxy Enabled=已启用系统代理
System Proxy Disabled=已禁用系统代理
Update PAC from GFWList=从 GFWList 更新 PAC Update PAC from GFWList=从 GFWList 更新 PAC
Failed to update PAC file =更新 PAC 文件失败 Failed to update PAC file =更新 PAC 文件失败
PAC updated=更新 PAC 成功 PAC updated=更新 PAC 成功


+ 8
- 2
shadowsocks-csharp/View/MenuViewController.cs View File

@@ -27,6 +27,7 @@ namespace Shadowsocks.View
private bool _isFirstRun; private bool _isFirstRun;
private MenuItem enableItem; private MenuItem enableItem;
private MenuItem modeItem;
private MenuItem AutoStartupItem; private MenuItem AutoStartupItem;
private MenuItem ShareOverLANItem; private MenuItem ShareOverLANItem;
private MenuItem SeperatorItem; private MenuItem SeperatorItem;
@@ -116,7 +117,10 @@ namespace Shadowsocks.View
} }
_notifyIcon.Icon = Icon.FromHandle(icon.GetHicon()); _notifyIcon.Icon = Icon.FromHandle(icon.GetHicon());
string text = I18N.GetString("Shadowsocks") + " " + UpdateChecker.Version + "\n" + (enabled ? I18N.GetString("Enabled") : I18N.GetString("Disabled")) + "\n" + (global ? I18N.GetString("Global") : I18N.GetString("PAC")) + "\n" + config.GetCurrentServer().FriendlyName();
string text = I18N.GetString("Shadowsocks") + " " + UpdateChecker.Version + "\n" +
(enabled ? I18N.GetString("System Proxy Enabled") : I18N.GetString("System Proxy Disabled")) +
(enabled ? "(" + (global ? I18N.GetString("Global") : I18N.GetString("PAC")) + ")" : "") + "\n" +
config.GetCurrentServer().FriendlyName();
_notifyIcon.Text = text.Substring(0, Math.Min(63, text.Length)); _notifyIcon.Text = text.Substring(0, Math.Min(63, text.Length));
} }
@@ -134,7 +138,7 @@ namespace Shadowsocks.View
{ {
this.contextMenu1 = new ContextMenu(new MenuItem[] { this.contextMenu1 = new ContextMenu(new MenuItem[] {
this.enableItem = CreateMenuItem("Enable System Proxy", new EventHandler(this.EnableItem_Click)), this.enableItem = CreateMenuItem("Enable System Proxy", new EventHandler(this.EnableItem_Click)),
CreateMenuGroup("Mode", new MenuItem[] {
this.modeItem = CreateMenuGroup("Mode", new MenuItem[] {
this.PACModeItem = CreateMenuItem("PAC", new EventHandler(this.PACModeItem_Click)), this.PACModeItem = CreateMenuItem("PAC", new EventHandler(this.PACModeItem_Click)),
this.globalModeItem = CreateMenuItem("Global", new EventHandler(this.GlobalModeItem_Click)) this.globalModeItem = CreateMenuItem("Global", new EventHandler(this.GlobalModeItem_Click))
}), }),
@@ -166,6 +170,7 @@ namespace Shadowsocks.View
private void controller_EnableStatusChanged(object sender, EventArgs e) private void controller_EnableStatusChanged(object sender, EventArgs e)
{ {
enableItem.Checked = controller.GetConfiguration().enabled; enableItem.Checked = controller.GetConfiguration().enabled;
modeItem.Enabled = enableItem.Checked;
} }
void controller_ShareOverLANStatusChanged(object sender, EventArgs e) void controller_ShareOverLANStatusChanged(object sender, EventArgs e)
@@ -224,6 +229,7 @@ namespace Shadowsocks.View
Configuration config = controller.GetConfiguration(); Configuration config = controller.GetConfiguration();
UpdateServersMenu(); UpdateServersMenu();
enableItem.Checked = config.enabled; enableItem.Checked = config.enabled;
modeItem.Enabled = config.enabled;
globalModeItem.Checked = config.global; globalModeItem.Checked = config.global;
PACModeItem.Checked = !config.global; PACModeItem.Checked = !config.global;
ShareOverLANItem.Checked = config.shareOverLan; ShareOverLANItem.Checked = config.shareOverLan;


Loading…
Cancel
Save