//You must override this method to ensure the editor displays the current configuration
        public override void SyncChanges()
        {
            EnsureChildControls();
            //Get a reference to the web part we're configuring
            ListDisplayWebPart webPart = this.WebPartToEdit as ListDisplayWebPart;

            if (webPart != null)
            {
                //Make sure the right item in the drop-down list is selected
                listOfSiteLists.SelectedValue = webPart.ListID.ToString();
            }
        }
        //You must override this method to save configuration changes
        public override bool ApplyChanges()
        {
            EnsureChildControls();
            //Get a reference to the web part we're configuring
            ListDisplayWebPart webPart = this.WebPartToEdit as ListDisplayWebPart;

            if (webPart != null)
            {
                //Set it's properties
                webPart.ListName = listOfSiteLists.SelectedItem.Text;
                webPart.ListID   = new Guid(listOfSiteLists.SelectedValue);
            }
            return(true);
        }