63 lines
1.4 KiB
C#
63 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace cn.xinelu.MedicalCheckup.Client.Printer
|
|
{
|
|
public partial class frmMsg : Form
|
|
{
|
|
public frmMsg()
|
|
{
|
|
InitializeComponent();
|
|
OutPutString("开始下载……");
|
|
}
|
|
|
|
|
|
|
|
|
|
#region
|
|
public void OutPutString(string str)
|
|
{
|
|
if (this.InvokeRequired)
|
|
{
|
|
this.Invoke(new MethodInvoker(delegate
|
|
{
|
|
OutputX(str);
|
|
|
|
|
|
|
|
}));
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
OutputX(str);
|
|
}
|
|
Application.DoEvents();
|
|
}
|
|
|
|
void OutputX(string str)
|
|
{
|
|
this.richTextBox1.AppendText("- - - - - - - - - - - - - - - - -\r\n");
|
|
Application.DoEvents();
|
|
this.richTextBox1.AppendText(str + "\r\n");
|
|
Application.DoEvents();
|
|
this.richTextBox1.Select(richTextBox1.Text.Length, 0);
|
|
Application.DoEvents();
|
|
this.richTextBox1.ScrollToCaret();
|
|
Application.DoEvents();
|
|
|
|
if (richTextBox1.Text.Length > 10000)
|
|
richTextBox1.Clear();
|
|
Application.DoEvents();
|
|
}
|
|
#endregion
|
|
}
|
|
}
|