-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainForm.Designer.cs
184 lines (176 loc) · 6.72 KB
/
MainForm.Designer.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
using System.Text;
using System.Windows.Forms;
namespace WinRAR垃圾清理
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
///
private void copyButton_Click(object sender, EventArgs e)
{
// 检查是否有选定的项
if (resultListBox.SelectedItems.Count > 0)
{
// 创建一个 StringBuilder 来存储选定项的文本
StringBuilder sb = new StringBuilder();
// 遍历选定的每一项,并将其文本添加到 StringBuilder 中
foreach (var selectedItem in resultListBox.SelectedItems)
{
sb.AppendLine(selectedItem.ToString());
}
// 将 StringBuilder 的内容复制到剪贴板
Clipboard.SetText(sb.ToString());
MessageBox.Show("复制成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("什么也没选择。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
startButton = new Button();
cancelButton = new Button();
statusLabel = new Label();
driveListBox = new CheckedListBox();
selectAllButton = new Button();
deselectAllButton = new Button();
deleteFoldersCheckBox = new CheckBox();
resultListBox = new ListBox();
copyButton = new Button();
notifyIcon1 = new NotifyIcon(components);
label1 = new Label();
about = new Button();
SuspendLayout();
//
// startButton
//
resources.ApplyResources(startButton, "startButton");
startButton.Name = "startButton";
startButton.UseVisualStyleBackColor = true;
startButton.Click += startButton_Click;
//
// cancelButton
//
resources.ApplyResources(cancelButton, "cancelButton");
cancelButton.Name = "cancelButton";
cancelButton.UseVisualStyleBackColor = true;
cancelButton.Click += cancelButton_Click;
//
// statusLabel
//
resources.ApplyResources(statusLabel, "statusLabel");
statusLabel.Name = "statusLabel";
//
// driveListBox
//
resources.ApplyResources(driveListBox, "driveListBox");
driveListBox.BorderStyle = BorderStyle.FixedSingle;
driveListBox.FormattingEnabled = true;
driveListBox.Name = "driveListBox";
//
// selectAllButton
//
resources.ApplyResources(selectAllButton, "selectAllButton");
selectAllButton.Name = "selectAllButton";
selectAllButton.UseVisualStyleBackColor = true;
//
// deselectAllButton
//
resources.ApplyResources(deselectAllButton, "deselectAllButton");
deselectAllButton.Name = "deselectAllButton";
deselectAllButton.UseVisualStyleBackColor = true;
//
// deleteFoldersCheckBox
//
resources.ApplyResources(deleteFoldersCheckBox, "deleteFoldersCheckBox");
deleteFoldersCheckBox.Name = "deleteFoldersCheckBox";
deleteFoldersCheckBox.UseVisualStyleBackColor = true;
//
// resultListBox
//
resources.ApplyResources(resultListBox, "resultListBox");
resultListBox.BorderStyle = BorderStyle.FixedSingle;
resultListBox.FormattingEnabled = true;
resultListBox.Name = "resultListBox";
resultListBox.SelectionMode = SelectionMode.MultiExtended;
//
// copyButton
//
resources.ApplyResources(copyButton, "copyButton");
copyButton.Name = "copyButton";
copyButton.UseVisualStyleBackColor = true;
copyButton.Click += copyButton_Click;
//
// notifyIcon1
//
resources.ApplyResources(notifyIcon1, "notifyIcon1");
//
// label1
//
resources.ApplyResources(label1, "label1");
label1.Name = "label1";
//
// about
//
resources.ApplyResources(about, "about");
about.Name = "about";
about.UseVisualStyleBackColor = true;
//
// MainForm
//
resources.ApplyResources(this, "$this");
AutoScaleMode = AutoScaleMode.Font;
Controls.Add(about);
Controls.Add(label1);
Controls.Add(copyButton);
Controls.Add(resultListBox);
Controls.Add(deleteFoldersCheckBox);
Controls.Add(deselectAllButton);
Controls.Add(selectAllButton);
Controls.Add(driveListBox);
Controls.Add(statusLabel);
Controls.Add(cancelButton);
Controls.Add(startButton);
Name = "MainForm";
Load += MainForm_Load;
ResumeLayout(false);
PerformLayout();
}
#endregion
private Button startButton;
private Button cancelButton;
private Label statusLabel;
private CheckedListBox driveListBox;
private Button selectAllButton;
private Button deselectAllButton;
private CheckBox deleteFoldersCheckBox;
public ListBox resultListBox;
private Button copyButton;
public NotifyIcon notifyIcon1;
private Label label1;
private Button about;
}
}