• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Modules.ModuleInstanceContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DotNetNuke.UI.Modules.ModuleInstanceContext的典型用法代码示例。如果您正苦于以下问题:C# ModuleInstanceContext类的具体用法?C# ModuleInstanceContext怎么用?C# ModuleInstanceContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ModuleInstanceContext类属于DotNetNuke.UI.Modules命名空间,在下文中一共展示了ModuleInstanceContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Initialise

 public virtual void Initialise(string fieldTitle, string fieldType, int fieldId, int moduleId,
                                string controlHelpText, string defaultValue, bool required, string validationRule,
                                string validationMsg, string editStyle, string inputSettings,
                                string outputSettings, bool normalizeFlag, bool multipleValuesFlag,
                                bool inputFilterTags, bool inputFilterScript, InputType inputSettingsListType,
                                ModuleInstanceContext moduleContext, DataTable fieldSettingsTable,
                                IFormEvents formEvents)
 {
     FieldTitle = fieldTitle;
     FieldType = fieldType;
     FieldId = fieldId;
     ModuleId = moduleId;
     HelpText = controlHelpText;
     DefaultValue = defaultValue;
     Required = required;
     ValidationRule = validationRule;
     _customValidationMessage = validationMsg;
     InputSettings = inputSettings;
     OutputSettings = outputSettings;
     Style = editStyle;
     NormalizeFlag = normalizeFlag;
     MultipleValuesFlag = multipleValuesFlag;
     FilterScript = inputFilterScript;
     FilterTags = inputFilterTags;
     ListInputType = inputSettingsListType;
     ModuleContext = moduleContext;
     FieldSettingsTable = fieldSettingsTable;
     FormEvents = formEvents;
 }
开发者ID:DNNCommunity,项目名称:DNN.FormAndList,代码行数:29,代码来源:EditControl.cs


示例2: GetTokens

 /// <summary>
 /// Implemtentation of the interface ICustomTokenProvider
 /// </summary>
 /// <param name="page"></param>
 /// <param name="moduleContext"></param>
 /// <returns></returns>
 public IDictionary<string, IPropertyAccess> GetTokens(Page page, ModuleInstanceContext moduleContext)
 {
     var tokens = new Dictionary<string, IPropertyAccess>();
     tokens["preloadeddata"] = new PreloadedDataPropertyAccess(moduleContext.PortalId);
     tokens["contactsettings"] = new SettingsPropertyAccess(moduleContext.ModuleId, moduleContext.TabId);
     
     return tokens;
 }
开发者ID:jbrinkman,项目名称:Dnn.Platform.Samples.Mvc,代码行数:14,代码来源:BusinessController.cs


示例3: Initialise

 public void Initialise(ModuleInstanceContext context)
 {
     _moduleSettings  = context.Settings;
     Configuration = context.Configuration;
     User = context.PortalSettings.UserInfo;
  
     EditUrlPattern = context.EditUrl(  DataTableColumn.RowId.ToString(CultureInfo.InvariantCulture), "{0}","edit");
 }
开发者ID:DNNCommunity,项目名称:DNN.FormAndList,代码行数:8,代码来源:BaseController.cs


示例4: SetTermPageMeta

        /// <summary>
        /// Sets the Page Meta information for the TagDetail.ascx view. 
        /// </summary>
        /// <param name="defaultPage"></param>
        /// <param name="objTerm"></param>
        /// <param name="modContext"></param>
        /// <param name="pageTitle"></param>
        /// <param name="description"></param>
        public static void SetTermPageMeta(CDefault defaultPage, TermInfo objTerm, ModuleInstanceContext modContext, string pageTitle, string description)
        {
            var title = TruncateString(pageTitle + " - " + modContext.PortalSettings.PortalName, Constants.SeoTitleLimit, false);
            var content = TruncateString(description, Constants.SeoDescriptionLimit, false);
            var link = Links.ViewTagDetail(modContext, modContext.TabId, objTerm.Name);
            var keyWords = objTerm.Name;

            SetPageMetaAndOpenGraph(defaultPage, modContext, title, content, keyWords, link);
        }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:17,代码来源:Utils.cs


示例5: SetQuestionPageMeta

        /// <summary>
        ///  Sets the Page Meta information for the Question.ascx view. 
        /// </summary>
        /// <param name="defaultPage"></param>
        /// <param name="objQuestion"></param>
        /// <param name="modContext"></param>
        /// <remarks>Need to wire in page to accept page param in URL.</remarks>
        public static void SetQuestionPageMeta(CDefault defaultPage,AlbumInfo objQuestion, ModuleInstanceContext modContext)
        {
            var title = TruncateString(objQuestion.AlbumName + " - " + modContext.PortalSettings.PortalName, Constants.SeoTitleLimit, false);
            var content = TruncateString(objQuestion.ShortContent, Constants.SeoDescriptionLimit, false);
            var link = Links.ViewQuestion(objQuestion.AlbumID, objQuestion.AlbumName, modContext.PortalSettings.ActiveTab, modContext.PortalSettings);
            var keyWords = "";
            var keyCount = 1;
            var count = keyCount;

            var terms=Conten

            foreach (var term in objQuestion.Terms.TakeWhile(term => count <= Constants.SeoKeywordsLimit))
            {
                keyWords += "," + term.Name;
                keyCount += 1;
            }

            SetPageMetaAndOpenGraph(defaultPage, modContext, title, content, keyWords, link);
        }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:26,代码来源:Utils.cs


