当前位置: 首页>>代码示例>>C#>>正文


C# Maticsoft.GetContentType方法代码示例

本文整理汇总了C#中Maticsoft.GetContentType方法的典型用法代码示例。如果您正苦于以下问题:C# Maticsoft.GetContentType方法的具体用法?C# Maticsoft.GetContentType怎么用?C# Maticsoft.GetContentType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Maticsoft的用法示例。


在下文中一共展示了Maticsoft.GetContentType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateAd

        private string CreateAd(int AdTypeid, Maticsoft.Model.Settings.AdvertisePosition model, Maticsoft.BLL.Settings.Advertisement bll, string strADContent, int showType)
        {
            int num2;
            string str6;
            List<int> contentType = bll.GetContentType(model.AdvPositionId);
            if (contentType == null)
            {
                base.Response.Write("广告不存在。");
                return strADContent;
            }
            int num = -1;
            do
            {
                num2 = new Random().Next(0, 4);
            }
            while (!contentType.Contains(num2));
            num = num2;
            int? nullable = model.ShowType;
            if (nullable.HasValue)
            {
                int? nullable2 = model.ShowType;
                if ((nullable2.Value == 4) && !string.IsNullOrWhiteSpace(model.AdvHtml))
                {
                    num = 3;
                }
            }
            if (num == 0)
            {
                strADContent = bll.CreateTextTag(model.AdvPositionId, num);
                string str = "adtext.htm";
                this.strADContentHtml = this.ReadHtml(base.Server.MapPath(str)).Replace("<%=tabWidth%>", model.Width.ToString()).Replace("<%=tabHeight%>", model.Height.ToString()).Replace("<%=strADContent%>", strADContent).ToString();
                return strADContent;
            }
            if (num != 1)
            {
                switch (num)
                {
                    case 2:
                    {
                        string str7 = string.Empty;
                        if (bll.IsExist(model.AdvPositionId, num) > 1)
                        {
                            str7 = "adpic.htm";
                        }
                        else
                        {
                            str7 = "adsingle.htm";
                        }
                        string str8 = this.ReadHtml(base.Server.MapPath(str7));
                        string str9 = bll.CreateFlashTag(model.AdvPositionId, num);
                        str8 = str8.Replace("<%=tabWidth%>", model.Width.ToString()).Replace("<%=tabHeight%>", model.Height.ToString());
                        if (this.strAutoStart.Equals("0"))
                        {
                            str8 = str8.Replace("<%=tabStyle %>", "style=\"display:none;\"");
                        }
                        else
                        {
                            str8 = str8.Replace("<%=tabStyle %>", "");
                        }
                        this.strADContentHtml = str8.Replace("<%=strADContent%>", str9).ToString();
                        return strADContent;
                    }
                    case 3:
                        this.strW = model.Width.Value.ToString();
                        this.strH = model.Height.Value.ToString();
                        this.strADContentHtml = Globals.HtmlDecode(bll.GetDefindCode(model.AdvPositionId));
                        break;
                }
                return strADContent;
            }
            string path = string.Empty;
            string newValue = "";
            string str5 = "";
            switch (showType)
            {
                case 0:
                    path = "adshow.htm";
                    str5 = bll.CreatePicTag(model.AdvPositionId, num, true, null, null);
                    goto Label_034E;

                case 1:
                    path = "adUdshow.htm";
                    str5 = bll.CreatePicTag(model.AdvPositionId, num, true, model.RepeatColumns, null);
                    goto Label_034E;

                case 2:
                    if (!this.ADForProject.HasValue)
                    {
                        newValue = "<script src=\"moveleft.js\" type=\"text/javascript\"></script>";
                        path = "adshow.htm";
                        str5 = bll.CreatePicTag(model.AdvPositionId, num, true, null, null);
                    }
                    else
                    {
                        if (this.ADForProject.Value == 1)
                        {
                            path = "SNSadpic.htm";
                            str5 = bll.CreatePicTag(model.AdvPositionId, num, false, null, null);
                        }
                        if (this.ADForProject.Value == 2)
//.........这里部分代码省略.........
开发者ID:huaminglee,项目名称:myyyyshop,代码行数:101,代码来源:MCFShow.cs


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