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));
                }
            }
  • 相关阅读:
    MyBatis自带的逆向工程
    StringUtils.isNotEmpty和StringUtils.isNotBlank的区别
    JS根据身份证号码精确计算年龄和性别
    java根据生日精确计算年龄
    单列模式
    Java事务处理
    数据库连接池
    CRM(四川网脉系统)项目总结
    流的文件操作(File)
    Java的关键字与标识符
  • 原文地址:https://www.cnblogs.com/xjt927/p/2728726.html
Copyright © 2011-2022 走看看