Code improvements for screen recording

This commit is contained in:
Jaex 2014-05-07 00:06:26 +03:00
parent bbef197f09
commit 5c3042935b
14 changed files with 144 additions and 219 deletions

View file

@ -225,7 +225,7 @@ public enum ScreenRecordOutput
{ {
[Description("Animated GIF")] [Description("Animated GIF")]
GIF, GIF,
[Description("Video for Windows (VfW)")] [Description("AVI")]
AVI, AVI,
[Description("FFmpeg")] [Description("FFmpeg")]
FFmpeg, FFmpeg,

View file

@ -38,55 +38,13 @@ public class AVICache : ImageCache
public AVICache(AVIOptions options) public AVICache(AVIOptions options)
{ {
Options = options; Options = options;
Helpers.CreateDirectoryIfNotExist(Options.OutputPath); Helpers.CreateDirectoryIfNotExist(Options.OutputPath);
aviWriter = new AVIWriter(Options); aviWriter = new AVIWriter(Options);
imageQueue = new BlockingCollection<Image>();
} }
protected override void StartConsumerThread() protected override void WriteFrame(Image img)
{ {
if (!IsWorking)
{
IsWorking = true;
task = TaskEx.Run(() =>
{
try
{
position = 0;
while (!imageQueue.IsCompleted)
{
Image img = null;
try
{
img = imageQueue.Take();
if (img != null)
{
//using (new DebugTimer("Frame saved"))
aviWriter.AddFrame((Bitmap)img); aviWriter.AddFrame((Bitmap)img);
position++;
}
}
catch (InvalidOperationException)
{
}
finally
{
if (img != null) img.Dispose();
}
}
}
finally
{
IsWorking = false;
}
});
}
} }
public override void Dispose() public override void Dispose()

View file

@ -39,69 +39,21 @@ namespace ScreenCaptureLib
{ {
public class FFmpegCache : ImageCache public class FFmpegCache : ImageCache
{ {
private VideoFileWriter ffmpegWriter; private static readonly string[] ffmpegFiles = new string[] { "avcodec-53.dll", "avdevice-53.dll", "avfilter-2.dll", "avformat-53.dll", "avutil-51.dll", "swresample-0.dll", "swscale-2.dll" };
private static readonly string[] ffMpegFiles = new string[] { "avcodec-53.dll", private VideoFileWriter ffmpegWriter;
"avdevice-53.dll",
"avfilter-2.dll",
"avformat-53.dll",
"avutil-51.dll",
"swresample-0.dll",
"swscale-2.dll" };
public FFmpegCache(AVIOptions options) public FFmpegCache(AVIOptions options)
{ {
Options = options; Options = options;
Helpers.CreateDirectoryIfNotExist(Options.OutputPath); Helpers.CreateDirectoryIfNotExist(Options.OutputPath);
ffmpegWriter = new VideoFileWriter(); ffmpegWriter = new VideoFileWriter();
ffmpegWriter.Open(options.OutputPath, options.Size.Width, options.Size.Height, options.FPS, AForge.Video.FFMPEG.VideoCodec.MPEG4); ffmpegWriter.Open(options.OutputPath, options.Size.Width, options.Size.Height, options.FPS, AForge.Video.FFMPEG.VideoCodec.MPEG4);
imageQueue = new BlockingCollection<Image>();
} }
protected override void StartConsumerThread() protected override void WriteFrame(Image img)
{ {
if (!IsWorking)
{
IsWorking = true;
task = TaskEx.Run(() =>
{
try
{
position = 0;
while (!imageQueue.IsCompleted)
{
Image img = null;
try
{
img = imageQueue.Take();
if (img != null)
{
//using (new DebugTimer("Frame saved"))
ffmpegWriter.WriteVideoFrame((Bitmap)img); ffmpegWriter.WriteVideoFrame((Bitmap)img);
position++;
}
}
catch (InvalidOperationException)
{
}
finally
{
if (img != null) img.Dispose();
}
}
}
finally
{
IsWorking = false;
}
});
}
} }
public override void Dispose() public override void Dispose()
@ -111,23 +63,12 @@ public override void Dispose()
ffmpegWriter.Dispose(); ffmpegWriter.Dispose();
} }
if (imageQueue != null) base.Dispose();
{
imageQueue.Dispose();
}
} }
public static bool HasDependencies() public static bool HasDependencies()
{ {
foreach (string fn in ffMpegFiles) return ffmpegFiles.Select(x => Path.Combine(Application.StartupPath, x)).All(x => File.Exists(x));
{
string fp = Path.Combine(Application.StartupPath, fn);
if (!File.Exists(fp))
{
return false;
}
}
return true;
} }
} }
} }

View file

