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


C# StyleInfo.Clone方法代码示例

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


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

示例1: HandleStyle

        private void HandleStyle(string token, StyleInfo model)
        {
            StyleInfo si= model.Clone() as StyleInfo;	// always push a StyleInfo
            _StyleStack.Push(si);						//   since they will always be popped

            Hashtable ht = ParseHtmlCmd(token);
            string style = (string) ht["style"];

            HandleStyleString(style, si);

            return;
        }
开发者ID:huasonli,项目名称:My-FyiReporting,代码行数:12,代码来源:PageTextHtml.cs

示例2: BuildAnchor

        private void BuildAnchor(string token, StyleInfo oldsi, PageText model)
        {
            StyleInfo si= oldsi.Clone() as StyleInfo;	// always push a StyleInfo
            _StyleStack.Push(si);						//   since they will always be popped

            Hashtable ht = ParseHtmlCmd(token);

            string href = (string) ht["href"];
            if (href == null || href.Length < 1)
                return;
            model.HyperLink = model.Tooltip = href;
            si.TextDecoration = TextDecorationEnum.Underline;
            si.Color = Color.Blue;
        }
开发者ID:huasonli,项目名称:My-FyiReporting,代码行数:14,代码来源:PageTextHtml.cs

示例3: HandleFont

        private void HandleFont(string token, StyleInfo model)
        {
            StyleInfo si = model.Clone() as StyleInfo;	// always push a StyleInfo
            _StyleStack.Push(si);						//   since they will always be popped

            PageTextHtmlCmdLexer hc = new PageTextHtmlCmdLexer(token.Substring(5));
            Hashtable ht = hc.Lex();

            string style = (string)ht["style"];
            HandleStyleString(style, si);

            string color = (string)ht["color"];
            if (color != null && color.Length > 0)
                si.Color = XmlUtil.ColorFromHtml(color, si.Color);

            string size = (string)ht["size"];
            if (size != null && size.Length > 0)
                HandleStyleFontSize(si, size);

            string face = (string)ht["face"];
            if (face != null && face.Length > 0)
                si.FontFamily = face;

            return;
        }
开发者ID:huasonli,项目名称:My-FyiReporting,代码行数:25,代码来源:PageTextHtml.cs

示例4: HandleStyle

		private void HandleStyle(string token, StyleInfo model)
		{
			StyleInfo si= model.Clone() as StyleInfo;	// always push a StyleInfo
			_StyleStack.Push(si);						//   since they will always be popped

			Hashtable ht = ParseHtmlCmd(token);
			string style = (string) ht["style"];
			if (style == null || style.Length < 1)
				return;

			string[] styleList = style.Split(new char[] {';'});

			foreach (string item in styleList)
			{
				string[] val = item.Split(new char[] {':'});
				if (val.Length != 2)
					continue;			// must be illegal syntax
				string tval = val[1].Trim();
				switch (val[0].ToLower().Trim())
				{
					case "background":
					case "background-color":
						si.BackgroundColor = XmlUtil.ColorFromHtml(tval, si.Color);
						break;
					case "color":
						si.Color = XmlUtil.ColorFromHtml(tval, si.Color);
						break;
					case "font-family":
						si.FontFamily = tval;
						break;
					case "font-size":
						HandleStyleFontSize(si, tval);
						break;
					case "font-style":
						if (tval == "italic")
							si.FontStyle = FontStyleEnum.Italic;
						break;
					case "font-weight":
						HandleStyleFontWeight(si, tval);
						break;
				}
			}
			
			return;
		}
开发者ID:mnisl,项目名称:OD,代码行数:45,代码来源:PageTextHtml.cs


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