do not expose SaveConfig to Views
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user