本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}