Example #1
0
        public static void 追加日志(string txt)
        {
//			Txthelper tx = new Txthelper();
            Txthelper.WriteLine(Directory.GetCurrentDirectory() + "\\Log\\project"
                                + DateTime.Now.ToString("yyyyMM", CultureInfo.InvariantCulture) + ".log",
                                DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) + " " + txt);
        }
Example #2
0
        public async void TextShow(String tmpPath)
        {
            string str = "";
            Task   t   = Task.Run(() => { str = Txthelper.ReadFile(tmpPath); });
            await  t;

            this.textBox1.Text           = str;
            this.textBox1.SelectionStart = this.textBox1.Text.Length;
            this.textBox1.ScrollToCaret();
            this.textBox1.ReadOnly = true;
        }
Example #3
0
        public void TextShow1(String tmpPath)
        {
            string str = "";

//          Task t=Task.Run(() => {str= Txthelper.ReadFile1(tmpPath);
//            } );
            str = Txthelper.ReadFile1(tmpPath);
//            await t;
            ShowLog(str);
//            this.Invoke(new Action(() =>
//						                {
//						                this.textBox1.Text = str;
//						                this.textBox1.SelectionStart = this.textBox1.Text.Length;
//						                this.textBox1.ScrollToCaret();
//						                this.textBox1.ReadOnly = true;
//						                }
//				                       ));
        }
Example #4
0
        /// <summary>
        /// 保存Config
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ToolStripMenuItem13Click(object sender, EventArgs e)
        {
            Txthelper.Write(path1, textBox1.Text);
            MessageBox.Show("保存成功");
//			ZhiLian.XmlFactoryCreatefile();
        }
Example #5
0
        public static void 追加日志(string fileName, string txt)
        {
//            Txthelper tx = new Txthelper();
            Txthelper.WriteLine(fileName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) + " " + txt);
        }