當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。