-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
66 lines (63 loc) · 2.09 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Laurence
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void a01(object sender, EventArgs e)
{
OpenFileDialog b01 = new OpenFileDialog();
b01.InitialDirectory = Application.StartupPath;
b01.Title = "请选择要打开的文件";
b01.Filter = "(网页文件*.html)|*.html";
b01.FilterIndex = 1;
b01.Multiselect = true;
Class1 a001 = new Class1();
if (b01.ShowDialog() == DialogResult.OK)
{
string[] b02 = b01.FileNames;
for (int i = 0; i < b02.Length; i++)
{
if (textBox1.Text.Contains(b02[i]) != true)
{
textBox1.Text += b02[i] + System.Environment.NewLine;
a001.c02(b02[i]);
}
else
{
MessageBox.Show("文件名已存在,请确认文件或修改文件名!", "文件名已存在");
continue;
}
for (int i01 = 0; i01 < a001.c01.Count; i01++)
{
if (i01 != a001.c01.Count - 1)
{
textBox3.Text += a001.c01[i01] + System.Environment.NewLine;
}
else
{
textBox3.Text += a001.c01[i01];
}
}
}
}
}
private void a02(object sender, EventArgs e)
{
Clipboard.SetDataObject(textBox3.Text, true);
MessageBox.Show("图片链接复制完成,感谢您的使用!", "操作成功");
}
}
}