diff --git a/ClipChopper/Applications/ClipChopper.DesktopApp/ClipChopper.DesktopApp.csproj b/ClipChopper/Applications/ClipChopper.DesktopApp/ClipChopper.DesktopApp.csproj index fccc7d6..ca23091 100644 --- a/ClipChopper/Applications/ClipChopper.DesktopApp/ClipChopper.DesktopApp.csproj +++ b/ClipChopper/Applications/ClipChopper.DesktopApp/ClipChopper.DesktopApp.csproj @@ -1,7 +1,7 @@ x64 - 1.2.0 + 1.2.1 Kirichenko Valery ClipChopper 1.2.1 diff --git a/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml b/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml index 0623511..dbeac13 100644 --- a/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml +++ b/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml @@ -18,6 +18,7 @@ + diff --git a/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml.cs b/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml.cs index 80ae9e0..e40b377 100644 --- a/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml.cs +++ b/ClipChopper/Applications/ClipChopper.DesktopApp/MainWindow.xaml.cs @@ -9,6 +9,7 @@ using System.Collections.ObjectModel; using Ookii.Dialogs.Wpf; using System.Threading.Tasks; +using System.Windows.Shell; namespace ClipChopper.DesktopApp { @@ -226,9 +227,12 @@ private async void Save_Click(object sender, RoutedEventArgs eventArgs) var ffmpegPath = Path.Combine(Unosquare.FFME.Library.FFmpegDirectory, "ffmpeg.exe"); Status.Text = "Looking for keyframes..."; + TaskbarProgress.ProgressState = TaskbarItemProgressState.Normal; var progress = new Progress((value) => { Status.Text = $"Looking for keyframes... {value}%"; + TaskbarProgress.ProgressValue = value / 100.0d; + Console.WriteLine(TaskbarProgress.ProgressValue); }); var startKeyframe = await Task.Run(() => KeyframeProber.FindClosestKeyframeTime(inputFile, _fragment.Start, progress)); @@ -247,16 +251,16 @@ private async void Save_Click(object sender, RoutedEventArgs eventArgs) }; Status.Text = "Trimming..."; + TaskbarProgress.ProgressState = TaskbarItemProgressState.Indeterminate; await Task.Run(() => { - using (var ffmpeg = Process.Start(startInfo)) - { - Debug.Assert(ffmpeg != null, nameof(ffmpeg) + " != null"); - ffmpeg.OutputDataReceived += (s, e) => { Debug.WriteLine(e.Data); }; - ffmpeg.WaitForExit(); - } + using var ffmpeg = Process.Start(startInfo); + Debug.Assert(ffmpeg != null, nameof(ffmpeg) + " != null"); + ffmpeg.OutputDataReceived += (s, e) => { Debug.WriteLine(e.Data); }; + ffmpeg.WaitForExit(); }); Status.Text = "Done"; + TaskbarProgress.ProgressState = TaskbarItemProgressState.None; RefreshDirectory_Click(sender, eventArgs); await Task.Delay(2000); Status.Text = ""; diff --git a/ClipChopper/global.json b/ClipChopper/global.json new file mode 100644 index 0000000..4db6a48 --- /dev/null +++ b/ClipChopper/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "5.0", + "rollForward": "latestMajor", + "allowPrerelease": false + } +} \ No newline at end of file