简化应用:只保留窗口图标,内容改为HelloWorld
- 移除按钮图标,只保留窗体图标显示 - 将功能内容简化为HelloWorld消息 - 保留完整的模板结构供后续开发 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d390e29524
commit
b93b8f7432
34
WinFormsApp1/Form1.Designer.cs
generated
34
WinFormsApp1/Form1.Designer.cs
generated
@ -73,25 +73,10 @@ namespace WinFormsAppTemplate
|
|||||||
txtSourcePath.Location = new Point(45, 22);
|
txtSourcePath.Location = new Point(45, 22);
|
||||||
txtSourcePath.Size = new Size(470, 23);
|
txtSourcePath.Size = new Size(470, 23);
|
||||||
|
|
||||||
btnBrowseSource.Text = "";
|
btnBrowseSource.Text = "浏览";
|
||||||
btnBrowseSource.Location = new Point(520, 20);
|
btnBrowseSource.Location = new Point(520, 20);
|
||||||
btnBrowseSource.Size = new Size(50, 25);
|
btnBrowseSource.Size = new Size(50, 25);
|
||||||
btnBrowseSource.Click += new EventHandler(btnBrowseSource_Click);
|
btnBrowseSource.Click += new EventHandler(btnBrowseSource_Click);
|
||||||
// 设置浏览按钮图标
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var stream = GetType().Assembly.GetManifestResourceStream("WinFormsAppTemplate.app.ico");
|
|
||||||
if (stream != null)
|
|
||||||
{
|
|
||||||
btnBrowseSource.Image = Image.FromStream(stream);
|
|
||||||
btnBrowseSource.ImageAlign = ContentAlignment.MiddleCenter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// 如果图标加载失败,显示文字
|
|
||||||
btnBrowseSource.Text = "浏览";
|
|
||||||
}
|
|
||||||
|
|
||||||
grpSourceFolder.Controls.Add(lblSourcePath);
|
grpSourceFolder.Controls.Add(lblSourcePath);
|
||||||
grpSourceFolder.Controls.Add(txtSourcePath);
|
grpSourceFolder.Controls.Add(txtSourcePath);
|
||||||
@ -110,25 +95,10 @@ namespace WinFormsAppTemplate
|
|||||||
txtOutputPath.Location = new Point(45, 22);
|
txtOutputPath.Location = new Point(45, 22);
|
||||||
txtOutputPath.Size = new Size(470, 23);
|
txtOutputPath.Size = new Size(470, 23);
|
||||||
|
|
||||||
btnBrowseOutput.Text = "";
|
btnBrowseOutput.Text = "浏览";
|
||||||
btnBrowseOutput.Location = new Point(520, 20);
|
btnBrowseOutput.Location = new Point(520, 20);
|
||||||
btnBrowseOutput.Size = new Size(50, 25);
|
btnBrowseOutput.Size = new Size(50, 25);
|
||||||
btnBrowseOutput.Click += new EventHandler(btnBrowseOutput_Click);
|
btnBrowseOutput.Click += new EventHandler(btnBrowseOutput_Click);
|
||||||
// 设置浏览按钮图标
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var stream = GetType().Assembly.GetManifestResourceStream("WinFormsAppTemplate.app.ico");
|
|
||||||
if (stream != null)
|
|
||||||
{
|
|
||||||
btnBrowseOutput.Image = Image.FromStream(stream);
|
|
||||||
btnBrowseOutput.ImageAlign = ContentAlignment.MiddleCenter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// 如果图标加载失败,显示文字
|
|
||||||
btnBrowseOutput.Text = "浏览";
|
|
||||||
}
|
|
||||||
|
|
||||||
grpOutputFolder.Controls.Add(lblOutputPath);
|
grpOutputFolder.Controls.Add(lblOutputPath);
|
||||||
grpOutputFolder.Controls.Add(txtOutputPath);
|
grpOutputFolder.Controls.Add(txtOutputPath);
|
||||||
|
|||||||
@ -67,8 +67,8 @@ namespace WinFormsAppTemplate
|
|||||||
|
|
||||||
private void btnMerge_Click(object sender, EventArgs e)
|
private void btnMerge_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
MessageBox.Show("这是一个模板项目\n\n功能:\n• 单exe打包\n• 应用图标配置\n• UI按钮图标\n• 环境检测\n\n请在此基础上开发你的具体功能", "模板项目", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("HelloWorld", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
Log("模板功能演示");
|
Log("HelloWorld");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Log(string msg)
|
private void Log(string msg)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user