活动报名逻辑优化

This commit is contained in:
wule committed 2025-09-26 09:23:05 +08:00
1 parent d01d3bc306
commit 8fb90422a2
15 files changed
+1736 -291

No files matched your search

+23
View File
@@ -80,5 +80,28 @@ namespace TemuKJD.ToolForms
BaseMsgForm.ShowError("复制图片到剪贴板失败: " + ex.Message);
}
}
private void btnSave_Click(object sender, EventArgs e)
{
if(this.pictureBox1.Image == null)
{
BaseMsgForm.ShowError("图片为空!");
return;
}
string fileName = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".jpg";
if (!string.IsNullOrEmpty(this.pictureBox1.ImageLocation))
{
fileName = this.pictureBox1.ImageLocation.Replace("://",".").Replace('/', '.');
}
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "JPeg Image|*.jpg;*.jpeg";
sfd.Title = "保存图片";
sfd.FileName = fileName;
if ( sfd.ShowDialog() ==DialogResult.OK)
{
pictureBox1.Image.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}
}
}
}