@ -49,37 +49,18 @@ public int Count
} }
} }
private FileStream fsCache;
private List<LocationInfo> indexList; private List<LocationInfo> indexList;
public HardDiskCache(AVIOptions options) public HardDiskCache(AVIOptions options)
{ {
Options = options; Options = options;
Helpers.CreateDirectoryIfNotExist(Options.OutputPath);
fsCache = new FileStream(Options.OutputPath, FileMode.Create, FileAccess.Write, FileShare.Read);
indexList = new List<LocationInfo>(); indexList = new List<LocationInfo>();
imageQueue = new BlockingCollection<Image>();
StartConsumerThread();
} }
protected override void StartConsumerThread() protected override void WriteFrame(Image img)
{
if (!IsWorking)
{
IsWorking = true;
task = TaskEx.Run(() =>
{
Helpers.CreateDirectoryIfNotExist(Options.OutputPath);
using (FileStream fsCache = new FileStream(Options.OutputPath, FileMode.Create, FileAccess.Write, FileShare.Read))
{
while (!imageQueue.IsCompleted)
{
Image img = null;
try
{
img = imageQueue.Take();
if (img != null)
{ {
using (MemoryStream ms = new MemoryStream()) using (MemoryStream ms = new MemoryStream())
{ {
@ -89,20 +70,15 @@ protected override void StartConsumerThread()
indexList.Add(new LocationInfo(position, fsCache.Length - position)); indexList.Add(new LocationInfo(position, fsCache.Length - position));
} }
} }
}
catch (InvalidOperationException) public override void Dispose()
{ {
} if (fsCache != null)
finally
{ {
if (img != null) img.Dispose(); fsCache.Dispose();
}
}
} }
IsWorking = false; base.Dispose();
});
}
} }
public IEnumerable<Image> GetImageEnumerator() public IEnumerable<Image> GetImageEnumerator()

View file

@ -41,7 +41,11 @@ public abstract class ImageCache : IDisposable
protected Task task; protected Task task;
protected BlockingCollection<Image> imageQueue; protected BlockingCollection<Image> imageQueue;
protected int position;
public ImageCache()
{
imageQueue = new BlockingCollection<Image>();
}
public void AddImageAsync(Image img) public void AddImageAsync(Image img)
{ {
@ -49,18 +53,52 @@ public void AddImageAsync(Image img)
{ {
StartConsumerThread(); StartConsumerThread();
} }
else
{
imageQueue.Add(img); imageQueue.Add(img);
} }
/*if (imageQueue.Count > 0) protected virtual void StartConsumerThread()
{ {
Debug.WriteLine("ImageQueue count: " + imageQueue.Count); if (!IsWorking)
}*/ {
IsWorking = true;
task = TaskEx.Run(() =>
{
try
{
while (!imageQueue.IsCompleted)
{
Image img = null;
try
{
img = imageQueue.Take();
if (img != null)
{
//using (new DebugTimer("WriteFrame"))
WriteFrame(img);
}
}
catch (InvalidOperationException)
{
}
finally
{
if (img != null) img.Dispose();
}
}
}
finally
{
IsWorking = false;
}
});
}
} }
protected abstract void StartConsumerThread(); protected abstract void WriteFrame(Image img);
public void Finish() public void Finish()
{ {
@ -69,6 +107,8 @@ public void Finish()
imageQueue.CompleteAdding(); imageQueue.CompleteAdding();
task.Wait(); task.Wait();
} }
Dispose();
} }
public virtual void Dispose() public virtual void Dispose()

View file

@ -132,8 +132,6 @@ public ScreenRecorder(int fps, float durationSeconds, Rectangle captureRectangle
case ScreenRecordOutput.GIF: case ScreenRecordOutput.GIF:
imgCache = new HardDiskCache(Options); imgCache = new HardDiskCache(Options);
break; break;
default:
throw new Exception("Not all possible ScreenRecordOutput types are handled.");
} }
} }
@ -150,6 +148,8 @@ public void StartRecording()
IsRecording = true; IsRecording = true;
stopRequest = false; stopRequest = false;
try
{
for (int i = 0; !stopRequest && (frameCount == 0 || i < frameCount); i++) for (int i = 0; !stopRequest && (frameCount == 0 || i < frameCount); i++)
{ {
Stopwatch timer = Stopwatch.StartNew(); Stopwatch timer = Stopwatch.StartNew();
@ -169,16 +169,14 @@ public void StartRecording()
} }
else if (sleepTime < 0) else if (sleepTime < 0)
{ {
//DebugHelper.WriteLine("FPS drop: " + -sleepTime); // Need to handle FPS drops
} }
} }
} }
}
imgCache.Finish(); finally
if (OutputType != ScreenRecordOutput.GIF)
{ {
imgCache.Dispose(); imgCache.Finish();
} }
} }

