Update
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
@@ -49,14 +49,14 @@ namespace ScreenCaptureApp
|
||||
{
|
||||
using (ResultForm resultForm = new ResultForm(captureForm.CapturedImage))
|
||||
{
|
||||
if (resultForm.ShowDialog() == DialogResult.OK)
|
||||
DialogResult dlgResult = resultForm.ShowDialog();
|
||||
if (dlgResult == DialogResult.OK)
|
||||
{
|
||||
using (SaveFileDialog sfd = new SaveFileDialog())
|
||||
{
|
||||
sfd.Title = "Сохранить скриншот";
|
||||
sfd.Filter = "PNG Image|*.png|JPEG Image|*.jpg|Bitmap Image|*.bmp";
|
||||
sfd.FileName = $"screenshot_{DateTime.Now:dd-MM-yyyy_HH.mm.ss}";
|
||||
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
captureForm.CapturedImage.Save(sfd.FileName, GetImageFormat(sfd.FileName));
|
||||
@@ -64,7 +64,7 @@ namespace ScreenCaptureApp
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (resultForm.DialogResult == DialogResult.Yes)
|
||||
else if (dlgResult == DialogResult.Yes)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user