private void btnModify_Click(object sender, EventArgs e)
{
try
{
listStreams[modifyIndex].Caption = txtCaption.Text;
listStreams[modifyIndex].StreamUrl = txtURL.Text;
listStreams[modifyIndex].Quality = txtQuality.Text;
listStreams.sort();
try
{
XMLPersist.saveStreamListConfig(listStreams);
}
catch (UnauthorizedAccessException)
{
MessageBox.Show(this, "Error: Unable to save the configuration. Check if you have write " +
"permissions on the directory of the application.\n" +
"Desktop Live Streamer may require administrative rights on some systems.", "Write permission required", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
this.DialogResult = DialogResult.OK;
this.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.GetType() + " " + ex.Message, "Erreur!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}