Example #1
0
        private void DownloaderForm_InstallRequested(string filePath)
        {
            bool result = FFmpegGitHubDownloader.ExtractFFmpeg(filePath, DefaultToolsFolder);

            if (result)
            {
                this.InvokeSafe(async() =>
                {
                    txtFFmpegPath.Text = Helpers.GetVariableFolderPath(Path.Combine(DefaultToolsFolder, "ffmpeg.exe"));
                    await RefreshSourcesAsync();
                    if (!IsDisposed)
                    {
                        UpdateUI();
                    }
                });

                MessageBox.Show(Resources.FFmpegOptionsForm_DownloaderForm_InstallRequested_Successfully_downloaded_FFmpeg_, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show(Resources.FFmpegOptionsForm_DownloaderForm_InstallRequested_Download_of_FFmpeg_failed_, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
 private void btnDownload_Click(object sender, EventArgs e)
 {
     FFmpegGitHubDownloader.DownloadFFmpeg(true, DownloaderForm_InstallRequested);
 }