本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.GetTabs方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.GetTabs方法的具体用法?C# TabController.GetTabs怎么用?C# TabController.GetTabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Tabs.TabController
的用法示例。
在下文中一共展示了TabController.GetTabs方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindData
//tasks
/// <summary>
/// Loads deleted tabs and modules into the lists
/// </summary>
/// <remarks>
/// </remarks>
/// <history>
/// [VMasanas] 18/08/2004
/// [VMasanas] 20/08/2004 Update display information for deleted modules to:
/// ModuleFriendlyName: ModuleTitle - Tab: TabName
/// </history>
private void BindData()
{
int intTab;
ArrayList arrDeletedTabs = new ArrayList();
TabController objTabs = new TabController();
TabInfo objTab;
ArrayList arrTabs = objTabs.GetTabs( PortalId );
for( intTab = 0; intTab <= arrTabs.Count - 1; intTab++ )
{
objTab = (TabInfo)arrTabs[intTab];
if( objTab.IsDeleted == true )
{
arrDeletedTabs.Add( objTab );
}
}
ModuleController objModules = new ModuleController();
ModuleInfo objModule;
int intModule;
ArrayList arrDeletedModules = new ArrayList();
ArrayList arrModules = objModules.GetModules( PortalId );
for( intModule = 0; intModule <= arrModules.Count - 1; intModule++ )
{
objModule = (ModuleInfo)arrModules[intModule];
if( objModule.IsDeleted == true )
{
if( objModule.ModuleTitle == "" )
{
objModule.ModuleTitle = objModule.FriendlyName;
}
arrDeletedModules.Add( objModule );
}
}
lstTabs.DataSource = arrDeletedTabs;
lstTabs.DataBind();
lstModules.DataSource = arrDeletedModules;
lstModules.DataBind();
cboTab.DataSource = Globals.GetPortalTabs(PortalSettings.DesktopTabs, -1, false, true, false, false, true);
cboTab.DataBind();
}
示例2: LoadSettings
public override void LoadSettings()
{
try
{
if (!Page.IsPostBack)
{
// Fill Catalog Page combo
TabController tabController = new TabController();
ArrayList tabs = tabController.GetTabs(PortalId);
cmbCatalogPage.Items.Add(new ListItem(Localization.GetString("SamePage", this.LocalResourceFile), "0"));
foreach (TabInfo tabInfo in tabs)
{
if (tabInfo.IsVisible && !tabInfo.IsDeleted && !tabInfo.IsAdminTab && !tabInfo.IsSuperTab)
{
cmbCatalogPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));
}
}
// Get values from settings
txtColumnCount.Text = _settings.CategoryMenu.ColumnCount;
int catalogTabID = int.Parse(_settings.CategoryMenu.CatalogPage);
if (catalogTabID <= 0)
{
cmbCatalogPage.SelectedIndex = 0;
}
else
{
cmbCatalogPage.SelectedValue = catalogTabID.ToString();
}
}
}
catch(Exception ex)
{
Exceptions.ProcessModuleLoadException(this, ex);
}
}
示例3: SerializeTabs
/// <summary>
/// Serializes all portal Tabs
/// </summary>
/// <param name="xmlTemplate">Reference to XmlDocument context</param>
/// <param name="nodeTabs">Node to add the serialized objects</param>
/// <param name="objportal">Portal to serialize</param>
/// <param name="hRoles">A hastable with all serialized roles</param>
/// <remarks>
/// Only portal tabs will be exported to the template, Admin tabs are not exported.
/// On each tab, all modules will also be exported.
/// </remarks>
/// <history>
/// [VMasanas] 23/09/2004 Created
/// </history>
public void SerializeTabs( XmlDocument xmlTemplate, XmlNode nodeTabs, PortalInfo objportal, Hashtable hRoles )
{
TabController objtabs = new TabController();
//supporting object to build the tab hierarchy
Hashtable hTabs = new Hashtable();
XmlSerializer xserTabs = new XmlSerializer( typeof( TabInfo ) );
foreach( TabInfo objtab in objtabs.GetTabs( objportal.PortalID ) )
{
//if not an admin tab & not deleted
if( objtab.TabOrder < 10000 && ! objtab.IsDeleted )
{
StringWriter sw = new StringWriter();
xserTabs.Serialize( sw, objtab );
XmlDocument xmlTab = new XmlDocument();
xmlTab.LoadXml( sw.GetStringBuilder().ToString() );
XmlNode nodeTab = xmlTab.SelectSingleNode( "tab" );
nodeTab.Attributes.Remove( nodeTab.Attributes["xmlns:xsd"] );
nodeTab.Attributes.Remove( nodeTab.Attributes["xmlns:xsi"] );
XmlNode newnode;
if( objtab.TabID == objportal.SplashTabId )
{
newnode = xmlTab.CreateElement( "tabtype" );
newnode.InnerXml = "splashtab";
nodeTab.AppendChild( newnode );
}
else if( objtab.TabID == objportal.HomeTabId )
{
newnode = xmlTab.CreateElement( "tabtype" );
newnode.InnerXml = "hometab";
nodeTab.AppendChild( newnode );
}
else if( objtab.TabID == objportal.UserTabId )
{
newnode = xmlTab.CreateElement( "tabtype" );
newnode.InnerXml = "usertab";
nodeTab.AppendChild( newnode );
}
else if( objtab.TabID == objportal.LoginTabId )
{
newnode = xmlTab.CreateElement( "tabtype" );
newnode.InnerXml = "logintab";
nodeTab.AppendChild( newnode );
}
if( ! Null.IsNull( objtab.ParentId ) )
{
newnode = xmlTab.CreateElement( "parent" );
newnode.InnerXml = Server.HtmlEncode( hTabs[objtab.ParentId].ToString() );
nodeTab.AppendChild( newnode );
// save tab as: ParentTabName/CurrentTabName
hTabs.Add( objtab.TabID, hTabs[objtab.ParentId] + "/" + objtab.TabName );
}
else
{
// save tab as: CurrentTabName
hTabs.Add( objtab.TabID, objtab.TabName );
}
// Serialize modules
XmlNode nodePanes;
nodePanes = nodeTab.AppendChild( xmlTab.CreateElement( "panes" ) );
ModuleController objmodules = new ModuleController();
DesktopModuleController objDesktopModules = new DesktopModuleController();
ModuleDefinitionController objModuleDefController = new ModuleDefinitionController();
XmlSerializer xserModules = new XmlSerializer( typeof( ModuleInfo ) );
Dictionary<int, ModuleInfo> dict = objmodules.GetTabModules(objtab.TabID);
foreach( KeyValuePair<int, ModuleInfo> pair in dict )
{
ModuleInfo objmodule = pair.Value;
if (!objmodule.IsDeleted)
{
sw = new StringWriter();
xserModules.Serialize(sw, objmodule);
XmlDocument xmlModule = new XmlDocument();
xmlModule.LoadXml(sw.GetStringBuilder().ToString());
XmlNode nodeModule = xmlModule.SelectSingleNode("module");
nodeModule.Attributes.Remove(nodeModule.Attributes["xmlns:xsd"]);
nodeModule.Attributes.Remove(nodeModule.Attributes["xmlns:xsi"]);
//.........这里部分代码省略.........
示例4: loadTabs
private void loadTabs(string cartPageID)
{
TabController tabController = new TabController();
ArrayList tabs = tabController.GetTabs(PortalId);
foreach (TabInfo tabInfo in tabs)
{
if (tabInfo.IsVisible && !tabInfo.IsDeleted && !tabInfo.IsAdminTab && !tabInfo.IsSuperTab)
{
lstShoppingCartPageID.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));
}
}
if (cartPageID != string.Empty)
{
try
{
lstShoppingCartPageID.SelectedValue = cartPageID;
}
catch{}
}
}
示例5: LoadSettings
public override void LoadSettings()
{
try
{
if (!Page.IsPostBack)
{
if (storeInfo == null)
{
StoreController storeController = new StoreController();
storeInfo = storeController.GetStoreInfo(PortalId);
if (storeInfo.PortalTemplates)
{
templatesPath = PortalSettings.HomeDirectoryMapPath + "Store\\";
}
else
{
templatesPath = MapPath(ModulePath) + "\\";
}
}
TabController tabController = new TabController();
ArrayList tabs = tabController.GetTabs(PortalId);
lstNPLDetailPage.Items.Add(new ListItem(Localization.GetString("NPLSamePage", this.LocalResourceFile), "0"));
lstFPLDetailPage.Items.Add(new ListItem(Localization.GetString("FPLSamePage", this.LocalResourceFile), "0"));
lstPPLDetailPage.Items.Add(new ListItem(Localization.GetString("PPLSamePage", this.LocalResourceFile), "0"));
lstCPLDetailPage.Items.Add(new ListItem(Localization.GetString("CPLSamePage", this.LocalResourceFile), "0"));
lstPDSReturnPage.Items.Add(new ListItem(Localization.GetString("PDSSamePage", this.LocalResourceFile), "0"));
foreach (TabInfo tabInfo in tabs)
{
if (!tabInfo.IsDeleted && !tabInfo.IsAdminTab && !tabInfo.IsSuperTab)
{
lstNPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));
lstFPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));
lstPPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));
lstCPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));
lstPDSReturnPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));
}
}
loadTemplates();
String repeatDirection = Localization.GetString("RepeatDirectionHoriz", this.LocalResourceFile);
lstNPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));
lstFPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));
lstPPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));
lstCPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));
repeatDirection = Localization.GetString("RepeatDirectionVert", this.LocalResourceFile);
lstNPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));
lstFPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));
lstPPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));
lstCPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));
// General Player Settings
chkUseDefaultCategory.Checked = bool.Parse(moduleSettings.General.UseDefaultCategory);
chkShowMessage.Checked = bool.Parse(moduleSettings.General.ShowMessage);
chkShowNew.Checked = bool.Parse(moduleSettings.General.ShowNewProducts);
chkShowFeatured.Checked = bool.Parse(moduleSettings.General.ShowFeaturedProducts);
chkShowPopular.Checked = bool.Parse(moduleSettings.General.ShowPopularProducts);
chkShowCategory.Checked = bool.Parse(moduleSettings.General.ShowCategoryProducts);
chkShowDetail.Checked = bool.Parse(moduleSettings.General.ShowProductDetail);
lstDefaultCategory.SelectedValue = moduleSettings.General.DefaultCategoryID;
ListItem itemTemplate = lstTemplate.Items.FindByText(moduleSettings.General.Template);
if (itemTemplate != null)
{
itemTemplate.Selected = true;
}
// New list settings
ListItem itemNPLContainerTemplate = lstNPLContainerTemplate.Items.FindByText(moduleSettings.NewProducts.ContainerTemplate);
if (itemNPLContainerTemplate != null)
{
itemNPLContainerTemplate.Selected = true;
}
ListItem itemNPLTemplate = lstNPLTemplate.Items.FindByText(moduleSettings.NewProducts.Template);
if (itemNPLTemplate != null)
{
itemNPLTemplate.Selected = true;
}
txtNPLRowCount.Text = moduleSettings.NewProducts.RowCount;
txtNPLColumnCount.Text = moduleSettings.NewProducts.ColumnCount;
txtNPLColumnWidth.Text = moduleSettings.NewProducts.ColumnWidth;
ListItem itemNPLDirection = lstNPLRepeatDirection.Items.FindByValue(moduleSettings.NewProducts.RepeatDirection);
if (itemNPLDirection != null)
{
itemNPLDirection.Selected = true;
}
txtNPLThumbnailWidth.Text = moduleSettings.NewProducts.ThumbnailWidth;
chkNPLShowThumbnail.Checked = bool.Parse(moduleSettings.NewProducts.ShowThumbnail);
lstNPLDetailPage.SelectedValue = moduleSettings.NewProducts.DetailPage;
// Featured list settings
ListItem itemFPLContainerTemplate = lstFPLContainerTemplate.Items.FindByText(moduleSettings.FeaturedProducts.ContainerTemplate);
if (itemFPLContainerTemplate != null)
{
itemFPLContainerTemplate.Selected = true;
}
ListItem itemFPLTemplate = lstFPLTemplate.Items.FindByText(moduleSettings.FeaturedProducts.Template);
//.........这里部分代码省略.........
示例6: GetPortalTabs
public static ArrayList GetPortalTabs(int intPortalId, bool blnNoneSpecified, bool blnHidden, bool blnDeleted, bool blnURL, bool bCheckAuthorised)
{
TabController objTabs = new TabController();
ArrayList arrTabs = null;
// Obtain current PortalSettings from Current Context
PortalSettings _portalSettings = PortalController.GetCurrentPortalSettings();
//Get the portal's tabs
if (intPortalId == _portalSettings.PortalId)
{
//Load current Portals tabs into arrTabs
arrTabs = _portalSettings.DesktopTabs;
}
else
{
//We are editing a different portal (as host) so get the portal's tabs
arrTabs = objTabs.GetTabs(intPortalId);
}
return GetPortalTabs(arrTabs, -1, blnNoneSpecified, blnHidden, blnDeleted, blnURL, bCheckAuthorised);
}