2023.8.27.0

API.JFF: remove PXML attribute for some properties
API.Reddit.Channels: save channel info right after download; replace date providers with default
API.Reddit.SiteSettings: improve 'UpdateToken' function
AutoDownloader: add 'Copy' function
SchedulerEditorForm: add cloning plans
DownloadedInfoForm: add 'Try...Catch' for some functions
DownloadFeedForm: add button to go to custom page
FeedMedia: color typo
GroupParameters: add 'ICopier'
This commit is contained in:
Andy
2023-08-27 19:39:50 +03:00
parent f0014d2874
commit 2a60ace18f
23 changed files with 245 additions and 142 deletions

View File

@@ -22,7 +22,7 @@ Namespace DownloadObjects.Groups
Property SubscriptionsOnly As Boolean
Property UsersCount As Integer
End Interface
Friend Class GroupParameters : Implements IGroup, IDisposable
Friend Class GroupParameters : Implements IGroup, IDisposable, ICopier
Protected Const Name_Name As String = "Name"
Protected Const Name_Temporary As String = "Temporary"
Protected Const Name_Favorite As String = "Favorite"
@@ -53,6 +53,28 @@ Namespace DownloadObjects.Groups
Sites = New List(Of String)
SitesExcluded = New List(Of String)
End Sub
#Region "ICopier Support"
Friend Overridable Overloads Function Copy() As Object Implements ICopier.Copy
Return (New GroupParameters).Copy(Me)
End Function
Friend Overridable Overloads Function Copy(ByVal Source As Object) As Object Implements ICopier.Copy
With DirectCast(Source, GroupParameters)
Name = .Name
Labels.ListAddList(.Labels, LAP.ClearBeforeAdd)
LabelsExcluded.ListAddList(.LabelsExcluded, LAP.ClearBeforeAdd)
Sites.ListAddList(.Sites, LAP.ClearBeforeAdd)
SitesExcluded.ListAddList(.SitesExcluded, LAP.ClearBeforeAdd)
Temporary = .Temporary
Favorite = .Favorite
ReadyForDownload = .ReadyForDownload
ReadyForDownloadIgnore = .ReadyForDownloadIgnore
Subscriptions = .Subscriptions
SubscriptionsOnly = .SubscriptionsOnly
UsersCount = .UsersCount
End With
Return Source
End Function
#End Region
Protected Sub Import(ByVal e As EContainer)
Name = e.Value(Name_Name)
Temporary = e.Value(Name_Temporary).FromXML(Of Integer)(CInt(CheckState.Indeterminate))