Beispiel #1
0
        public override bool ApplyChanges()
        {
            EnsureChildControls();
            FolderExplorer webpart = WebPartToEdit as FolderExplorer;

            if (webpart != null)
            {
                webpart.ListGuid = SPSEditorPartsTools.GetListGuidFromListViewGuid(Context,
                                                                                   ddlWebparts.SelectedValue);
                webpart.ListViewGuid       = ddlWebparts.SelectedValue;
                webpart.FollowListView     = chkFollowListView.Checked;
                webpart.NavigateToList     = chkNavigateToList.Checked;
                webpart.NavigateToListView = ddlListViews.SelectedValue;
                webpart.ShowCounter        = chkShowCounter.Checked;
                webpart.Filter             = txtFilter.Text.ToUpper();
                webpart.HideStartUnder     = chkHideStartUnder.Checked;

                int converted;
                if (int.TryParse(txtExpandDepth.Text, out converted))
                {
                    webpart.ExpandDepth = converted;
                }

                webpart.ClearControlState();
                webpart.ClearCache();
                return(true);
            }
            return(false);
        }
        public override bool ApplyChanges()
        {
            EnsureChildControls();
            FolderBreadCrumb webpart = WebPartToEdit as FolderBreadCrumb;

            if (webpart != null)
            {
                webpart.ListGuid     = SPSEditorPartsTools.GetListGuidFromListViewGuid(Context, ddlWebparts.SelectedValue);
                webpart.ListViewGuid = ddlWebparts.SelectedValue;

                int converted;
                if (int.TryParse(txtMaxLevels.Text, out converted))
                {
                    webpart.MaxLevels = converted;
                }

                webpart.NavigateToList     = chkNavigateToList.Checked;
                webpart.NavigateToListView = ddlListViews.SelectedValue;
                return(true);
            }
            return(false);
        }