private void Form1_Load(object sender, EventArgs e) { try { FormSerialisor.Deserialise(this, Application.StartupPath + @"\cfg.xml"); } catch (Exception) { errorLabel.Text = "Error loading configuration"; } }
private void button2_Click(object sender, EventArgs e) { FormSerialisor.Serialise(this, Application.StartupPath + @"\cfg.xml"); }