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(); }
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); } }
public void Set(ScintillaNET.Scintilla ed, ModificationEventArgs e) { Set(ed, e.Position, e.Text.Length ); }
public void OnTextDelete(object sender, ModificationEventArgs e) { if (!m_NLEvent.isEnable) { return; } }
private void NoteEdit_OnDelete(object sender, ModificationEventArgs e) { if (Settings.IsCustomLineNumbers() && e.LinesAdded != 0) { UpdateCustomLineNumbers(NoteEdit.LineFromPosition(e.Position)); } }
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)); } }
private void OnModified(ModificationEventArgs e) { if (!loading) { isDirty = true; Modified?.Invoke(this, e); } }
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); } }
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)); } }
public void OnModified(ModificationEventArgs e) { ModificationEventHandler temp = Modified; if (temp != null) { temp(this, e); } }
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; }
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(); } }
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()); }
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); // } //} }
// ОТСЛЕДИТЬ УДАЛЕНИЕ ПОМЕЧЕННОЙ СТРОКИ (УБРАТЬ ИЗ СПИСКА ПОМЕЧЕННЫХ) //------------------------------------------------------------------------------- // Отслеживание авто-ширины поля вывода номеров строк в зависимости от их кол-ва // (при удалении строки) //------------------------------------------------------------------------------- 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; //----------------------------------------------------------------- }
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); } }
/// <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()); }
private void SingularityScintilla_Delete(object sender, ModificationEventArgs e) { UpdateBoxDimensions(); }
private void CharDelete(object sender, ModificationEventArgs arg) { TryAutoComplete(); }
public NewLineEventArgs(ScintillaNET.Scintilla ed, ModificationEventArgs e, NewLine nl, int k) { kind = k; m_NL.Set(ed, e); }
private void item_Modified(object sender, ModificationEventArgs e) { isDirty = true; OnModified(ModificationEventArgs.Empty); }
private void ScintillaNet_Delete(object sender, ModificationEventArgs e) { ScriptHelpMgr.Instance.bCompileError = true; bNeedSaved = true; }
private void OnDelete(object sender, ModificationEventArgs e) { }
private void OnInsert(object sender, ModificationEventArgs e) { }
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); }
private void ReactionType_Modified(object sender, ModificationEventArgs e) { ModifiedAt = DateTime.Now; }