private void myTextbox1_MyTextboxInfoEvent(object sender, MyTextboxInfoEventArgs e) { string s = string.Format( "nPhysicalLine={0}\nPhysicalPos={1}\n" +"nLogicalLine={2}\nnLogicalPos={3}\n" +"CurrentLineLength={4}\nvScrollValue={5}\n" +"clientsize Height={6}, Width={7}\n" +"ShowFirstLine={8}\n" +"ShowLastLine{9}\n", e.nPhysicalLine, e.nPhysicalPos, e.nLogicalLine,e.nLogicalPos,e.CurrentLineLength, e.vScrollValue,e.clinetSize.Height,e.clinetSize.Width, e.ShowFirstLine,e.ShowLastLine); label3.Text = s; Invalidate(); }
private MyTextboxInfoEventArgs SetInfoEventArgs() { MyTextboxInfoEventArgs args = null; try { args = new MyTextboxInfoEventArgs(); args.nPhysicalLine = CurrentPhysicalPosition.Line; args.nPhysicalPos = CurrentPhysicalPosition.Pos; args.nLogicalLine = CurrentLogicalPosition.Line; args.nLogicalPos = CurrentLogicalPosition.Pos; args.CurrentLineLength = CurrentPhysicalLine.Length; args.vScrollValue = vScrollBar.Value; args.clinetSize = this.ClientSize; args.ShowFirstLine = GetShowFirstLine(); args.ShowLastLine = GetShowLastLine(); } catch(Exception) { } return args; }
private MyTextboxInfoEventArgs SetInfoEventArgs() { MyTextboxInfoEventArgs args = null; try { args = new MyTextboxInfoEventArgs(); args.nLine = CurrentPos.Line; args.nPos = CurrentPos.Pos; args.CurrentLineLength = list[CurrentPos.Line].Length; } catch(Exception) { } return args; }