public override void SyncChanges()
        {
            this.EnsureChildControls();
            DocLibTreeView wp = (DocLibTreeView)this.WebPartToEdit;

            txtDocLibUrl.Text      = wp.DocLibUrl;
            ddlDepth.SelectedValue = wp.Depth.ToString();
            if (ddlDepth.SelectedIndex == -1)
            {
                ddlDepth.SelectedIndex = 0;
            }
            chkShowItemTitle.Checked = wp.ShowItemTitle;
            chkShowIconCss.Checked   = wp.ShowIconCss;
            chkShowIconEdit.Checked  = wp.ShowIconEdit;
        }
        public override bool ApplyChanges()
        {
            this.EnsureChildControls();
            DocLibTreeView wp = (DocLibTreeView)this.WebPartToEdit;

            wp.DocLibUrl = txtDocLibUrl.Text;
            int depth = MAXLEVEL;

            if (ddlDepth.SelectedIndex != -1)
            {
                int.TryParse(ddlDepth.SelectedItem.Value, out depth);
            }
            wp.Depth         = depth;
            wp.ShowItemTitle = chkShowItemTitle.Checked;
            wp.ShowIconCss   = chkShowIconCss.Checked;
            wp.ShowIconEdit  = chkShowIconEdit.Checked;
            return(true);
        }