コード例 #1
0
ファイル: Bookmarks.cs プロジェクト: oxysoft/PokeSharp
 protected virtual void tb_LineInserted(object sender, LineInsertedEventArgs e)
 {
     for (int i = 0; i < Count; i++)
     {
         if (items[i].LineIndex >= e.Index)
         {
             items[i].LineIndex = items[i].LineIndex + e.Count;
         }
     }
 }
コード例 #2
0
ファイル: Studio.cs プロジェクト: ShootMe/SplasherTAS
        private void tasText_LineInserted(object sender, LineInsertedEventArgs e)
        {
            RichText tas   = (RichText)sender;
            int      count = e.Count;

            while (count-- > 0)
            {
                InputRecord input = new InputRecord(tas.GetLineText(e.Index + count));
                Lines.Insert(e.Index, input);
                totalFrames += input.Frames;
            }

            UpdateStatusBar();
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: ljw1004/FastColoredTextBox
 private void uxEditor_LineInserted(object sender, LineInsertedEventArgs e)
 {
     // This event is used to keep Roslyn text in 1:1 sync with FastColoredTextBox text. See comment at top of file.
     StartRecolorize(false);
     if (CurrentText != null)
     {
         var sb = new StringBuilder(); for (int i = 0; i < e.Count; i++)
         {
             sb.AppendLine();
         }
         int previousSpanStart = e.Index >= PreviousLineLengths.Count ? CurrentText.Length : LineToPosition(e.Index);
         UpdateCurrentText(previousSpanStart, 0, sb.ToString());
     }
     PreviousLineLengths.InsertRange(e.Index, Enumerable.Repeat(0, e.Count));
 }
コード例 #4
0
ファイル: Bookmarks.cs プロジェクト: TheAstro30/CodePad
 protected virtual void TextBoxLineInserted(object sender, LineInsertedEventArgs e)
 {
     for (var i = 0; i < Count; i++)
     {
         if (Items[i].LineIndex >= e.Index)
         {
             Items[i].LineIndex = Items[i].LineIndex + e.Count;
         }
         else if (Items[i].LineIndex == e.Index - 1 && e.Count == 1)
         {
             if (TextBox[e.Index - 1].StartSpacesCount == TextBox[e.Index - 1].Count)
             {
                 Items[i].LineIndex = Items[i].LineIndex + e.Count;
             }
         }
     }
 }
コード例 #5
0
 protected virtual void tb_LineInserted(object sender, LineInsertedEventArgs e)
 {
     for (int i = 0; i < Count; i++)
     {
         if (items[i].LineIndex >= e.Index)
         {
             items[i].LineIndex = items[i].LineIndex + e.Count;
         }
         else if (items[i].LineIndex == e.Index - 1 && e.Count == 1)
         {
             if (tb[e.Index - 1].StartSpacesCount == tb[e.Index - 1].Count)
             {
                 items[i].LineIndex = items[i].LineIndex + e.Count;
             }
         }
     }
 }
コード例 #6
0
        void CSyntaxHighlighter_LineInserted(object sender, LineInsertedEventArgs e)
        {
            Thread searchThread = new Thread(() => CSyntaxHighlighter_LineInserted_Threaded(new object[] { this, e.Index }));

            searchThread.IsBackground = true;

            if (e.Index > 0)
            {
                string lineText = this.GetLine(e.Index - 1).Text;

                if (lineText.ToLower().StartsWith("#include ")) //process include, might take awhile so using spearate thread
                {
                    searchThread.Start();
                }

                if (oldLines != null)
                {
                    return;
                }

                if (isLineDeclaration(lineText, this.Lines.ToArray(), e.Index - 1))
                {
                    List <AutocompleteItem> items = parseLine(lineText, e.Index, new System.IO.FileInfo(this.Name).Name);
                    if (items != null)
                    {
                        foreach (AutocompleteItem item in items)
                        {
                            for (int a = 0; a < AutoCompleteWords.Count; a++)
                            {
                                if (AutoCompleteWords[a].Text == item.Text)
                                {
                                    goto skip;
                                }
                            }

                            AutoCompleteWords.Add(item);
                            skip :;
                        }
                    }
                }

                SetAutoCompleteItems();
            }
        }
コード例 #7
0
ファイル: WorksheetEntry.cs プロジェクト: xyuan/BoSSS
 private void Command_LineInserted(object sender, LineInsertedEventArgs e)
 {
     this.ResizeAll();
 }