Refine PR #730
Squashed commit of the following: commit 48eb4d88391b85986190ace825ec0a167df16f8a Author: Syrone Wong <wong.syrone@gmail.com> Date: Sun Sep 18 15:46:09 2016 +0800 Drop useless interface impl Signed-off-by: Syrone Wong <wong.syrone@gmail.com> commitc0a4f3421aAuthor: Logan Zhou <xorcererzc@gmail.com> Date: Sun Sep 18 00:58:02 2016 +0800 Revert "Updated to meet the hint from Wongsyrone." This reverts commit84c8053577. commit84c8053577Author: Logan Zhou <xorcererzc@gmail.com> Date: Sun Sep 18 00:52:21 2016 +0800 Updated to meet the hint from Wongsyrone. commit333ccb6d1fAuthor: Logan Zhou <xorcererzc@gmail.com> Date: Sun Sep 18 00:34:52 2016 +0800 Added duplicate button to config form. Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
@@ -42,6 +42,7 @@ namespace Shadowsocks.View
|
||||
{
|
||||
AddButton.Text = I18N.GetString("&Add");
|
||||
DeleteButton.Text = I18N.GetString("&Delete");
|
||||
DuplicateButton.Text = I18N.GetString("Dupli&cate");
|
||||
IPLabel.Text = I18N.GetString("Server Addr");
|
||||
ServerPortLabel.Text = I18N.GetString("Server Port");
|
||||
PasswordLabel.Text = I18N.GetString("Password");
|
||||
@@ -210,6 +211,19 @@ namespace Shadowsocks.View
|
||||
_lastSelectedIndex = ServersListBox.SelectedIndex;
|
||||
}
|
||||
|
||||
private void DuplicateButton_Click( object sender, EventArgs e )
|
||||
{
|
||||
if (!SaveOldSelectedServer())
|
||||
{
|
||||
return;
|
||||
}
|
||||
Server currServer = _modifiedConfiguration.configs[_lastSelectedIndex];
|
||||
_modifiedConfiguration.configs.Add(currServer);
|
||||
LoadConfiguration(_modifiedConfiguration);
|
||||
ServersListBox.SelectedIndex = _modifiedConfiguration.configs.Count - 1;
|
||||
_lastSelectedIndex = ServersListBox.SelectedIndex;
|
||||
}
|
||||
|
||||
private void DeleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
_lastSelectedIndex = ServersListBox.SelectedIndex;
|
||||
|
||||
Reference in New Issue
Block a user