View file

@ -211,6 +211,7 @@ private void InitializeComponent()
this.tsmiTrayFTPClient = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiTrayFTPClient = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayHashCheck = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiTrayHashCheck = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayIndexFolder = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiTrayIndexFolder = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayImageEditor = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayImageEffects = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiTrayImageEffects = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayMonitorTest = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiTrayMonitorTest = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayDNSChanger = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiTrayDNSChanger = new System.Windows.Forms.ToolStripMenuItem();
@ -613,7 +614,7 @@ private void InitializeComponent()
// //
// tsmiImageEditor // tsmiImageEditor
// //
this.tsmiImageEditor.Image = global::ShareX.Properties.Resources._90; this.tsmiImageEditor.Image = global::ShareX.Properties.Resources.Greenshot;
this.tsmiImageEditor.Name = "tsmiImageEditor"; this.tsmiImageEditor.Name = "tsmiImageEditor";
this.tsmiImageEditor.Size = new System.Drawing.Size(183, 22); this.tsmiImageEditor.Size = new System.Drawing.Size(183, 22);
this.tsmiImageEditor.Text = "Image editor..."; this.tsmiImageEditor.Text = "Image editor...";
@ -1559,6 +1560,7 @@ private void InitializeComponent()
this.tsmiTrayFTPClient, this.tsmiTrayFTPClient,
this.tsmiTrayHashCheck, this.tsmiTrayHashCheck,
this.tsmiTrayIndexFolder, this.tsmiTrayIndexFolder,
this.tsmiTrayImageEditor,
this.tsmiTrayImageEffects, this.tsmiTrayImageEffects,
this.tsmiTrayMonitorTest, this.tsmiTrayMonitorTest,
this.tsmiTrayDNSChanger}); this.tsmiTrayDNSChanger});
@ -1607,6 +1609,14 @@ private void InitializeComponent()
this.tsmiTrayIndexFolder.Text = "Index folder..."; this.tsmiTrayIndexFolder.Text = "Index folder...";
this.tsmiTrayIndexFolder.Click += new System.EventHandler(this.tsmiIndexFolder_Click); this.tsmiTrayIndexFolder.Click += new System.EventHandler(this.tsmiIndexFolder_Click);
// //
// tsmiTrayImageEditor
//
this.tsmiTrayImageEditor.Image = global::ShareX.Properties.Resources.Greenshot;
this.tsmiTrayImageEditor.Name = "tsmiTrayImageEditor";
this.tsmiTrayImageEditor.Size = new System.Drawing.Size(183, 22);
this.tsmiTrayImageEditor.Text = "Image editor...";
this.tsmiTrayImageEditor.Click += new System.EventHandler(this.tsmiImageEditor_Click);
//
// tsmiTrayImageEffects // tsmiTrayImageEffects
// //
this.tsmiTrayImageEffects.Image = global::ShareX.Properties.Resources.image_saturation; this.tsmiTrayImageEffects.Image = global::ShareX.Properties.Resources.image_saturation;
@ -1898,5 +1908,6 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem tsmiFTPClient; private System.Windows.Forms.ToolStripMenuItem tsmiFTPClient;
private System.Windows.Forms.ToolStripMenuItem tsmiTrayFTPClient; private System.Windows.Forms.ToolStripMenuItem tsmiTrayFTPClient;
private System.Windows.Forms.ToolStripMenuItem tsmiImageEditor; private System.Windows.Forms.ToolStripMenuItem tsmiImageEditor;
private System.Windows.Forms.ToolStripMenuItem tsmiTrayImageEditor;
} }
} }

View file

