Example #1
0
 protected virtual void TextBoxLineRemoved(object sender, LineRemovedEventArgs e)
 {
     for (var i = 0; i < Count; i++)
     {
         if (Items[i].LineIndex < e.Index)
         {
             continue;
         }
         if (Items[i].LineIndex >= e.Index + e.Count)
         {
             Items[i].LineIndex = Items[i].LineIndex - e.Count;
             continue;
         }
         var was = e.Index <= 0;
         foreach (var b in Items)
         {
             if (b.LineIndex == e.Index - 1)
             {
                 was = true;
             }
         }
         if (was)
         {
             Items.RemoveAt(i);
             i--;
         }
         else
         {
             Items[i].LineIndex = e.Index - 1;
         }
     }
 }
        void CSyntaxHighlighter_LineRemoved(object sender, LineRemovedEventArgs e)
        {
            if (oldLines != null && e.Index < (oldLines.Length - 1))
            {
                string lineText = oldLines[e.Index + 1];
                if (isLineDeclaration(lineText, this.Lines.ToArray(), e.Index + 1))
                {
                    List <AutocompleteItem> items = parseLine(lineText, e.Index + 1);
                    if (items != null)
                    {
                        foreach (AutocompleteItem item in items)
                        {
                            //Find item
                            for (int x = 0; x < AutoCompleteWords.Count; x++)
                            {
                                if (AutoCompleteWords[x].MenuText == item.MenuText && AutoCompleteWords[x].Text == item.Text)
                                {
                                    AutoCompleteWords.RemoveAt(x);
                                    x--;
                                }
                            }
                        }
                    }

                    SetAutoCompleteItems();
                }
            }

            oldLines = this.Lines.ToArray();
        }
 private void fctb_LineRemoved(object sender, LineRemovedEventArgs e)
 {
     //remove lines from bookmarks
     foreach (int id in e.RemovedLineUniqueIds)
     if(bookmarksLineId.Contains(id))
     {
         bookmarksLineId.Remove(id);
         bookmarks.Remove(id);
     }
 }
 private void fctb_LineRemoved(object sender, LineRemovedEventArgs e)
 {
     //remove lines from bookmarks
     foreach (int id in e.RemovedLineUniqueIds)
     {
         if (bookmarksLineId.Contains(id))
         {
             bookmarksLineId.Remove(id);
             bookmarks.Remove(id);
         }
     }
 }
Example #5
0
        private void tasText_LineRemoved(object sender, LineRemovedEventArgs e)
        {
            int count = e.Count;

            while (count-- > 0)
            {
                InputRecord input = Lines[e.Index];
                totalFrames -= input.Frames;
                Lines.RemoveAt(e.Index);
            }

            UpdateStatusBar();
        }
Example #6
0
        void tb_LineRemoved(object sender, LineRemovedEventArgs e)
        {
            TbInfo info = (sender as FastColoredTextBox).Tag as TbInfo;

            //remove lines from bookmarks
            foreach (int id in e.RemovedLineUniqueIds)
            {
                if (info.bookmarksLineId.Contains(id))
                {
                    info.bookmarksLineId.Remove(id);
                    info.bookmarks.Remove(id);
                }
            }
        }
Example #7
0
 private void uxEditor_LineRemoved(object sender, LineRemovedEventArgs 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)
     {
         int previousSpanStart = LineToPosition(e.Index), previousSpanEnd = LineToPosition(e.Index + e.Count);
         var ts = new TextSpan(previousSpanStart, previousSpanEnd - previousSpanStart);
         if (previousSpanStart < CurrentText.Length)
         {
             UpdateCurrentText(previousSpanStart, previousSpanEnd - previousSpanStart, "");
         }
     }
     PreviousLineLengths.RemoveRange(e.Index, e.Count);
 }
Example #8
0
        void manager_LineRemoved(object sender, LineRemovedEventArgs e)
        {
            foreach (TapiAddress ad in e.Line.Addresses)
            {
                LineControl lc = new LineControl();
                lc.directoryNumber       = ad.Address;
                lc.doNotDisturb          = false;
                lc.forward               = GetForward(ad);
                lc.mwiOn                 = false;
                lc.monitored             = "";
                lc.status                = Status.inactive;
                lc.lineControlConnection = null;
                ss.SetLineControl(lc);
            }

            log.Debug("Manager line removed: " + e.Line.ToString());
        }
Example #9
0
 protected virtual void tb_LineRemoved(object sender, LineRemovedEventArgs e)
 {
     for (int i = 0; i < Count; i++)
     {
         if (items[i].LineIndex >= e.Index)
         {
             if (items[i].LineIndex < e.Index + e.Count)
             {
                 items.RemoveAt(i);
                 i--;
             }
             else
             {
                 items[i].LineIndex = items[i].LineIndex - e.Count;
             }
         }
     }
 }
Example #10
0
        protected virtual void tb_LineRemoved(object sender, LineRemovedEventArgs e)
        {
            for (int i = 0; i < Count; i++)
            {
                if (items[i].LineIndex >= e.Index)
                {
                    if (items[i].LineIndex >= e.Index + e.Count)
                    {
                        items[i].LineIndex = items[i].LineIndex - e.Count;
                        continue;
                    }

                    var was = e.Index <= 0;
                    foreach (var b in items)
                    {
                        if (b.LineIndex == e.Index - 1)
                        {
                            was = true;
                        }
                    }

                    if (was)
                    {
                        items.RemoveAt(i);
                        i--;
                    }
                    else
                    {
                        items[i].LineIndex = e.Index - 1;
                    }

                    //if (items[i].LineIndex == e.Index + e.Count - 1)
                    //{
                    //    items[i].LineIndex = items[i].LineIndex - e.Count;
                    //    continue;
                    //}
                    //
                    //items.RemoveAt(i);
                    //i--;
                }
            }
        }
Example #11
0
 void manager_LineRemoved(object sender, LineRemovedEventArgs e)
 {
     log.Debug("Manager line removed: " + e.Line.ToString());
 }
Example #12
0
 private void Command_LineRemoved(object sender, LineRemovedEventArgs e)
 {
     this.ResizeAll();
 }
Example #13
0
 void manager_LineRemoved(object sender, LineRemovedEventArgs e)
 {
     foreach (TapiAddress ad in e.Line.Addresses)
     {
         LineControl lc = new LineControl();
         lc.directoryNumber = ad.Address;
         lc.doNotDisturb = false;
         lc.forward = GetForward(ad);
         lc.mwiOn = false;
         lc.monitored = "";
         lc.status = Status.inactive;
         lc.lineControlConnection = null;
         ss.SetLineControl(lc);
     }
     
     log.Debug("Manager line removed: " + e.Line.ToString());
 }
Example #14
0
 void manager_LineRemoved(object sender, LineRemovedEventArgs e)
 {
     log.Debug("Manager line removed: " + e.Line.ToString());
 }