Beispiel #1
0
        private void Commit()
        {
            if (UrlListBox.SelectedIndex < 0)
            {
                return;
            }
            if ((string)UrlListBox.SelectedItem == UrlTextBox.Text)
            {
                LoadConfig();
                return;
            }

            if (ValidateUrl())
            {
                UrlListBox.Items[UrlListBox.SelectedIndex] = UrlTextBox.Text;
            }
            controller.SaveOnlineConfigSource(UrlListBox.Items.OfType <string>().Where(s => !string.IsNullOrWhiteSpace(s)).Distinct());
            LoadConfig();
            return;
        }