fixed #600: Clean GIF cache file

This commit is contained in:
Jaex 2015-04-04 21:32:27 +03:00
parent 3e1eb560e8
commit e29bb9bf06
4 changed files with 24 additions and 2 deletions

View file

@ -915,6 +915,15 @@ internal class Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Capture rectangle region (Transparent).
/// </summary>
internal static string HotkeyType_RectangleTransparent {
get {
return ResourceManager.GetString("HotkeyType_RectangleTransparent", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Capture rounded rectangle region.
/// </summary>

View file

@ -631,4 +631,7 @@ Would you like to download and install it?</value>
<data name="HotkeyType_Automate" xml:space="preserve">
<value>Open/Stop Automate tool</value>
</data>
<data name="HotkeyType_RectangleTransparent" xml:space="preserve">
<value>Capture rectangle region (Transparent)</value>
</data>
</root>

View file

@ -192,7 +192,16 @@ private void timer_Tick(object sender, EventArgs e)
PreviousSelectionRectangle = SelectionRectangle;
SelectionRectangle = CaptureHelpers.CreateRectangle(positionOnClick.X, positionOnClick.Y, currentPosition.X, currentPosition.Y);
RefreshSurface();
try
{
RefreshSurface();
}
catch (Exception ex)
{
#if DEBUG
MessageBox.Show(ex.ToString());
#endif
}
}
private void RefreshSurface()

View file

@ -299,7 +299,8 @@ public void StartRecording(ScreenRecordOutput outputType, TaskSettings taskSetti
{
if (screenRecorder != null)
{
if (taskSettings.CaptureSettings.RunScreencastCLI && !string.IsNullOrEmpty(screenRecorder.CachePath) && File.Exists(screenRecorder.CachePath))
if ((outputType == ScreenRecordOutput.GIF || taskSettings.CaptureSettings.RunScreencastCLI) &&
!string.IsNullOrEmpty(screenRecorder.CachePath) && File.Exists(screenRecorder.CachePath))
{
File.Delete(screenRecorder.CachePath);
}