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


C# TextNode类代码示例

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


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

示例1: AdjustUrlPath

 private TextNode AdjustUrlPath(TextNode textValue)
 {
     if (Importer != null)
     {
         textValue.Value = Importer.AlterUrl(textValue.Value, ImportPaths);
     }
     return textValue;
 }
开发者ID:helephant,项目名称:dotless,代码行数:8,代码来源:Url.cs

示例2: TextButton

 public TextButton(ButtonFrames frames, SpriteFont font, int textSize, string text)
     : base(frames)
 {
     _text = new TextNode(font, textSize)
     {
         Text = text
     };
     Icon = _text;
 }
开发者ID:nikita-sky,项目名称:SkidiKit,代码行数:9,代码来源:TextButton.cs

示例3: Activate

 // Given new text node
 public void Activate(TextNode tn)
 {
     CurNode = tn;
     Active = true;
     WritingText = true;
     Chat.text = "";
     Name.text = CurNode.Name;
     WritingIndex = 0;
 }
开发者ID:FourFangedCow,项目名称:UnityVN,代码行数:10,代码来源:TextManager.cs

示例4: Main

        static void Main()
        {
			ImaginaryHost h = new ImaginaryHost();
			TextNode t = new TextNode(h);
			Node tn = (Node)t;

			MemoryStream s = new MemoryStream();
			h.SerializeTo(s);
			s.Position = 0;
			
            System.Windows.Forms.Application.Run();
        }
开发者ID:Kerdek,项目名称:scaling-tribble,代码行数:12,代码来源:Program.cs

示例5: Read

 public Node Read(string xmlString)
 {
     Node node = null;
     if (xmlString.Contains("?xml"))
     {
         node = new XmlDeclarationNode {Name = "Declaration", Value = xmlString};
     }
     else if (xmlString.Contains("<!--"))
     {
         node = new CommentNode {Name = "Comment", Value = xmlString.Substring(4, xmlString.Length - 7)};
     }else if (xmlString.Contains("\\"))
     {
         node = new CommentNode {Name = "ScriptComment", Value = xmlString.Substring(2, xmlString.Length - 2)};
     }
     else if (xmlString.Contains("<Item>"))
     {
         node = new TextNode {Name = "Text", Value = xmlString.Substring(6, xmlString.Length - 13)};
     }else if (xmlString.ToLower().Contains("<script>"))
     {
         node = new TextNode {Name = "script", Value = xmlString.Substring(8, xmlString.Length - 17)};
     }
     return node;
 }
开发者ID:hjyao,项目名称:compound,代码行数:23,代码来源:XmlDocumentReader.cs

示例6: Url

        public Url(TextNode value, IEnumerable<string> paths)
        {
            // The following block is commented out, because we want to have the path verbatim,
            // not rewritten. Here's why: Say less/trilogy_base.less contains
            //
            //   background-image: url(img/sprites.png)
            //
            // and serverfault/all.less contains
            //
            //   @import "../less/trilogy_base"
            //
            // If relative paths where to be rewritten, the resulting serverfault/all.css would read
            //
            //   background-image: url(../less/img/sprites.png)
            //
            // which is obviously not what we want.

            /*if (!Regex.IsMatch(value.Value, @"^(http:\/)?\/") && paths.Any())
            {
                value.Value = paths.Concat(new[] {value.Value}).AggregatePaths();
            }*/

            Value = value;
        }
开发者ID:NickCraver,项目名称:dotless,代码行数:24,代码来源:Url.cs

示例7: SvgTitleElement

 public SvgTitleElement(string s)
 {
     TextNode tn = new TextNode(s);
     AddChild(tn);
 }
开发者ID:djpnewton,项目名称:ddraw,代码行数:5,代码来源:SvgTitleElement.cs

示例8: BlockNode

 public BlockNode(TextNode owner)
 {
     this.owner = owner;
 }
开发者ID:JackWangCUMT,项目名称:extensions,代码行数:4,代码来源:EmailTemplateParser.Nodes.cs

示例9: VisitText

		public virtual void VisitText(TextNode textNode)
		{
			VisitChildren(textNode);
		}
开发者ID:modulexcite,项目名称:ICSharpCode.Decompiler-retired,代码行数:4,代码来源:DepthFirstAstVisitor.cs

示例10: VisitText

		public void VisitText(TextNode textNode)
		{
			// unused
		}
开发者ID:x-strong,项目名称:ILSpy,代码行数:4,代码来源:CSharpOutputVisitor.cs

示例11: ConvertFromCSharp

        public string ConvertFromCSharp(TextNode node)
        {
            var sb = new StringBuilder();

            if (node.Text == "List")
            {
                sb.Append(ConvertFromCSharp(node.Children[0]));
                sb.Append("[]");
            }
            else if (node.Text == "Dictionary")
            {
                sb.Append("{ [index:");
                sb.Append(ConvertFromCSharp(node.Children[0]));
                sb.Append("]: ");
                sb.Append(ConvertFromCSharp(node.Children[1]));
                sb.Append("; }");
            }
            else
            {
                sb.Append(TypeAlias(node.Text));
                if (node.Children.Count > 0)
                {
                    sb.Append("<");
                    for (var i = 0; i < node.Children.Count; i++)
                    {
                        var childNode = node.Children[i];

                        if (i > 0)
                            sb.Append(",");

                        sb.Append(ConvertFromCSharp(childNode));
                    }
                    sb.Append(">");
                }
            }

            return sb.ToString();
        }
开发者ID:ricardoshimoda,项目名称:ServiceStack,代码行数:38,代码来源:TypeScriptGenerator.cs

示例12: AcceptNodePackage

 /// <summary>
 ///     Add a string for the system to draw. Strings are drawn in a FIFO basis, so calling this method
 ///     does not guarantee the string will immediately begin drawing.
 /// </summary>
 /// <param name="str">String to draw</param>
 /// <param name="delay">Optional param, to specify delay before the message is written</param>
 public void AcceptNodePackage(TextNode.NodePackage package, bool skipCurrent = false)
 {
     if (skipCurrent) { SkipCurrentSequence(); }
     toDisplay.Enqueue(package);
     PackageAddedToQueue();
 }
开发者ID:akrischer,项目名称:red-pill-blue-pill,代码行数:12,代码来源:AbstractTerminal.cs

示例13: AdjustUrlPath

 private TextNode AdjustUrlPath(TextNode textValue)
 {
     if (Importer != null && !Regex.IsMatch(textValue.Value, @"^(([a-zA-Z]+:)|(\/))"))
     {
         textValue.Value = Importer.AlterUrl(textValue.Value, ImportPaths);
     }
     return textValue;
 }
开发者ID:heinrichbreedt,项目名称:dotless,代码行数:8,代码来源:Url.cs

示例14: AddChar

 internal override GlobNode AddChar(char c)
 {
     var node = new TextNode(this);
     nodes.Add(node);
     return node.AddChar(c);
 }
开发者ID:MicroHealthLLC,项目名称:mCleaner,代码行数:6,代码来源:Glob.cs

示例15: Add

 public bool Add(TextNode textNode)
 {
     if(Contains(textNode.Text)) {
         foreach (var child in Children) {
             if (child.Add(textNode)) {
                 return true;
             }
         }
         Children.Add(textNode);
         return true;
     }
     return false;
 }
开发者ID:aarondandy,项目名称:pigeoid,代码行数:13,代码来源:WriterUtils.cs


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