示例6: SetHomePageMeta

        /// <summary>
        /// 
        /// </summary>
        /// <param name="defaultPage"></param>
        /// <param name="modContext"></param>
        /// <remarks>In this method we don't really want to override the dnn stuff, we simply want to add the OG stuff.</remarks>
        public static void SetHomePageMeta(CDefault defaultPage, ModuleInstanceContext modContext)
        {
            var link = Links.Home(modContext.TabId);
            var content = defaultPage.Description;
            var title = defaultPage.Title;
            var keyWords = defaultPage.KeyWords;

            SetPageMetaAndOpenGraph(defaultPage, modContext, title, content, keyWords, link);
        }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:15,代码来源:Utils.cs


示例7: UrlHelper

 public UrlHelper(ModuleInstanceContext context)
 {
     _context = context;
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:4,代码来源:UrlHelper.cs


示例8: GetTokens

 public IDictionary<string, IPropertyAccess> GetTokens(Page page, ModuleInstanceContext moduleContext)
 {
     var tokens = new Dictionary<string, IPropertyAccess>();
     tokens["moduleproperties"] = new ModulePropertiesPropertyAccess(moduleContext);
     return tokens;
 }
开发者ID:weggetor,项目名称:BBImageStory,代码行数:6,代码来源:BusinessController.cs


示例9: ViewFilteredBadges

 public static string ViewFilteredBadges(ModuleInstanceContext modContext, string filter)
 {
     return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Badges.ToString().ToLower(), "filter=" + filter);
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例10: ViewUserAnswers

 public static string ViewUserAnswers(ModuleInstanceContext modContext, int currentUserID)
 {
     return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=answers", "user=" + currentUserID);
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例11: ViewUnansweredQuestions

 public static string ViewUnansweredQuestions(ModuleInstanceContext modContext, int page, string sortBy)
 {
     if (page > 1)
     {
         return sortBy.Length > 0 ? modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "sort=" + sortBy, "unanswered=true", "page=" + page) : modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "unanswered=true", "page=" + page);
     }
     return sortBy.Length > 0 ? modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "sort=" + sortBy, "unanswered=true") : modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "unanswered=true");
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:8,代码来源:Links.cs


示例12: ViewTermSynonyms

 public static string ViewTermSynonyms(ModuleInstanceContext modContext, string termName)
 {
     return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.TermSynonyms.ToString().ToLower(), "term=" + HttpUtility.UrlEncode(termName));
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例13: ViewTagsSortedAndFiltered

 /// <summary>
 /// 
 /// </summary>
 /// <param name="modContext"></param>
 /// <param name="filter"></param>
 /// <param name="sortBy"></param>
 /// <param name="page"></param>
 /// <returns></returns>
 public static string ViewTagsSortedAndFiltered(ModuleInstanceContext modContext, string filter, string sortBy, int page)
 {
     return page > 1 ? modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Tags.ToString().ToLower(), "filter=" + HttpUtility.UrlEncode(filter), "sort=" + sortBy, "page=" + page) : modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Tags.ToString().ToLower(), "filter=" + HttpUtility.UrlEncode(filter), "sort=" + sortBy);
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:12,代码来源:Links.cs


示例14: ViewTagsSorted

 /// <summary>
 /// 
 /// </summary>
 /// <param name="modContext"></param>
 /// <param name="sortBy"></param>
 /// <param name="page"></param>
 /// <returns></returns>
 public static string ViewTagsSorted(ModuleInstanceContext modContext, string sortBy, int page)
 {
     return page > 1 ? modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Tags.ToString().ToLower(), "sort=" + sortBy, "page=" + page) : modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Tags.ToString().ToLower(), "sort=" + sortBy);
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:11,代码来源:Links.cs


示例15: ViewBadge

 public static string ViewBadge(ModuleInstanceContext modContext, string name, int id)
 {
     return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Badge.ToString().ToLower(), "name=" + id, name);
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例16: ViewBadges

 public static string ViewBadges(ModuleInstanceContext modContext)
 {
     return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Badges.ToString().ToLower());
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例17: ViewUserQuestionsSorted

 public static string ViewUserQuestionsSorted(ModuleInstanceContext modContext, int currentUserID, string sortBy)
 {
     return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Browse.ToString().ToLower(), "type=questions", "user=" + currentUserID, "sort=" + sortBy);
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例18: ViewPrivilege

 public static string ViewPrivilege(ModuleInstanceContext modContext, string privilegeName)
 {
     return privilegeName != string.Empty ? modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Convert.ToString(Constants.PageScope.Privileges).ToLower(), "privilege=" + privilegeName) : modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Convert.ToString(Constants.PageScope.Privileges).ToLower(), "");
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例19: ViewUserSubscriptions

 public static string ViewUserSubscriptions(ModuleInstanceContext modContext)
 {
     return modContext.NavigateUrl(modContext.TabId, "", false, "view=" + Constants.PageScope.Subscriptions.ToString().ToLower(), "");
 }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:4,代码来源:Links.cs


示例20: ModulePropertiesPropertyAccess

 public ModulePropertiesPropertyAccess(ModuleInstanceContext moduleContext)
 {
     _moduleContext = moduleContext;
 }
开发者ID:weggetor,项目名称:BBImageStory,代码行数:4,代码来源:BusinessController.cs



注:本文中的DotNetNuke.UI.Modules.ModuleInstanceContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Controls.ModuleMessage类代码示例发布时间:2022-05-24
下一篇:
C# EventLog.LogInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap