Exemplo n.º 1
0
        void _editor_Insert(object sender, ModificationEventArgs e)
        {
            var maxLineNumberCharLength = _editor.Lines.Count.ToString().Length;

            _editor.Margins[0].Width             = _editor.TextWidth(Style.LineNumber, new string('9', maxLineNumberCharLength + 1)) + 2;
            _editor.Lines[e.Position].MarginText = _editor.LineFromPosition(e.Position).ToString();
        }
Exemplo n.º 2
0
        private void delete(object sender, ModificationEventArgs e)
        {
            if (e.LinesAdded != 0)
            {
                updateLineNumbers(LineFromPosition(e.Position));
            }
            int    deltaLines = curLinesLen - Lines.Count;
            int    lind       = LineFromPosition(e.Position);
            Line   curL       = Lines[lind];
            string line       = curL.Text;
            int    lineInd    = curL.Position;
            int    linel;
            int    lineN = LineFromPosition(lineInd);

            code.ClearFlags();
            code.DeleteLinesAt(lineN, deltaLines);

            highlightLine(line, lind);

            List <int> anLines = code.EndAnalysis();

            foreach (int tl in anLines)
            {
                curL    = Lines[tl];
                line    = curL.Text;
                lineInd = curL.Position;
                linel   = line.Length;
                highlightLine(line, tl);
            }
        }
Exemplo n.º 3
0
 public void Set(ScintillaNET.Scintilla ed, ModificationEventArgs e)
 {
     Set(ed,
         e.Position,
         e.Text.Length
         );
 }
Exemplo n.º 4
0
 public void OnTextDelete(object sender, ModificationEventArgs e)
 {
     if (!m_NLEvent.isEnable)
     {
         return;
     }
 }
Exemplo n.º 5
0
 private void NoteEdit_OnDelete(object sender, ModificationEventArgs e)
 {
     if (Settings.IsCustomLineNumbers() && e.LinesAdded != 0)
     {
         UpdateCustomLineNumbers(NoteEdit.LineFromPosition(e.Position));
     }
 }
Exemplo n.º 6
0
 private void CodeEditOnChange(object sender, ModificationEventArgs e)
 {
     // Only update line numbers if the number of lines changed
     if (e.LinesAdded != 0)
     {
         UpdateLineNumbers(codeEdit.LineFromPosition(e.Position));
     }
 }
Exemplo n.º 7
0
 private void OnModified(ModificationEventArgs e)
 {
     if (!loading)
     {
         isDirty = true;
         Modified?.Invoke(this, e);
     }
 }
Exemplo n.º 8
0
 private void scintilla_Delete(object sender, ModificationEventArgs e)
 {
     // Only update line numbers if the number of lines changed
     if (e.LinesAdded != 0)
     {
         UpdateLineNumbers(0, sequenceEditor.Lines.Count);
     }
 }
Exemplo n.º 9
0
 private void scintilla1_Delete(object sender, ModificationEventArgs e)
 {
     // Only update line numbers if the number of lines changed
     if (e.LinesAdded != 0)
     {
         UpdateLineNumbers(scintilla1.LineFromPosition(e.Position));
     }
 }
Exemplo n.º 10
0
        public void OnModified(ModificationEventArgs e)
        {
            ModificationEventHandler temp = Modified;

            if (temp != null)
            {
                temp(this, e);
            }
        }
Exemplo n.º 11
0
 protected override void OnInsert(ModificationEventArgs e)
 {
     // Only update line numbers if the number of lines changed
     //if (e.LinesAdded != 0)                UpdateLineNumbers(LineFromPosition(e.Position));
     base.OnInsert(e);
     //Focus();
     //HighlightWord(e.Text);
     //SelectionStart = CurrentPosition + e.Text.Length;
 }
Exemplo n.º 12
0
 private void ScintillaCode_Delete(object sender, ModificationEventArgs e)
 {
     if (e.LinesAdded < 0)
     {
         Line b = scintillaCode.Lines[scintillaCode.LineFromPosition(e.Position)];
         b.MarkerDelete(BOOKMARK_MARKER);
         RefreshBookMarkList();
     }
 }
Exemplo n.º 13
0
        public void OnTextInserted(object sender, ModificationEventArgs e)
        {
            Scintilla ed = (Scintilla)sender;

            if (isFileLoading || e.LinesAdded == 0 || !m_NLEvent.isEnable)
            {
                return;
            }
            NewLineEventArgs nlE = new NewLineEventArgs(ed, e, m_NLEvent, NewLineEventArgs.INSERT);

            this.NewLineChanged(ed, nlE);
            UtilMarker.DeletRightMarginMarker(ed);
            this.SideMarginPaint(ed, new EventArgs());
        }
