Skip to content

Commit b6f1def

Browse files
author
clowwindy
committed
Merge branch 'Sharuru'
2 parents ce53273 + 7918cb4 commit b6f1def

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

shadowsocks-csharp/Controller/ShadowsocksController.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ public Server GetCurrentServer()
6868
return _config.GetCurrentServer();
6969
}
7070

71+
public bool GetCurrentMode()
72+
{
73+
return _config.global;
74+
}
75+
7176
// always return copy
7277
public Configuration GetConfiguration()
7378
{

shadowsocks-csharp/Model/Configuration.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public Server GetCurrentServer()
3232
}
3333
}
3434

35+
public bool GetCurrentMode()
36+
{
37+
return global;
38+
}
39+
3540
public static void CheckServer(Server server)
3641
{
3742
CheckPort(server.server_port);

shadowsocks-csharp/View/MenuViewController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private void UpdateTrayIcon()
114114
}
115115
_notifyIcon.Icon = Icon.FromHandle(icon.GetHicon());
116116

117-
string text = I18N.GetString("Shadowsocks") + " " + UpdateChecker.Version + "\n" + (enabled ? I18N.GetString("Enabled") : I18N.GetString("Disabled")) + "\n" + controller.GetCurrentServer().FriendlyName();
117+
string text = I18N.GetString("Shadowsocks") + " " + UpdateChecker.Version + "\n" + (enabled ? I18N.GetString("Enabled") : I18N.GetString("Disabled")) + " " + (controller.GetCurrentMode() ? I18N.GetString("Global") : I18N.GetString("PAC")) + "\n" + controller.GetCurrentServer().FriendlyName();
118118
_notifyIcon.Text = text.Substring(0, Math.Min(63, text.Length));
119119
}
120120

0 commit comments

Comments
 (0)