Browse Source

Rename GetQRCode() to GetServerURL()

tags/4.0.7
celeron533 7 years ago
parent
commit
a4c4967f5f
4 changed files with 6 additions and 6 deletions
  1. +3
    -3
      shadowsocks-csharp/Controller/ShadowsocksController.cs
  2. +1
    -1
      shadowsocks-csharp/View/MenuViewController.cs
  3. +1
    -1
      shadowsocks-csharp/View/QRCodeForm.cs
  4. +1
    -1
      test/UnitTest.cs

+ 3
- 3
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -329,13 +329,13 @@ namespace Shadowsocks.Controller
}
}
public string GetQRCodeForCurrentServer()
public string GetServerURLForCurrentServer()
{
Server server = GetCurrentServer();
return GetQRCode(server);
return GetServerURL(server);
}
public static string GetQRCode(Server server)
public static string GetServerURL(Server server)
{
string tag = string.Empty;
string url = string.Empty;


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

@@ -659,7 +659,7 @@ namespace Shadowsocks.View
private void QRCodeItem_Click(object sender, EventArgs e)
{
QRCodeForm qrCodeForm = new QRCodeForm(controller.GetQRCodeForCurrentServer());
QRCodeForm qrCodeForm = new QRCodeForm(controller.GetServerURLForCurrentServer());
//qrCodeForm.Icon = this.Icon;
// TODO
qrCodeForm.Show();


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

@@ -67,7 +67,7 @@ namespace Shadowsocks.View
var servers = Configuration.Load();
var serverDatas = servers.configs.Select(
server =>
new KeyValuePair<string, string>(ShadowsocksController.GetQRCode(server), server.FriendlyName())
new KeyValuePair<string, string>(ShadowsocksController.GetServerURL(server), server.FriendlyName())
).ToList();
listBox1.DataSource = serverDatas;


+ 1
- 1
test/UnitTest.cs View File

@@ -436,7 +436,7 @@ namespace test
string expected = testCase.Key;
Server config = testCase.Value;
var actual = ShadowsocksController.GetQRCode(config);
var actual = ShadowsocksController.GetServerURL(config);
Assert.AreEqual(expected, actual);
}
}


Loading…
Cancel
Save