private async void OKEditButton_Click(object sender, EventArgs e)
{
if (this.ListsList.SelectedItem == null) return;
using (ControlTransaction.Disabled(this))
{
ListElement listItem = (ListElement)this.ListsList.SelectedItem;
if (string.IsNullOrEmpty(this.NameTextBox.Text))
{
MessageBox.Show(Properties.Resources.ListManageOKButton1);
return;
}
listItem.Name = this.NameTextBox.Text;
listItem.IsPublic = this.PublicRadioButton.Checked;
listItem.Description = this.DescriptionText.Text;
try
{
await listItem.Refresh();
}
catch (WebApiException ex)
{
MessageBox.Show(string.Format(Properties.Resources.ListManageOKButton2, ex.Message));
return;
}
this.ListsList.Items.Clear();
this.ListManage_Load(null, EventArgs.Empty);
this.EditCheckBox.AutoCheck = true;
this.EditCheckBox.Checked = false;
}
}