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


C# ParseItem.InsertAfter方法代码示例

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


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

示例1: AddItem

        /// <summary>
        /// Add a command, keyword, operator, etc to the tag list
        /// </summary>
        private void AddItem(ref string s_SQL, ref int s32_Start, int s32_End, ref ParseItem i_LastItem)
        {
            int  s32_Last = Math.Min (s32_End, s_SQL.Length);
            string s_Text = s_SQL.Substring(s32_Start, s32_Last -s32_Start);
            ParseItem i_Item = new ParseItem(this, s_Text);

            if (i_Item.Type != eType.Invalid)
            {
                if (mi_FirstItem == null)
                    mi_FirstItem = i_Item;
                else
                    i_LastItem.InsertAfter(i_Item);

                i_LastItem = i_Item;

                if (!mb_CursorStored && ms32_CursorPos <= s32_End)
                {
                    mb_CursorStored = true;
                    i_Item.CursorPos = Math.Max(0, ms32_CursorPos - s32_Start);

                    Functions.PrintDebug("AddItem() set CursorPos={0} in Item      {1} <{2}> ...", i_Item.CursorPos, getDebug(i_Item.Prev), getDebug(i_Item), typeof(Parser));
                }
            }

            s32_Start = -1;
        }
开发者ID:dstrucl,项目名称:Tangenta40,代码行数:29,代码来源:SqlParser.cs

示例2: SetLinebreakAfter

            /// <summary>
            /// Controls the count of linebreaks after an item
            /// These linebreaks are permananet and cannot be deleted by clean-up operations
            /// It is allowed that i_Item may be null !
            /// </summary>
            public static void SetLinebreakAfter(ParseItem i_Item, int s32_Count)
            {
                if (i_Item == null || i_Item.Next == null) // Don't insert linebreaks after the last item
                    return;

                if (!i_Item.mi_Parser.mb_ModifyLineBR)
                    return;

                // Assure at least s32_Count Linebreaks which are permanent
                for (int i=0; i<s32_Count; i++)
                {
                    if (getType(i_Item.Next) != eType.LineBreak)
                        i_Item.InsertAfter(new ParseItem(i_Item.mi_Parser, "\n"));

                    i_Item = i_Item.Next;
                    i_Item.Permanent = true;
                }
            }
开发者ID:dstrucl,项目名称:Tangenta40,代码行数:23,代码来源:SqlParser.cs


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