Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c196a30fe0
|
@@ -49,14 +49,14 @@ namespace ScreenCaptureApp
|
|||||||
{
|
{
|
||||||
using (ResultForm resultForm = new ResultForm(captureForm.CapturedImage))
|
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())
|
using (SaveFileDialog sfd = new SaveFileDialog())
|
||||||
{
|
{
|
||||||
sfd.Title = "Сохранить скриншот";
|
sfd.Title = "Сохранить скриншот";
|
||||||
sfd.Filter = "PNG Image|*.png|JPEG Image|*.jpg|Bitmap Image|*.bmp";
|
sfd.Filter = "PNG Image|*.png|JPEG Image|*.jpg|Bitmap Image|*.bmp";
|
||||||
sfd.FileName = $"screenshot_{DateTime.Now:dd-MM-yyyy_HH.mm.ss}";
|
sfd.FileName = $"screenshot_{DateTime.Now:dd-MM-yyyy_HH.mm.ss}";
|
||||||
|
|
||||||
if (sfd.ShowDialog() == DialogResult.OK)
|
if (sfd.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
captureForm.CapturedImage.Save(sfd.FileName, GetImageFormat(sfd.FileName));
|
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
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user