zoukankan      html  css  js  c++  java
  • C# text控件的使用 陀螺

     GoogleLog.SelectionStart = GoogleLog.TextLength;
     GoogleLog.ScrollToCaret();
     
     /// <summary>
            /// 把页面滚动条滚动到最后面
            /// </summary>
            public void WebFormScrollToEnd()
            {
                if (this.InvokeRequired)
                {
                    this.BeginInvoke(new DelegateManager.NoParameters(WebFormScrollToEnd));
                }
                else
                {
          
                    webForm.Document.Window.ScrollTo(100, 1000000);
                }
            }
     
    //清除text日志控件多余字符串
     public void WriteLog(string strLog)
            {
                if (this.InvokeRequired)//控件的 Handle 是在与调用线程不同的线程上创建的(说明您必须通过 Invoke 方法对控件进行调用),为 true;否则为 false。 
                {
                    this.BeginInvoke(new DelegateManager.OneStringParmenters(WriteLog), strLog);
                }
                else
                {
                    if (txtLog.Text.Length > 10000)
                    {
                        txtLog.Text = txtLog.Text.Substring(txtLog.TextLength - 10000);
                    }
                    txtLog.AppendText(string.Format("{0}:{1}\r\n", DateTime.Now.ToString("G"), strLog));
                }
            }
  • 相关阅读:
    南大《软件分析》课程笔记——Intermediate Representation
    leetcode刷题
    shiro550反序列化分析
    南大《软件分析》课程笔记——第一课
    再见2020
    S2-002漏洞分析
    编码&解码工具
    正码、反码和补码
    Java数据结构(二)
    Java数据集合
  • 原文地址:https://www.cnblogs.com/xjt927/p/2728726.html
Copyright © 2011-2022 走看看