do not expose SaveConfig to Views

This commit is contained in:
clowwindy
2014-11-09 14:01:26 +08:00
parent 59502c1984
commit 7faf2c992b
3 changed files with 42 additions and 31 deletions
+2 -4
View File
@@ -258,7 +258,7 @@ namespace Shadowsocks.View
MessageBox.Show("Please add at least one server");
return;
}
controller.SaveConfig(modifiedConfiguration);
controller.SaveServers(modifiedConfiguration.configs);
this.Hide();
ShowFirstTimeBalloon();
}
@@ -306,9 +306,7 @@ namespace Shadowsocks.View
private void AServerItem_Click(object sender, EventArgs e)
{
MenuItem item = (MenuItem)sender;
Configuration configuration = controller.GetConfiguration();
configuration.index = (int)item.Tag;
controller.SaveConfig(configuration);
controller.SelectServerIndex((int)item.Tag);
}
private void ShowLogItem_Click(object sender, EventArgs e)