Skip to content

Commit

Permalink
【WPF】修改提交任务并开始队列由开关改为独立按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
autodotua committed Dec 15, 2023
1 parent cc72816 commit 5a5d976
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 21 deletions.
6 changes: 0 additions & 6 deletions SimpleFFmpegGUI.WPF/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ public bool SmoothScroll
set => this.SetValueAndNotify(ref smoothScroll, value, nameof(SmoothScroll));
}

public bool StartQueueAfterAddTask
{
get => startQueueAfterAddTask;
set => this.SetValueAndNotify(ref startQueueAfterAddTask, value, nameof(StartQueueAfterAddTask));
}

public PerformanceTestCodecParameter[] TestCodecs { get; set; }
public PerformanceTestLine[] TestItems { get; set; }
public int TestQCMode { get; set; } = 0;
Expand Down
12 changes: 5 additions & 7 deletions SimpleFFmpegGUI.WPF/Pages/AddTaskPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,11 @@
Label="创建任务" />
<ui:AppBarSeparator />
<ui:CommandBar.SecondaryCommands>
<ui:AppBarToggleButton
IsChecked="{Binding Source={x:Static r:Config.Instance}, Path=StartQueueAfterAddTask}"
Label="创建后启动队列">
<ui:AppBarToggleButton.Icon>
<ui:FontIcon Glyph="&#xE756;" />
</ui:AppBarToggleButton.Icon>
</ui:AppBarToggleButton>
<ui:AppBarButton
Click="AddToQueueButton_Click"
Icon="Add"
Label="创建任务并启动队列"
Tag="queue" />
<ui:AppBarToggleButton
Icon="Clear"
IsChecked="{Binding Source={x:Static r:Config.Instance}, Path=ClearFilesAfterAddTask}"
Expand Down
9 changes: 4 additions & 5 deletions SimpleFFmpegGUI.WPF/Pages/AddTaskPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ private async void AddToQueueButton_Click(object sender, RoutedEventArgs e)
{
fileIOPanel.Reset();
}

if (Config.Instance.StartQueueAfterAddTask)
if("queue".Equals((sender as Button).Tag as string))
{
await Task.Run(() => App.ServiceProvider.GetService<QueueManager>().StartQueue());
this.CreateMessage().QueueSuccess("已开始队列");
await Task.Run(() => App.ServiceProvider.GetService<QueueManager>().StartQueue());
this.CreateMessage().QueueSuccess("已开始队列");
}
SaveAsLastOutputArguments(args);
}
Expand Down Expand Up @@ -254,7 +253,7 @@ private async void AddToRemoteHostButton_Click(object sender, RoutedEventArgs e)
Inputs = inputs,
Output = output,
Argument = args,
Start = Config.Instance.StartQueueAfterAddTask
Start = "queue".Equals((sender as Button).Tag as string)
};
await PostAsync(host, "Task/Add/" + ViewModel.Type.ToString(), data);

Expand Down
10 changes: 7 additions & 3 deletions 日志.md
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,14 @@

## 20231211

【WPF】修复了因FFME.Windows不支持最新版本的ffmpeg导致无法裁剪视频的BUG(https://github.com/unosquare/ffmediaelement/issues/642)

【All】更新到.NET8,更新了所有Nuget

【WPF】修复了因FFME.Windows不支持最新版本的ffmpeg导致无法裁剪视频的BUG(https://github.com/unosquare/ffmediaelement/issues/642)

【WPF】去除了WindowsAPICodePack的依赖,改为.NET8自带的文件选取器

【WPF】由于zgabi/ffmediaelement貌似修复了死锁问题,因此将裁剪功能修改为单进程运行,加快了启动速度
【WPF】由于zgabi/ffmediaelement貌似修复了死锁问题,因此将裁剪功能修改为单进程运行,加快了启动速度

## 20231215

【WPF】修改提交任务并开始队列由开关改为独立按钮

0 comments on commit 5a5d976

Please sign in to comment.