private void lstFeatureClasses_SelectedIndexChanged(object sender, EventArgs e)
        {
            var item = (RasterWmsItem)lstFeatureClasses.SelectedItem;

            grpRaster.Controls.Clear();
            _updatingLogicalClassUI = true;
            try
            {
                if (item != null)
                {
                    var ctrl = new RasterDefinitionCtrl(_config, item, _service);
                    ctrl.Dock = DockStyle.Fill;
                    grpRaster.Controls.Add(ctrl);

                    btnRemove.Enabled = true;

                    //Get logical class
                    string schemaName = item.SchemaName;
                    string className  = item.FeatureClass;

                    if (!string.IsNullOrEmpty(schemaName) && !string.IsNullOrEmpty(className))
                    {
                        _logicalClass = _config.GetClass(schemaName, className);
                        if (_logicalClass != null)
                        {
                            txtClassName.Text        = _logicalClass.Name;
                            txtClassDescription.Text = _logicalClass.Description;
                        }
                        else
                        {
                            txtClassName.Text        = string.Empty;
                            txtClassDescription.Text = string.Empty;
                        }
                    }
                    else
                    {
                        _logicalClass            = null;
                        txtClassName.Text        = string.Empty;
                        txtClassDescription.Text = string.Empty;
                    }
                }
                else
                {
                    _logicalClass            = null;
                    txtClassName.Text        = string.Empty;
                    txtClassDescription.Text = string.Empty;
                }
            }
            finally
            {
                _updatingLogicalClassUI = false;
            }
            grpLogicalClass.Enabled = (_logicalClass != null);
        }
        private void lstFeatureClasses_SelectedIndexChanged(object sender, EventArgs e)
        {
            var item = (RasterWmsItem)lstFeatureClasses.SelectedItem;
            grpRaster.Controls.Clear();
            _updatingLogicalClassUI = true;
            try
            {
                if (item != null)
                {
                    var ctrl = new RasterDefinitionCtrl(_config, item, _service);
                    ctrl.Dock = DockStyle.Fill;
                    grpRaster.Controls.Add(ctrl);

                    btnRemove.Enabled = true;

                    //Get logical class
                    string schemaName = item.SchemaName;
                    string className = item.FeatureClass;

                    if (!string.IsNullOrEmpty(schemaName) && !string.IsNullOrEmpty(className))
                    {
                        _logicalClass = _config.GetClass(schemaName, className);
                        if (_logicalClass != null)
                        {
                            txtClassName.Text = _logicalClass.Name;
                            txtClassDescription.Text = _logicalClass.Description;
                        }
                        else
                        {
                            txtClassName.Text = string.Empty;
                            txtClassDescription.Text = string.Empty;
                        }
                    }
                    else
                    {
                        _logicalClass = null;
                        txtClassName.Text = string.Empty;
                        txtClassDescription.Text = string.Empty;
                    }
                }
                else
                {
                    _logicalClass = null;
                    txtClassName.Text = string.Empty;
                    txtClassDescription.Text = string.Empty;
                }
            }
            finally
            {
                _updatingLogicalClassUI = false;
            }
            grpLogicalClass.Enabled = (_logicalClass != null);
        }