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));
                }
            }
  • 相关阅读:
    tableView Crash
    字典
    图片轮播器
    第三方,解决模型无法在获取网络数据之后传值问题
    tableView创建方法调用的研究
    IOS常用CGRect的交错,边缘,中心的检测
    log4j日志目录不自动生成的问题
    tomcat 配置虚拟路径
    Linux系统下文件属性:drwxr-xr-x意思
    springmvc json转对象时日期转化
  • 原文地址:https://www.cnblogs.com/xjt927/p/2728726.html
Copyright © 2011-2022 走看看