mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 21:20:28 +12:00
fixed #272: Error handling for stopping FTP uploads
This commit is contained in:
parent
248f4221e2
commit
f469e0cc87
|
@ -140,7 +140,7 @@ public override void Prepare()
|
|||
|
||||
TaskEx.Run(() =>
|
||||
{
|
||||
WindowsListAdvanced wla = new WindowsListAdvanced();
|
||||
WindowsRectangleList wla = new WindowsRectangleList();
|
||||
wla.IgnoreHandle = handle;
|
||||
wla.IncludeChildWindows = AreaManager.IncludeControls;
|
||||
AreaManager.Windows = wla.GetWindowsRectangleList();
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
<Compile Include="Screenshot_Transparent.cs" />
|
||||
<Compile Include="WindowInfo.cs" />
|
||||
<Compile Include="WindowsList.cs" />
|
||||
<Compile Include="WindowsListAdvanced.cs" />
|
||||
<Compile Include="WindowsRectangleList.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\HelpersLib\HelpersLib.csproj">
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
namespace ScreenCaptureLib
|
||||
{
|
||||
public class WindowsListAdvanced
|
||||
public class WindowsRectangleList
|
||||
{
|
||||
public IntPtr IgnoreHandle { get; set; }
|
||||
public bool IncludeChildWindows { get; set; }
|
|
@ -138,7 +138,15 @@ public override void StopUpload()
|
|||
if (IsUploading && !StopUploadRequested)
|
||||
{
|
||||
StopUploadRequested = true;
|
||||
Disconnect();
|
||||
|
||||
try
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugHelper.WriteException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,15 @@ public override void StopUpload()
|
|||
if (IsUploading && !StopUploadRequested)
|
||||
{
|
||||
StopUploadRequested = true;
|
||||
Disconnect();
|
||||
|
||||
try
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugHelper.WriteException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue