private void ButtonAddXml_OnClick(object sender, RoutedEventArgs e)
        {
            ConnectionInfo ci = new ConnectionInfo(string.Empty, GetNewXmlFileEntryName(), ConnectionTypes.ODBC)
            {
                IsXmlFile = true
            };

            var cef = new XmlConnectionEditWindow(ci)
            {
                Owner = this
            };

            if (cef.ShowDialog() == true)
            {
                var item = new ConnectionListItem()
                {
                    Name = ci.Type.ToString(),
                    Type = ci.ConnectionDescriptor.SyntaxProvider.Description,
                    Tag  = ci
                };

                var source = LvXmlFiles.ItemsSource as ObservableCollection <ConnectionListItem>;
                if (source != null)
                {
                    source.Add(item);
                }

                App.XmlFiles.Add(ci);
                LvXmlFiles.SelectedItem = item;
            }

            LvXmlFiles.Focus();

            Properties.Settings.Default.XmlFiles = App.XmlFiles;

            Properties.Settings.Default.Connections = App.Connections;
            Properties.Settings.Default.Save();
        }
        private void ButtonConfigureXml_OnClick(object sender, RoutedEventArgs e)
        {
            var item = (ConnectionListItem)LvXmlFiles.SelectedItem;

            if (item == null)
            {
                return;
            }

            var ci = (ConnectionInfo)item.Tag;

            var cef = new XmlConnectionEditWindow(ci)
            {
                Owner = this
            };

            if (cef.ShowDialog() == true)
            {
                item.Name = ci.Name;
                item.Type = ci.ConnectionDescriptor.SyntaxProvider.Description;
            }

            LvXmlFiles.Focus();
        }