示例#1
0
文件: Form1.cs 项目: ryu-s/MyTextbox
 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();
 }
示例#2
0
        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;
        }
示例#3
0
        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;
        }