Skip to content

Commit

Permalink
Rename GetQRCode() to GetServerURL()
Browse files Browse the repository at this point in the history
  • Loading branch information
celeron533 committed Sep 25, 2017
1 parent 55c1918 commit a4c4967
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions shadowsocks-csharp/Controller/ShadowsocksController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ public void TouchUserRuleFile()
}
}

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;
Expand Down
2 changes: 1 addition & 1 deletion shadowsocks-csharp/View/MenuViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ private void StatisticsConfigItem_Click(object sender, EventArgs e)

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();
Expand Down
2 changes: 1 addition & 1 deletion shadowsocks-csharp/View/QRCodeForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void QRCodeForm_Load(object sender, EventArgs e)
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;

Expand Down
2 changes: 1 addition & 1 deletion test/UnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ private static void RunGenerateShadowsocksUrlTest(IReadOnlyDictionary<string, Se
string expected = testCase.Key;
Server config = testCase.Value;

var actual = ShadowsocksController.GetQRCode(config);
var actual = ShadowsocksController.GetServerURL(config);
Assert.AreEqual(expected, actual);
}
}
Expand Down

0 comments on commit a4c4967

Please sign in to comment.