@ -1154,7 +1154,7 @@ private void InitializeComponent()
this.btnScreenRecorderAVIOptions.Name = "btnScreenRecorderAVIOptions"; this.btnScreenRecorderAVIOptions.Name = "btnScreenRecorderAVIOptions";
this.btnScreenRecorderAVIOptions.Size = new System.Drawing.Size(96, 23); this.btnScreenRecorderAVIOptions.Size = new System.Drawing.Size(96, 23);
this.btnScreenRecorderAVIOptions.TabIndex = 12; this.btnScreenRecorderAVIOptions.TabIndex = 12;
this.btnScreenRecorderAVIOptions.Text = "VfW options..."; this.btnScreenRecorderAVIOptions.Text = "AVI options...";
this.btnScreenRecorderAVIOptions.UseVisualStyleBackColor = true; this.btnScreenRecorderAVIOptions.UseVisualStyleBackColor = true;
this.btnScreenRecorderAVIOptions.Click += new System.EventHandler(this.btnScreenRecorderAVIOptions_Click); this.btnScreenRecorderAVIOptions.Click += new System.EventHandler(this.btnScreenRecorderAVIOptions_Click);
// //

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.34014 // Runtime Version:4.0.30319.18444
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -60,16 +60,6 @@ public class Resources {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap _90 {
get {
object obj = ResourceManager.GetObject("90", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -145,7 +135,7 @@ public class Resources {
/// </summary> /// </summary>
public static System.Drawing.Bitmap application_network { public static System.Drawing.Bitmap application_network {
get { get {
object obj = ResourceManager.GetObject("application-network", resourceCulture); object obj = ResourceManager.GetObject("application_network", resourceCulture);
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
} }
} }
@ -469,6 +459,16 @@ public class Resources {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Greenshot {
get {
object obj = ResourceManager.GetObject("Greenshot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View file

@ -127,9 +127,6 @@
<data name="application_form" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="application_form" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\application-form.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\application-form.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="CameraSound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Camera.wav;System.IO.MemoryStream, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="layer_shape_curve" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="layer_shape_curve" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-shape-curve.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\layer-shape-curve.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -175,6 +172,9 @@
<data name="folder_open_image" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="folder_open_image" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder-open-image.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\folder-open-image.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="navigation_090_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\navigation-090-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="layers_ungroup" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="layers_ungroup" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layers-ungroup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\layers-ungroup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -199,9 +199,6 @@
<data name="image_export" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="image_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\image-export.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\image-export.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="au" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\au.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="keyboard_pencil" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="keyboard_pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\keyboard--pencil.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\keyboard--pencil.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -268,12 +265,12 @@
<data name="monitor" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="monitor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\monitor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\monitor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="control_record" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\control-record.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ruler_triangle" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="ruler_triangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ruler-triangle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\ruler-triangle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="navigation_090_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\navigation-090-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="upload_cloud" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="upload_cloud" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\upload-cloud.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\upload-cloud.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -283,6 +280,9 @@
<data name="clipboard_plus" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="clipboard_plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clipboard--plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\clipboard--plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="application_network" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\application-network.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cross_button" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="cross_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cross-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\cross-button.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -295,8 +295,8 @@
<data name="color" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="color" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\color.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\color.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="control_record" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="CameraSound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\control-record.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\Camera.wav;System.IO.MemoryStream, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="drive_globe" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="drive_globe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\drive-globe.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\drive-globe.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -313,6 +313,9 @@
<data name="folder_tree" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="folder_tree" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder-tree.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\folder-tree.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="clock_plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clock--plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="globe_share" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="globe_share" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\globe-share.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\globe-share.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -328,8 +331,8 @@
<data name="Window" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Window" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Window.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\Window.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="clock_plus" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="au" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clock--plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\au.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="checkbox_uncheck" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="checkbox_uncheck" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\checkbox_uncheck.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\checkbox_uncheck.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -337,9 +340,6 @@
<data name="layer_shape_polygon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="layer_shape_polygon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-shape-polygon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\layer-shape-polygon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="application-network" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\application-network.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="layer_shape_round" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="layer_shape_round" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-shape-round.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\layer-shape-round.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -356,7 +356,7 @@
<value>..\Resources\application-task.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\application-task.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="90" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Greenshot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\90.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\Greenshot.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
</root> </root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

View file

@ -469,7 +469,7 @@
<None Include="Resources\ruler-triangle.png" /> <None Include="Resources\ruler-triangle.png" />
<None Include="Resources\Test.png" /> <None Include="Resources\Test.png" />
<None Include="Resources\application-network.png" /> <None Include="Resources\application-network.png" />
<None Include="Resources\90.png" /> <None Include="Resources\Greenshot.png" />
<Content Include="ShareX_Icon.ico" /> <Content Include="ShareX_Icon.ico" />
<None Include="Resources\ru.png" /> <None Include="Resources\ru.png" />
<None Include="Resources\keyboard--pencil.png" /> <None Include="Resources\keyboard--pencil.png" />

View file

@ -136,6 +136,7 @@ public FTPAccount()
SubFolderPath = string.Empty; SubFolderPath = string.Empty;
BrowserProtocol = BrowserProtocol.Http; BrowserProtocol = BrowserProtocol.Http;
HttpHomePath = string.Empty; HttpHomePath = string.Empty;
HttpHomePathAutoAddSubFolderPath = true;
HttpHomePathNoExtension = false; HttpHomePathNoExtension = false;
IsActive = false; IsActive = false;
FtpsSecurityProtocol = FtpSecurityProtocol.Ssl2Explicit; FtpsSecurityProtocol = FtpSecurityProtocol.Ssl2Explicit;