我正在使用以下代码。它仅在列表框中显示 HTML 文件我想在 OutPut 中将图 1、图 1.2、图 2、图 2.1 等等......替换为图 1......
请帮我
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
FileInfo file = new FileInfo(textBox1.Text);
StreamReader stRead = file.OpenText();
while (!stRead.EndOfStream)
{
listBox1.Items.Add(stRead.ReadLine());
}
}
}
输出
<html>
<head>
</head>
<body>
<div>
<p class="epigraph"> very Figure 1 But thanks to you, we won't do it </p>
<p class="epigraph-right"> birthday Figure 1.1 Milton Friedman, November 8, 2002</p>
<p class="indent">Not Figure 2 able to take it any longer New York </p>
<p class="indent">Mr. Cutler Figure 2.1 of the parallel plunges</p>
</body>
</div>
</html>