From 818aa2834c20b4cbd3f5a688910fc2a34cc2fa47 Mon Sep 17 00:00:00 2001
From: Scrub <72096833+ScrubN@users.noreply.github.com>
Date: Mon, 26 Aug 2024 23:27:35 -0400
Subject: [PATCH] Add retry button to failed and canceled tasks (#1194)
* Delete TwitchTaskException
* Hide cancel button when tasks cannot be canceled
* Remove public setters for ITwitchTask.Info and ITwitchTask.TokenSource
* Add reinitialization logic
* Reorder task context menu
* Update editorconfig
* Add translations
* Fix chained chat render tasks not starting after being reinitialized
---
.editorconfig | 7 +++-
TwitchDownloaderWPF/App.xaml | 1 +
TwitchDownloaderWPF/PageQueue.xaml | 19 +++++++---
TwitchDownloaderWPF/PageQueue.xaml.cs | 34 +++++++++++++++--
.../Translations/Strings.Designer.cs | 10 +++++
.../Translations/Strings.es.resx | 3 ++
.../Translations/Strings.fr.resx | 3 ++
.../Translations/Strings.it.resx | 3 ++
.../Translations/Strings.ja.resx | 3 ++
.../Translations/Strings.pl.resx | 3 ++
.../Translations/Strings.pt-br.resx | 3 ++
TwitchDownloaderWPF/Translations/Strings.resx | 3 ++
.../Translations/Strings.ru.resx | 3 ++
.../Translations/Strings.tr.resx | 3 ++
.../Translations/Strings.uk.resx | 3 ++
.../Translations/Strings.zh-cn.resx | 3 ++
.../TwitchDownloaderWPF.csproj | 1 +
.../TwitchTasks/ChatDownloadTask.cs | 37 +++++++++++++-----
.../TwitchTasks/ChatRenderTask.cs | 38 ++++++++++++++-----
.../TwitchTasks/ChatUpdateTask.cs | 37 +++++++++++++-----
.../TwitchTasks/ClipDownloadTask.cs | 37 +++++++++++++-----
.../TwitchTasks/ITwitchTask.cs | 11 ++++--
.../TwitchTasks/TwitchTaskException.cs | 19 ----------
.../TwitchTasks/VodDownloadTask.cs | 37 +++++++++++++-----
24 files changed, 238 insertions(+), 83 deletions(-)
delete mode 100644 TwitchDownloaderWPF/TwitchTasks/TwitchTaskException.cs
diff --git a/.editorconfig b/.editorconfig
index f9358c74..6ab58a47 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,9 +1,14 @@
-[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,c++m,cc,ccm,cginc,compute,cp,cpp,cppm,cs,cshtml,cu,cuh,cxx,cxxm,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,mxx,nuspec,paml,razor,resw,resx,shader,skin,tpp,usf,ush,uxml,vb,xaml,xamlx,xoml,xsd}]
+[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,c++m,cc,ccm,cginc,compute,cp,cpp,cppm,cs,cshtml,cu,cuh,cxx,cxxm,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,mxx,nuspec,paml,razor,resw,shader,skin,tpp,usf,ush,uxml,vb,xaml,xamlx,xoml,xsd}]
indent_style = space
indent_size = 4
tab_width = 4
+[*.resx]
+indent_style = space
+indent_size = 2
+tab_width = 4
+
[*.cs]
# Microsoft .NET properties
diff --git a/TwitchDownloaderWPF/App.xaml b/TwitchDownloaderWPF/App.xaml
index 0c9e5f83..2938a9ea 100644
--- a/TwitchDownloaderWPF/App.xaml
+++ b/TwitchDownloaderWPF/App.xaml
@@ -10,6 +10,7 @@
+
diff --git a/TwitchDownloaderWPF/PageQueue.xaml b/TwitchDownloaderWPF/PageQueue.xaml
index 9eddf37e..31733e35 100644
--- a/TwitchDownloaderWPF/PageQueue.xaml
+++ b/TwitchDownloaderWPF/PageQueue.xaml
@@ -13,6 +13,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:fa="http://schemas.fontawesome.com/icons/"
+ xmlns:markup="clr-namespace:WpfExtensions.Xaml.Markup;assembly=WpfExtensions.Xaml"
mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="800"
Title="PageQueue" Loaded="Page_Loaded">
@@ -45,14 +46,19 @@
-