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
+1 -1
View File
@@ -436,7 +436,7 @@
this.MaximizeBox = false;
this.Name = "ConfigForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Shadowsocks";
this.Text = "Edit Servers";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ConfigForm_FormClosed);
this.Load += new System.EventHandler(this.ConfigForm_Load);
this.Shown += new System.EventHandler(this.ConfigForm_Shown);
+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)