• 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));
                }
            }
  • 相关阅读:
    Solr服务在Linux上的搭建详细教程
    Linux服务器上安装JDK小白教程
    request和response中文乱码问题后台处理办法
    Redis的五种数据类型及方法
    Java类装载器ClassLoader
    Git快速入门和常用命令
    redis在Linux上的部署和jedis简单使用
    Linux常用基础命令
    JDK1.7中HashMap底层实现原理
    微信电脑版无法显示图片无法下载文件
  • 原文地址:https://www.cnblogs.com/xjt927/p/2728726.html
Copyright © 2020-2023  润新知