/// <summary>
        /// 显示压缩结果信息
        /// </summary>
        /// <param name="result">文件压缩结果信息</param>
        private void WriteResult(FileCompressResult result)
        {
            UIHelper.RenderOnUIThread(this, () =>
            {
                ListViewItem lvItem = new ListViewItem(result.FileName_Before)
                {
                    ForeColor = Color.White
                };
                lvItem.SubItems.Add(Bytes2Kb(result.FileSize_Before));
                lvItem.SubItems.Add(Bytes2Kb(result.FileSize_After));

                if (result.Success)
                {
                    lvItem.BackColor = Color.DarkGreen;
                    lvItem.SubItems.Add("成功。" + result.ResultMessage);
                    this.lblSuccessCount.Text = (Convert.ToInt32(this.lblSuccessCount.Text) + 1).ToString();
                }
                else
                {
                    lvItem.BackColor = Color.Red;
                    lvItem.SubItems.Add("失败。" + result.ResultMessage);
                    this.lblFailCount.Text = (Convert.ToInt32(this.lblFailCount.Text) + 1).ToString();
                }
                this.lvFileCompressResult.Items.Add(lvItem);
                this.ScrollToItem(this.lvFileCompressResult, this.lvFileCompressResult.Items.Count - 1);
            });
        }
        /// <summary>
        /// 压缩文件
        /// </summary>
        private void CompressFiles()
        {
            List <Button> enableBtns = new List <Button>()
            {
                this.btnStartCompress, this.btnClear
            };

            this.EnableButton(enableBtns, false);

            foreach (var waitCompressFile in this.arrWaitCompressFiles)
            {
                if (!File.Exists(waitCompressFile.FileName))
                {
                    continue;
                }
                FileInfo           waitCompressFileInfo = new FileInfo(waitCompressFile.FileName);
                FileCompressResult result = new FileCompressResult(waitCompressFile.FileName, waitCompressFileInfo.Length);
                try
                {
                    string relativeFileName = waitCompressFile.FileName.Substring(waitCompressFile.DirectoryName.TrimEnd('\\').Length + 1);
                    string saveFileName     = Path.Combine(this.saveFolderPath, relativeFileName);
                    string extensionName    = Path.GetExtension(saveFileName).TrimStart('.');

                    string extensionNameNew = extensionName;
                    if (arrExtName_Image_To_Jpg.Contains(extensionName, StringComparer.OrdinalIgnoreCase))
                    {
                        extensionNameNew = "jpg";
                    }
                    else if (arrExtName_Video_To_Mp4.Contains(extensionName, StringComparer.OrdinalIgnoreCase))
                    {
                        extensionNameNew = "mp4";
                    }
                    saveFileName = Path.Combine(Path.GetDirectoryName(saveFileName), Path.GetFileNameWithoutExtension(saveFileName) + "." + extensionNameNew);
                    string saveDirPath = Path.GetDirectoryName(saveFileName);
                    if (!Directory.Exists(saveDirPath))
                    {
                        Directory.CreateDirectory(saveDirPath);
                    }
                    result.FileName_After = saveFileName;

                    this.WriteMessage(string.Format("正在压缩文件:{0}", waitCompressFileInfo.Name));
                    bool compressSuccessed;
                    if (width > 0 || height > 0)
                    {
                        // 需要缩放压缩
                        if (width <= 0 || height <= 0)
                        {
                            Image img = Image.FromFile(waitCompressFile.FileName);
                            if (width <= 0)
                            {
                                if (changeType == 1)
                                {
                                    width = img.Width * height / img.Height;
                                }
                                else
                                {
                                    width = img.Width;
                                }
                            }
                            if (height <= 0)
                            {
                                if (changeType == 1)
                                {
                                    height = img.Height * width / img.Width;
                                }
                                else
                                {
                                    height = img.Height;
                                }
                            }
                        }
                        compressSuccessed = FFmpegHelper.CompressFile(FFmpegPath, width, height, waitCompressFile.FileName, saveFileName);
                    }
                    else
                    {
                        compressSuccessed = FFmpegHelper.CompressFile(FFmpegPath, waitCompressFile.FileName, saveFileName);
                    }

                    result.Success = compressSuccessed && File.Exists(saveFileName);
                    if (result.Success)
                    {
                        result.FileSize_After = new FileInfo(saveFileName).Length;
                    }
                    this.WriteResult(result);
                }
                catch (Exception ex)
                {
                    result.Success       = false;
                    result.ResultMessage = "处理时发生异常:" + ex.Message;
                    this.WriteResult(result);
                }
            }
            this.WriteMessage("压缩完成");

            this.EnableButton(enableBtns, true);
        }