Exemplo n.º 1
0
        public override void SyncChanges()
        {
            EnsureChildControls();
            SPSListExplorer webpart = WebPartToEdit as SPSListExplorer;

            if (webpart != null)
            {
                Debug.WriteLine("*ListGuid:" + ddlLists.SelectedValue);
                Debug.WriteLine("*ListViewGuid:" + ddlViews.SelectedValue);

                if (!string.IsNullOrEmpty(webpart.ListGuid))
                {
                    ddlLists.SelectedValue = webpart.ListGuid;

                    if (!string.IsNullOrEmpty(webpart.ListViewGuid))
                    {
                        SPSEditorPartsTools.FillListViews(ddlViews, webpart.ListGuid);
                        ddlViews.SelectedValue = webpart.ListViewGuid;
                    }

                    chkShowNewButton.Checked     = webpart.ShowNewButton;
                    chkShowActionsButton.Checked = webpart.ShowActionsButton;
                    chkShowUpButton.Checked      = webpart.ShowUpButton;
                    chkShowNumberOfItems.Checked = webpart.ShowNumberOfItems;
                    chkShowBreadCrumb.Checked    = webpart.ShowBreadCrumb;
                    chkShowTree.Checked          = webpart.ShowTree;
                    chkSortHierarchyTree.Checked = webpart.SortHierarchyTree;
                }
            }
        }
 private void ddlWebParts_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (chkNavigateToList.Checked)
     {
         string listName = ddlWebparts.SelectedItem.Text;
         string guid     = SPContext.Current.Web.Lists[listName].ID.ToString("B");
         SPSEditorPartsTools.FillListViews(ddlListViews, guid);
     }
 }
Exemplo n.º 3
0
        protected override void CreateChildControls()
        {
            ddlLists       = new DropDownList();
            ddlLists.Width = new Unit("100%");

            if (_documentLibrary)
            {
                SPSEditorPartsTools.FillLists(ddlLists, SPBaseType.DocumentLibrary);
            }
            else
            {
                SPSEditorPartsTools.FillListsExclude(ddlLists, SPBaseType.DocumentLibrary);
            }

            ddlLists.SelectedIndexChanged += ddlLists_SelectedIndexChanged;
            ddlLists.AutoPostBack          = true;
            //NavigationTools.FillWebParts(Context, ddlLists);
            Controls.Add(ddlLists);

            ddlViews       = new DropDownList();
            ddlViews.Width = new Unit("100%");
            SPSEditorPartsTools.FillListViews(ddlViews, ddlLists.SelectedValue);
            Controls.Add(ddlViews);

            chkShowTree      = new CheckBox();
            chkShowTree.Text = SPSResources.GetResourceString("SPSPE_ShowTree");
            Controls.Add(chkShowTree);

            chkSortHierarchyTree      = new CheckBox();
            chkSortHierarchyTree.Text = SPSResources.GetResourceString("SPSPE_SortHierarchyTree");
            Controls.Add(chkSortHierarchyTree);

            chkShowBreadCrumb      = new CheckBox();
            chkShowBreadCrumb.Text = SPSResources.GetResourceString("SPSPE_ShowBreadCrumb");
            Controls.Add(chkShowBreadCrumb);

            chkShowNewButton      = new CheckBox();
            chkShowNewButton.Text = SPSResources.GetResourceString("SPSPE_ShowNewButton");
            Controls.Add(chkShowNewButton);

            chkShowActionsButton      = new CheckBox();
            chkShowActionsButton.Text = SPSResources.GetResourceString("SPSPE_ShowActionsButton");
            Controls.Add(chkShowActionsButton);

            chkShowUpButton      = new CheckBox();
            chkShowUpButton.Text = SPSResources.GetResourceString("SPSPE_ShowUpFolderButton");
            Controls.Add(chkShowUpButton);

            chkShowNumberOfItems      = new CheckBox();
            chkShowNumberOfItems.Text = SPSResources.GetResourceString("SPSPE_CountItemsInTree");
            Controls.Add(chkShowNumberOfItems);
        }
Exemplo n.º 4
0
 private void ddlLists_SelectedIndexChanged(object sender, EventArgs e)
 {
     SPSEditorPartsTools.FillListViews(ddlViews, ddlLists.SelectedValue);
 }