Exemplo n.º 14
0
 private void ExScintilla_Delete(object sender, ModificationEventArgs e)
 {
     //if (this.FCompletionForm != null)
     //{
     //    if (e.Text.Contains('.') || e.Text.Contains("(") || e.Text.Contains(")") || this.CurrentPosition < this.CompletionPosition)
     //    {
     //        this.HideCompletions();
     //    }
     //    else
     //    {
     //        this.SetFilter(0);
     //    }
     //}
 }
Exemplo n.º 15
0
        // ОТСЛЕДИТЬ УДАЛЕНИЕ ПОМЕЧЕННОЙ СТРОКИ	(УБРАТЬ	ИЗ СПИСКА ПОМЕЧЕННЫХ)
        //-------------------------------------------------------------------------------
        // Отслеживание	авто-ширины	поля вывода	номеров	строк в	зависимости	от их кол-ва
        // (при	удалении строки)
        //-------------------------------------------------------------------------------
        private void scintilla1_Delete(object sender, ModificationEventArgs e)
        {
            //-----	расчёт ширины поля от макс.	номера строки -----------------

            // Did the number of characters	in the line	number display change?
            var maxLinesCharLength = scintilla1.Lines.Count.ToString().Length;

            if (maxLinesCharLength == this.maxLineNumberCharLength)
            {
                return;
            }

            // Calculate the width required	to display the last	line number	and	include	some padding for good measure.
            const int padding = 2;                                                                                                                                                              // доп.	отступ

            // Margins[x] =	это	индекс поля	вывода номеров строк
            scintilla1.Margins[NUMBER_MARGIN].Width = scintilla1.TextWidth(Style.LineNumber, new string('9', maxLinesCharLength + 1)) + padding;

            this.maxLineNumberCharLength = maxLinesCharLength;
            //-----------------------------------------------------------------
        }
Exemplo n.º 16
0
        private void insert(object sender, ModificationEventArgs e)
        {
            if (e.LinesAdded != 0)
            {
                updateLineNumbers(LineFromPosition(e.Position));
            }
            string[] newLines = e.Text.Replace("\r", "").Split('\n');
            int      linePos  = LineFromPosition(e.Position);


            int endL = Lines.Count - 1;

            if (endL < 0)
            {
                return;
            }

            Line   curL;
            string line;

            for (int i = linePos; i < linePos + newLines.Length; i++)
            {
                curL = Lines[i];
                line = curL.Text;
                highlightLine(line, i);
            }

            List <int> anLines = code.EndAnalysis();

            foreach (int tl in anLines)
            {
                curL = Lines[tl];
                line = curL.Text;
                highlightLine(line, tl);
            }
        }
Exemplo n.º 17
0
 /// <summary>
 /// Event handler event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public static void CollectionModifiedEvent(object sender, ModificationEventArgs e)
 {
     Console.WriteLine("MODIFICATION ATTEMPTED: " + e.ModificationEventStatus.ToString());
 }   
Exemplo n.º 18
0
 private void SingularityScintilla_Delete(object sender, ModificationEventArgs e)
 {
     UpdateBoxDimensions();
 }
Exemplo n.º 19
0
 private void CharDelete(object sender, ModificationEventArgs arg)
 {
     TryAutoComplete();
 }
Exemplo n.º 20
0
 public NewLineEventArgs(ScintillaNET.Scintilla ed, ModificationEventArgs e, NewLine nl, int k)
 {
     kind = k;
     m_NL.Set(ed, e);
 }
Exemplo n.º 21
0
 private void item_Modified(object sender, ModificationEventArgs e)
 {
     isDirty = true;
     OnModified(ModificationEventArgs.Empty);
 }
Exemplo n.º 22
0
 private void ScintillaNet_Delete(object sender, ModificationEventArgs e)
 {
     ScriptHelpMgr.Instance.bCompileError = true;
     bNeedSaved = true;
 }
Exemplo n.º 23
0
 private void OnDelete(object sender, ModificationEventArgs e)
 {
 }
Exemplo n.º 24
0
 private void OnInsert(object sender, ModificationEventArgs e)
 {
 }
Exemplo n.º 25
0
 protected override void OnInsert(ModificationEventArgs e)
 {
     // Only update line numbers if the number of lines changed
     //if (e.LinesAdded != 0) UpdateLineNumbers(LineFromPosition(e.Position));
     base.OnInsert(e);
 }
Exemplo n.º 26
0
 private void ReactionType_Modified(object sender, ModificationEventArgs e)
 {
     ModifiedAt = DateTime.Now;
 }