Browse Source

Add import URL from clipboard

tags/3.4.1
noisyfox 7 years ago
parent
commit
2a0dd88525
3 changed files with 14 additions and 1 deletions
  1. +1
    -0
      shadowsocks-csharp/Data/cn.txt
  2. +1
    -0
      shadowsocks-csharp/Data/zh_tw.txt
  3. +12
    -1
      shadowsocks-csharp/View/MenuViewController.cs

+ 1
- 0
shadowsocks-csharp/Data/cn.txt View File

@@ -23,6 +23,7 @@ Secure Local PAC=保护本地 PAC
Copy Local PAC URL=复制本地 PAC 网址
Share Server Config...=分享服务器配置...
Scan QRCode from Screen...=扫描屏幕上的二维码...
Import URL from Clipboard...=从剪贴板导入URL...
Availability Statistics=统计可用性
Show Logs...=显示日志...
Verbose Logging=详细记录日志


+ 1
- 0
shadowsocks-csharp/Data/zh_tw.txt View File

@@ -23,6 +23,7 @@ Secure Local PAC=保護本地 PAC
Copy Local PAC URL=複製本地 PAC 網址
Share Server Config...=分享伺服器配置...
Scan QRCode from Screen...=掃描螢幕上的 QR 碼...
Import URL from Clipboard...=從剪貼板導入URL...
Availability Statistics=統計可用性
Show Logs...=顯示日誌...
Verbose Logging=詳細記錄日誌


+ 12
- 1
shadowsocks-csharp/View/MenuViewController.cs View File

@@ -261,8 +261,10 @@ namespace Shadowsocks.View
this.SeperatorItem = new MenuItem("-"),
this.ConfigItem = CreateMenuItem("Edit Servers...", new EventHandler(this.Config_Click)),
CreateMenuItem("Statistics Config...", StatisticsConfigItem_Click),
new MenuItem("-"),
CreateMenuItem("Share Server Config...", new EventHandler(this.QRCodeItem_Click)),
CreateMenuItem("Scan QRCode from Screen...", new EventHandler(this.ScanQRCodeItem_Click))
CreateMenuItem("Scan QRCode from Screen...", new EventHandler(this.ScanQRCodeItem_Click)),
CreateMenuItem("Import URL from Clipboard...", new EventHandler(this.ImportURLItem_Click))
}),
CreateMenuGroup("PAC ", new MenuItem[] {
this.localPACItem = CreateMenuItem("Local PAC", new EventHandler(this.LocalPACItem_Click)),
@@ -739,6 +741,15 @@ namespace Shadowsocks.View
MessageBox.Show(I18N.GetString("No QRCode found. Try to zoom in or move it to the center of the screen."));
}
private void ImportURLItem_Click(object sender, EventArgs e)
{
var success = controller.AddServerBySSURL(Clipboard.GetText(TextDataFormat.Text));
if (success)
{
ShowConfigForm();
}
}
void splash_FormClosed(object sender, FormClosedEventArgs e)
{
ShowConfigForm();


Loading…
Cancel
Save