mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-14 15:52:18 +00:00
2023.11.13.0
API.JFF: update UserAgent start value ActiveDownloadingProgress: fix unnecessary focus of inactive form FeedMedia: add additional buttons to the context menu FeedSpecialCollection: 'Favorite' feed does not appear in the feeds list if it is created manually UserCreatorForm: disable account selection when opening an empty form MainFrame: fix background image resizing on form state changes SettingsHost: inherit path when cloning an instance SettingsHostCollection: Extract user path change function to static
This commit is contained in:
@@ -43,7 +43,7 @@ Namespace API.JustForFans
|
|||||||
UserID = New PropertyValue(String.Empty, GetType(String))
|
UserID = New PropertyValue(String.Empty, GetType(String))
|
||||||
UserHash4 = New PropertyValue(String.Empty, GetType(String))
|
UserHash4 = New PropertyValue(String.Empty, GetType(String))
|
||||||
HeaderAccept = New PropertyValue(Responser.Accept.Value, GetType(String), Sub(v) UpdateHeader(NameOf(HeaderAccept), v))
|
HeaderAccept = New PropertyValue(Responser.Accept.Value, GetType(String), Sub(v) UpdateHeader(NameOf(HeaderAccept), v))
|
||||||
UserAgent = New PropertyValue(Responser.UserAgent, GetType(String), Sub(v) UpdateHeader(NameOf(UserAgent), v))
|
UserAgent = New PropertyValue(If(Responser.UserAgentExists, Responser.UserAgent, String.Empty), GetType(String), Sub(v) UpdateHeader(NameOf(UserAgent), v))
|
||||||
|
|
||||||
_AllowUserAgentUpdate = False
|
_AllowUserAgentUpdate = False
|
||||||
UserRegex = RParams.DMS("https://justfor.fans/([^/\?]+)", 1, EDP.ReturnValue)
|
UserRegex = RParams.DMS("https://justfor.fans/([^/\?]+)", 1, EDP.ReturnValue)
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ Imports PersonalUtilities.Forms
|
|||||||
Namespace DownloadObjects
|
Namespace DownloadObjects
|
||||||
Friend Class ActiveDownloadingProgress
|
Friend Class ActiveDownloadingProgress
|
||||||
Private Const MinWidth As Integer = 450
|
Private Const MinWidth As Integer = 450
|
||||||
|
Private Const TP_RowHeight As Integer = 30
|
||||||
|
Private Const TP_LowestValue As Integer = 39
|
||||||
Private MyView As FormView
|
Private MyView As FormView
|
||||||
Private Opened As Boolean = False
|
Private Opened As Boolean = False
|
||||||
Friend ReadOnly Property ReadyToOpen As Boolean
|
Friend ReadOnly Property ReadyToOpen As Boolean
|
||||||
@@ -40,9 +42,26 @@ Namespace DownloadObjects
|
|||||||
Private Sub ActiveDownloadingProgress_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
Private Sub ActiveDownloadingProgress_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||||
MyView.DisposeIfReady()
|
MyView.DisposeIfReady()
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub ActiveDownloadingProgress_VisibleChanged(sender As Object, e As EventArgs) Handles Me.VisibleChanged
|
||||||
|
Try
|
||||||
|
If Visible Then
|
||||||
|
ControlInvokeFast(Me, Sub()
|
||||||
|
Dim s As Size = Size
|
||||||
|
Dim ss As Size = Screen.PrimaryScreen.WorkingArea.Size
|
||||||
|
Dim c% = TP_MAIN.RowStyles.Count - 1
|
||||||
|
s.Height = c * TP_RowHeight + TP_LowestValue + (PaddingE.GetOf({TP_MAIN}).Vertical(c) / c).RoundDown
|
||||||
|
If s.Height > ss.Height Then s.Height = ss.Height
|
||||||
|
MinimumSize = Nothing
|
||||||
|
Size = s
|
||||||
|
MinimumSize = New Size(MinWidth, s.Height)
|
||||||
|
End Sub)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ErrorsDescriber.Execute(EDP.SendToLog, ex, "Change 'ActiveDownloadingProgress' size")
|
||||||
|
MainFrameObj.UpdateLogButton()
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
Private Sub Downloader_Reconfigured()
|
Private Sub Downloader_Reconfigured()
|
||||||
Const RowHeight% = 30
|
|
||||||
Const LowestValue% = 39
|
|
||||||
Dim a As Action = Sub()
|
Dim a As Action = Sub()
|
||||||
With TP_MAIN
|
With TP_MAIN
|
||||||
If .Controls.Count > 0 Then
|
If .Controls.Count > 0 Then
|
||||||
@@ -59,7 +78,7 @@ Namespace DownloadObjects
|
|||||||
If .Pool.Count > 0 Then
|
If .Pool.Count > 0 Then
|
||||||
For Each j As TDownloader.Job In .Pool
|
For Each j As TDownloader.Job In .Pool
|
||||||
With TP_MAIN
|
With TP_MAIN
|
||||||
.RowStyles.Add(New RowStyle(SizeType.Absolute, RowHeight))
|
.RowStyles.Add(New RowStyle(SizeType.Absolute, TP_RowHeight))
|
||||||
.RowCount += 1
|
.RowCount += 1
|
||||||
JobsList.Add(New DownloadProgress(j))
|
JobsList.Add(New DownloadProgress(j))
|
||||||
AddHandler JobsList.Last.ProgressChanged, AddressOf Jobs_ProgressChanged
|
AddHandler JobsList.Last.ProgressChanged, AddressOf Jobs_ProgressChanged
|
||||||
@@ -69,14 +88,14 @@ Namespace DownloadObjects
|
|||||||
TP_MAIN.RowStyles.Add(New RowStyle(SizeType.AutoSize))
|
TP_MAIN.RowStyles.Add(New RowStyle(SizeType.AutoSize))
|
||||||
TP_MAIN.RowCount += 1
|
TP_MAIN.RowCount += 1
|
||||||
|
|
||||||
Dim s As Size = Size
|
'Dim s As Size = Size
|
||||||
Dim ss As Size = Screen.PrimaryScreen.WorkingArea.Size
|
'Dim ss As Size = Screen.PrimaryScreen.WorkingArea.Size
|
||||||
Dim c% = TP_MAIN.RowStyles.Count - 1
|
'Dim c% = TP_MAIN.RowStyles.Count - 1
|
||||||
s.Height = c * RowHeight + LowestValue + (PaddingE.GetOf({TP_MAIN}).Vertical(c) / c).RoundDown
|
's.Height = c * TP_RowHeight + TP_LowestValue + (PaddingE.GetOf({TP_MAIN}).Vertical(c) / c).RoundDown
|
||||||
If s.Height > ss.Height Then s.Height = ss.Height
|
'If s.Height > ss.Height Then s.Height = ss.Height
|
||||||
MinimumSize = Nothing
|
'MinimumSize = Nothing
|
||||||
Size = s
|
'Size = s
|
||||||
MinimumSize = New Size(MinWidth, s.Height)
|
'MinimumSize = New Size(MinWidth, s.Height)
|
||||||
End If
|
End If
|
||||||
End With
|
End With
|
||||||
TP_MAIN.Refresh()
|
TP_MAIN.Refresh()
|
||||||
|
|||||||
@@ -113,18 +113,24 @@ Namespace DownloadObjects
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Feeds handlers"
|
#Region "Feeds handlers"
|
||||||
Private Sub AddNewFeedItem(ByVal Destination As ToolStripMenuItem, ByVal Feed As FeedSpecial, ByVal Image As Image, ByVal Handler As EventHandler,
|
Private Overloads Sub AddNewFeedItem(ByVal Destination As ToolStripMenuItem, ByVal Feed As FeedSpecial, ByVal Image As Image,
|
||||||
Optional ByVal Insert As Boolean = False)
|
ByVal Handler As EventHandler, Optional ByVal Insert As Boolean = False)
|
||||||
Dim item As New ToolStripMenuItem(Feed.Name, Image) With {.Tag = Feed}
|
AddNewFeedItem(Destination, ToolbarTOP, Feed, Image, Handler, Insert)
|
||||||
AddHandler item.Click, Handler
|
|
||||||
ControlInvokeFast(ToolbarTOP, Destination, Sub()
|
|
||||||
If Destination.DropDownItems.Count > 0 And Insert Then
|
|
||||||
Destination.DropDownItems.Insert(0, item)
|
|
||||||
Else
|
|
||||||
Destination.DropDownItems.Add(item)
|
|
||||||
End If
|
|
||||||
End Sub, EDP.None)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Friend Overloads Shared Function AddNewFeedItem(ByVal Destination As ToolStripMenuItem, ByVal Toolbar As ToolStrip,
|
||||||
|
ByVal Feed As FeedSpecial, ByVal Image As Image,
|
||||||
|
ByVal Handler As EventHandler, Optional ByVal Insert As Boolean = False) As ToolStripMenuItem
|
||||||
|
Dim item As New ToolStripMenuItem(Feed.Name, Image) With {.Tag = Feed}
|
||||||
|
If Not Handler Is Nothing Then AddHandler item.Click, Handler
|
||||||
|
ControlInvokeFast(Toolbar, Destination, Sub()
|
||||||
|
If Destination.DropDownItems.Count > 0 And Insert Then
|
||||||
|
Destination.DropDownItems.Insert(0, item)
|
||||||
|
Else
|
||||||
|
Destination.DropDownItems.Add(item)
|
||||||
|
End If
|
||||||
|
End Sub, EDP.None)
|
||||||
|
Return item
|
||||||
|
End Function
|
||||||
Private Sub Feed_FeedAdded(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
Private Sub Feed_FeedAdded(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
AddNewFeedItem(BTT_LOAD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_LOAD, True)
|
AddNewFeedItem(BTT_LOAD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_LOAD, True)
|
||||||
AddNewFeedItem(BTT_FEED_ADD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD, True)
|
AddNewFeedItem(BTT_FEED_ADD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD, True)
|
||||||
@@ -140,9 +146,12 @@ Namespace DownloadObjects
|
|||||||
Feed_FeedRemoved(BTT_FEED_CLEAR_SPEC, Feed)
|
Feed_FeedRemoved(BTT_FEED_CLEAR_SPEC, Feed)
|
||||||
End Sub
|
End Sub
|
||||||
Private Overloads Sub Feed_FeedRemoved(ByVal Destination As ToolStripMenuItem, ByVal Feed As FeedSpecial)
|
Private Overloads Sub Feed_FeedRemoved(ByVal Destination As ToolStripMenuItem, ByVal Feed As FeedSpecial)
|
||||||
|
Feed_FeedRemoved(Destination, ToolbarTOP, Feed)
|
||||||
|
End Sub
|
||||||
|
Friend Overloads Shared Sub Feed_FeedRemoved(ByVal Destination As ToolStripMenuItem, ByVal Toolbar As ToolStrip, ByVal Feed As FeedSpecial)
|
||||||
Try
|
Try
|
||||||
With Destination
|
With Destination
|
||||||
ControlInvokeFast(ToolbarTOP, .Self,
|
ControlInvokeFast(Toolbar, .Self,
|
||||||
Sub()
|
Sub()
|
||||||
If .DropDownItems.Count > 0 Then
|
If .DropDownItems.Count > 0 Then
|
||||||
Dim item As Object
|
Dim item As Object
|
||||||
@@ -895,6 +904,9 @@ Namespace DownloadObjects
|
|||||||
If TP_DATA.Controls.Count > 0 Then
|
If TP_DATA.Controls.Count > 0 Then
|
||||||
For Each cnt As Control In TP_DATA.Controls : cnt.Dispose() : Next
|
For Each cnt As Control In TP_DATA.Controls : cnt.Dispose() : Next
|
||||||
TP_DATA.Controls.Clear()
|
TP_DATA.Controls.Clear()
|
||||||
|
GC.Collect()
|
||||||
|
GC.WaitForPendingFinalizers()
|
||||||
|
GC.WaitForFullGCComplete()
|
||||||
End If
|
End If
|
||||||
End Sub)
|
End Sub)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -299,7 +299,22 @@ Namespace DownloadObjects
|
|||||||
Else
|
Else
|
||||||
Throw New ArgumentNullException With {.HelpLink = 1}
|
Throw New ArgumentNullException With {.HelpLink = 1}
|
||||||
End If
|
End If
|
||||||
If Settings.Feeds.Favorite.Contains(Media) Then BTT_FEED_ADD_FAV.ControlChangeColor(True, False)
|
|
||||||
|
If Settings.Feeds.FavoriteExists AndAlso Settings.Feeds.Favorite.Contains(Media) Then BTT_FEED_ADD_FAV.ControlChangeColor(True, False)
|
||||||
|
If Settings.FeedShowSpecialFeedsMediaItem Then
|
||||||
|
With Settings.Feeds
|
||||||
|
AddHandler .FeedAdded, AddressOf Feed_FeedAdded
|
||||||
|
AddHandler .FeedRemoved, AddressOf Feed_FeedRemoved
|
||||||
|
If .Count > 0 Then
|
||||||
|
For Each fItem As FeedSpecial In .Self
|
||||||
|
If Not fItem.IsFavorite Then
|
||||||
|
DownloadFeedForm.AddNewFeedItem(BTT_FEED_ADD_SPEC, CONTEXT_DATA, fItem, Nothing, AddressOf Feed_SPEC_ADD)
|
||||||
|
DownloadFeedForm.AddNewFeedItem(BTT_FEED_REMOVE_SPEC, CONTEXT_DATA, fItem, Nothing, AddressOf Feed_SPEC_REMOVE)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End With
|
||||||
|
End If
|
||||||
Catch aex As ArgumentNullException When aex.HelpLink = 1
|
Catch aex As ArgumentNullException When aex.HelpLink = 1
|
||||||
HasError = True
|
HasError = True
|
||||||
Catch tex As Threading.ThreadStateException
|
Catch tex As Threading.ThreadStateException
|
||||||
@@ -310,11 +325,38 @@ Namespace DownloadObjects
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
#Region "Feed handlers"
|
||||||
|
Private Sub Feed_FeedAdded(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
|
DownloadFeedForm.AddNewFeedItem(BTT_FEED_ADD_SPEC, CONTEXT_DATA, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD, True)
|
||||||
|
DownloadFeedForm.AddNewFeedItem(BTT_FEED_REMOVE_SPEC, CONTEXT_DATA, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_REMOVE, True)
|
||||||
|
End Sub
|
||||||
|
Private Sub Feed_FeedRemoved(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
|
DownloadFeedForm.Feed_FeedRemoved(BTT_FEED_ADD_SPEC, CONTEXT_DATA, Feed)
|
||||||
|
DownloadFeedForm.Feed_FeedRemoved(BTT_FEED_REMOVE_SPEC, CONTEXT_DATA, Feed)
|
||||||
|
End Sub
|
||||||
|
Private Sub Feed_SPEC_ADD(ByVal Source As ToolStripMenuItem, ByVal e As EventArgs)
|
||||||
|
Dim f As FeedSpecial = Source.Tag
|
||||||
|
If Not f Is Nothing AndAlso Not f.Disposed Then f.Add(Media)
|
||||||
|
End Sub
|
||||||
|
Private Sub Feed_SPEC_REMOVE(ByVal Source As ToolStripMenuItem, ByVal e As EventArgs)
|
||||||
|
Dim f As FeedSpecial = Source.Tag
|
||||||
|
If Not f Is Nothing AndAlso Not f.Disposed Then f.Remove(Media)
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
#Region "Dispose"
|
#Region "Dispose"
|
||||||
Private Sub FeedImage_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
Private Sub FeedImage_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||||
If Not MyImage Is Nothing Then MyImage.Dispose()
|
If Not MyImage Is Nothing Then MyImage.Dispose()
|
||||||
If Not MyPicture Is Nothing Then MyPicture.Dispose()
|
If Not MyPicture Is Nothing Then MyPicture.Dispose() : MyPicture = Nothing
|
||||||
If Not MyVideo Is Nothing Then MyVideo.Dispose()
|
If Not MyVideo Is Nothing Then MyVideo.Dispose()
|
||||||
|
Try
|
||||||
|
If Settings.FeedShowSpecialFeedsMediaItem Then
|
||||||
|
With Settings.Feeds
|
||||||
|
RemoveHandler .FeedAdded, AddressOf Feed_FeedAdded
|
||||||
|
RemoveHandler .FeedRemoved, AddressOf Feed_FeedRemoved
|
||||||
|
End With
|
||||||
|
End If
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "LBL"
|
#Region "LBL"
|
||||||
|
|||||||
@@ -12,8 +12,44 @@ Namespace DownloadObjects
|
|||||||
Friend Class FeedSpecialCollection : Implements IEnumerable(Of FeedSpecial), IMyEnumerator(Of FeedSpecial)
|
Friend Class FeedSpecialCollection : Implements IEnumerable(Of FeedSpecial), IMyEnumerator(Of FeedSpecial)
|
||||||
#Region "Events"
|
#Region "Events"
|
||||||
Friend Delegate Sub FeedActionEventHandler(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
Friend Delegate Sub FeedActionEventHandler(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
Friend Event FeedAdded As FeedActionEventHandler
|
Private ReadOnly FeedAddedEventHandlers As List(Of FeedActionEventHandler)
|
||||||
Friend Event FeedRemoved As FeedActionEventHandler
|
Friend Custom Event FeedAdded As FeedActionEventHandler
|
||||||
|
AddHandler(ByVal h As FeedActionEventHandler)
|
||||||
|
If Not FeedAddedEventHandlers.Contains(h) Then FeedAddedEventHandlers.Add(h)
|
||||||
|
End AddHandler
|
||||||
|
RemoveHandler(ByVal h As FeedActionEventHandler)
|
||||||
|
FeedAddedEventHandlers.Remove(h)
|
||||||
|
End RemoveHandler
|
||||||
|
RaiseEvent(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
|
If FeedAddedEventHandlers.Count > 0 Then
|
||||||
|
Try
|
||||||
|
For i% = 0 To FeedAddedEventHandlers.Count - 1
|
||||||
|
Try : FeedAddedEventHandlers(i).Invoke(Source, Feed) : Catch : End Try
|
||||||
|
Next
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End RaiseEvent
|
||||||
|
End Event
|
||||||
|
Private ReadOnly FeedRemovedEventHandlers As List(Of FeedActionEventHandler)
|
||||||
|
Friend Custom Event FeedRemoved As FeedActionEventHandler
|
||||||
|
AddHandler(ByVal h As FeedActionEventHandler)
|
||||||
|
If Not FeedRemovedEventHandlers.Contains(h) Then FeedRemovedEventHandlers.Add(h)
|
||||||
|
End AddHandler
|
||||||
|
RemoveHandler(ByVal h As FeedActionEventHandler)
|
||||||
|
FeedRemovedEventHandlers.Remove(h)
|
||||||
|
End RemoveHandler
|
||||||
|
RaiseEvent(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
|
If FeedRemovedEventHandlers.Count > 0 Then
|
||||||
|
Try
|
||||||
|
For i% = 0 To FeedRemovedEventHandlers.Count - 1
|
||||||
|
Try : FeedRemovedEventHandlers(i).Invoke(Source, Feed) : Catch : End Try
|
||||||
|
Next
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End RaiseEvent
|
||||||
|
End Event
|
||||||
#End Region
|
#End Region
|
||||||
#Region "FeedsComparer"
|
#Region "FeedsComparer"
|
||||||
Private Class FeedsComparer : Implements IComparer(Of FeedSpecial)
|
Private Class FeedsComparer : Implements IComparer(Of FeedSpecial)
|
||||||
@@ -31,10 +67,20 @@ Namespace DownloadObjects
|
|||||||
Private _Favorite As FeedSpecial = Nothing
|
Private _Favorite As FeedSpecial = Nothing
|
||||||
Friend ReadOnly Property Favorite As FeedSpecial
|
Friend ReadOnly Property Favorite As FeedSpecial
|
||||||
Get
|
Get
|
||||||
If _Favorite Is Nothing Then _Favorite = FeedSpecial.CreateFavorite : _Favorite.Load()
|
If _Favorite Is Nothing Then
|
||||||
|
_Favorite = FeedSpecial.CreateFavorite
|
||||||
|
_Favorite.Load()
|
||||||
|
Feeds.Add(_Favorite)
|
||||||
|
Feeds.Sort(ComparerFeeds)
|
||||||
|
End If
|
||||||
Return _Favorite
|
Return _Favorite
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Friend ReadOnly Property FavoriteExists As Boolean
|
||||||
|
Get
|
||||||
|
Return Not _Favorite Is Nothing
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
Private _Loaded As Boolean = False
|
Private _Loaded As Boolean = False
|
||||||
Friend ReadOnly Property Comparer As New FeedSpecial.SEComparer
|
Friend ReadOnly Property Comparer As New FeedSpecial.SEComparer
|
||||||
Private ReadOnly Property ComparerFeeds As New FeedsComparer
|
Private ReadOnly Property ComparerFeeds As New FeedsComparer
|
||||||
@@ -42,6 +88,8 @@ Namespace DownloadObjects
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "Initializer, loader, feeds handlers"
|
#Region "Initializer, loader, feeds handlers"
|
||||||
Friend Sub New()
|
Friend Sub New()
|
||||||
|
FeedAddedEventHandlers = New List(Of FeedActionEventHandler)
|
||||||
|
FeedRemovedEventHandlers = New List(Of FeedActionEventHandler)
|
||||||
Feeds = New List(Of FeedSpecial)
|
Feeds = New List(Of FeedSpecial)
|
||||||
End Sub
|
End Sub
|
||||||
Friend Sub Load()
|
Friend Sub Load()
|
||||||
@@ -49,7 +97,7 @@ Namespace DownloadObjects
|
|||||||
If Not _Loaded Then
|
If Not _Loaded Then
|
||||||
_Loaded = True
|
_Loaded = True
|
||||||
Dim files As List(Of SFile) = SFile.GetFiles(TDownloader.SessionsPath, $"{FeedSpecial.FavoriteName}.xml|{FeedSpecial.SpecialName}_*.xml",, EDP.ReturnValue)
|
Dim files As List(Of SFile) = SFile.GetFiles(TDownloader.SessionsPath, $"{FeedSpecial.FavoriteName}.xml|{FeedSpecial.SpecialName}_*.xml",, EDP.ReturnValue)
|
||||||
If files.ListExists Then files.ForEach(Sub(f)
|
If files.ListExists Then files.ForEach(Sub(ByVal f As SFile)
|
||||||
Feeds.Add(New FeedSpecial(f))
|
Feeds.Add(New FeedSpecial(f))
|
||||||
With Feeds.Last
|
With Feeds.Last
|
||||||
If .IsFavorite Then _Favorite = .Self
|
If .IsFavorite Then _Favorite = .Self
|
||||||
|
|||||||
39
SCrawler/Editors/GlobalSettingsForm.Designer.vb
generated
39
SCrawler/Editors/GlobalSettingsForm.Designer.vb
generated
@@ -132,6 +132,7 @@ Namespace Editors
|
|||||||
Me.CH_STD_SNAP_KEEP_WITH_FILES = New System.Windows.Forms.CheckBox()
|
Me.CH_STD_SNAP_KEEP_WITH_FILES = New System.Windows.Forms.CheckBox()
|
||||||
Me.CH_STD_SNAP_CACHE_PERMANENT = New System.Windows.Forms.CheckBox()
|
Me.CH_STD_SNAP_CACHE_PERMANENT = New System.Windows.Forms.CheckBox()
|
||||||
Me.CH_STD_YT_CREATE_URL = New System.Windows.Forms.CheckBox()
|
Me.CH_STD_YT_CREATE_URL = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.CH_USE_DEF_ACC = New System.Windows.Forms.CheckBox()
|
||||||
Me.TXT_CHANNELS_ROWS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
Me.TXT_CHANNELS_ROWS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||||
Me.TXT_CHANNELS_COLUMNS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
Me.TXT_CHANNELS_COLUMNS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||||
Me.CH_DOWN_IMAGES_NATIVE = New System.Windows.Forms.CheckBox()
|
Me.CH_DOWN_IMAGES_NATIVE = New System.Windows.Forms.CheckBox()
|
||||||
@@ -176,7 +177,7 @@ Namespace Editors
|
|||||||
Me.TAB_MAIN = New System.Windows.Forms.TabControl()
|
Me.TAB_MAIN = New System.Windows.Forms.TabControl()
|
||||||
Me.TAB_ENVIR = New System.Windows.Forms.TabPage()
|
Me.TAB_ENVIR = New System.Windows.Forms.TabPage()
|
||||||
Me.CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
Me.CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||||
Me.CH_USE_DEF_ACC = New System.Windows.Forms.CheckBox()
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM = New System.Windows.Forms.CheckBox()
|
||||||
TP_BASIS = New System.Windows.Forms.TableLayoutPanel()
|
TP_BASIS = New System.Windows.Forms.TableLayoutPanel()
|
||||||
TP_IMAGES = New System.Windows.Forms.TableLayoutPanel()
|
TP_IMAGES = New System.Windows.Forms.TableLayoutPanel()
|
||||||
TP_FILE_NAME = New System.Windows.Forms.TableLayoutPanel()
|
TP_FILE_NAME = New System.Windows.Forms.TableLayoutPanel()
|
||||||
@@ -1023,6 +1024,18 @@ Namespace Editors
|
|||||||
TT_MAIN.SetToolTip(Me.CH_STD_YT_CREATE_URL, "Create local URL files to link to the original page")
|
TT_MAIN.SetToolTip(Me.CH_STD_YT_CREATE_URL, "Create local URL files to link to the original page")
|
||||||
Me.CH_STD_YT_CREATE_URL.UseVisualStyleBackColor = True
|
Me.CH_STD_YT_CREATE_URL.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'CH_USE_DEF_ACC
|
||||||
|
'
|
||||||
|
Me.CH_USE_DEF_ACC.AutoSize = True
|
||||||
|
Me.CH_USE_DEF_ACC.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.CH_USE_DEF_ACC.Location = New System.Drawing.Point(4, 254)
|
||||||
|
Me.CH_USE_DEF_ACC.Name = "CH_USE_DEF_ACC"
|
||||||
|
Me.CH_USE_DEF_ACC.Size = New System.Drawing.Size(568, 19)
|
||||||
|
Me.CH_USE_DEF_ACC.TabIndex = 9
|
||||||
|
Me.CH_USE_DEF_ACC.Text = "Use the default account if the selected account does not exist"
|
||||||
|
TT_MAIN.SetToolTip(Me.CH_USE_DEF_ACC, "Use the default account if you deleted an account that you used for some users")
|
||||||
|
Me.CH_USE_DEF_ACC.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'TP_CHANNELS_IMGS
|
'TP_CHANNELS_IMGS
|
||||||
'
|
'
|
||||||
TP_CHANNELS_IMGS.ColumnCount = 2
|
TP_CHANNELS_IMGS.ColumnCount = 2
|
||||||
@@ -1492,10 +1505,11 @@ Namespace Editors
|
|||||||
TP_FEED.Controls.Add(Me.COLORS_FEED, 0, 2)
|
TP_FEED.Controls.Add(Me.COLORS_FEED, 0, 2)
|
||||||
TP_FEED.Controls.Add(Me.CH_FEED_OPEN_LAST_MODE, 0, 7)
|
TP_FEED.Controls.Add(Me.CH_FEED_OPEN_LAST_MODE, 0, 7)
|
||||||
TP_FEED.Controls.Add(Me.CH_FEED_SHOW_FRIENDLY, 0, 8)
|
TP_FEED.Controls.Add(Me.CH_FEED_SHOW_FRIENDLY, 0, 8)
|
||||||
|
TP_FEED.Controls.Add(Me.CH_FEED_SHOW_SPEC_MEDIAITEM, 0, 9)
|
||||||
TP_FEED.Dock = System.Windows.Forms.DockStyle.Fill
|
TP_FEED.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
TP_FEED.Location = New System.Drawing.Point(0, 0)
|
TP_FEED.Location = New System.Drawing.Point(0, 0)
|
||||||
TP_FEED.Name = "TP_FEED"
|
TP_FEED.Name = "TP_FEED"
|
||||||
TP_FEED.RowCount = 10
|
TP_FEED.RowCount = 11
|
||||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||||
@@ -1505,6 +1519,7 @@ Namespace Editors
|
|||||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||||
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||||
TP_FEED.Size = New System.Drawing.Size(576, 399)
|
TP_FEED.Size = New System.Drawing.Size(576, 399)
|
||||||
TP_FEED.TabIndex = 0
|
TP_FEED.TabIndex = 0
|
||||||
@@ -2125,17 +2140,16 @@ Namespace Editors
|
|||||||
Me.CONTAINER_MAIN.TabIndex = 0
|
Me.CONTAINER_MAIN.TabIndex = 0
|
||||||
Me.CONTAINER_MAIN.TopToolStripPanelVisible = False
|
Me.CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||||
'
|
'
|
||||||
'CH_USE_DEF_ACC
|
'CH_FEED_SHOW_SPEC_MEDIAITEM
|
||||||
'
|
'
|
||||||
Me.CH_USE_DEF_ACC.AutoSize = True
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.AutoSize = True
|
||||||
Me.CH_USE_DEF_ACC.Dock = System.Windows.Forms.DockStyle.Fill
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
Me.CH_USE_DEF_ACC.Location = New System.Drawing.Point(4, 254)
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.Location = New System.Drawing.Point(4, 247)
|
||||||
Me.CH_USE_DEF_ACC.Name = "CH_USE_DEF_ACC"
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.Name = "CH_FEED_SHOW_SPEC_MEDIAITEM"
|
||||||
Me.CH_USE_DEF_ACC.Size = New System.Drawing.Size(568, 19)
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.Size = New System.Drawing.Size(568, 19)
|
||||||
Me.CH_USE_DEF_ACC.TabIndex = 9
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.TabIndex = 9
|
||||||
Me.CH_USE_DEF_ACC.Text = "Use the default account if the selected account does not exist"
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.Text = "Show special feeds in media items"
|
||||||
TT_MAIN.SetToolTip(Me.CH_USE_DEF_ACC, "Use the default account if you deleted an account that you used for some users")
|
Me.CH_FEED_SHOW_SPEC_MEDIAITEM.UseVisualStyleBackColor = True
|
||||||
Me.CH_USE_DEF_ACC.UseVisualStyleBackColor = True
|
|
||||||
'
|
'
|
||||||
'GlobalSettingsForm
|
'GlobalSettingsForm
|
||||||
'
|
'
|
||||||
@@ -2326,5 +2340,6 @@ Namespace Editors
|
|||||||
Private WithEvents COLORS_SUBSCRIPTIONS_USERS As ColorPicker
|
Private WithEvents COLORS_SUBSCRIPTIONS_USERS As ColorPicker
|
||||||
Private WithEvents CH_STD_YT_CREATE_URL As CheckBox
|
Private WithEvents CH_STD_YT_CREATE_URL As CheckBox
|
||||||
Private WithEvents CH_USE_DEF_ACC As CheckBox
|
Private WithEvents CH_USE_DEF_ACC As CheckBox
|
||||||
|
Private WithEvents CH_FEED_SHOW_SPEC_MEDIAITEM As CheckBox
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
@@ -141,6 +141,7 @@ Namespace Editors
|
|||||||
NUM_FEED_STORE_SESSION_DATA.Value = .FeedStoredSessionsNumber.Value
|
NUM_FEED_STORE_SESSION_DATA.Value = .FeedStoredSessionsNumber.Value
|
||||||
CH_FEED_OPEN_LAST_MODE.Checked = .FeedOpenLastMode
|
CH_FEED_OPEN_LAST_MODE.Checked = .FeedOpenLastMode
|
||||||
CH_FEED_SHOW_FRIENDLY.Checked = .FeedShowFriendlyNames
|
CH_FEED_SHOW_FRIENDLY.Checked = .FeedShowFriendlyNames
|
||||||
|
CH_FEED_SHOW_SPEC_MEDIAITEM.Checked = .FeedShowSpecialFeedsMediaItem
|
||||||
End With
|
End With
|
||||||
.MyFieldsChecker = New FieldsChecker
|
.MyFieldsChecker = New FieldsChecker
|
||||||
With .MyFieldsCheckerE
|
With .MyFieldsCheckerE
|
||||||
@@ -312,6 +313,7 @@ Namespace Editors
|
|||||||
.FeedStoredSessionsNumber.Value = NUM_FEED_STORE_SESSION_DATA.Value
|
.FeedStoredSessionsNumber.Value = NUM_FEED_STORE_SESSION_DATA.Value
|
||||||
.FeedOpenLastMode.Value = CH_FEED_OPEN_LAST_MODE.Checked
|
.FeedOpenLastMode.Value = CH_FEED_OPEN_LAST_MODE.Checked
|
||||||
.FeedShowFriendlyNames.Value = CH_FEED_SHOW_FRIENDLY.Checked
|
.FeedShowFriendlyNames.Value = CH_FEED_SHOW_FRIENDLY.Checked
|
||||||
|
.FeedShowSpecialFeedsMediaItem.Value = CH_FEED_SHOW_SPEC_MEDIAITEM.Checked
|
||||||
FeedParametersChanged = .FeedDataRows.ChangesDetected Or .FeedDataColumns.ChangesDetected Or
|
FeedParametersChanged = .FeedDataRows.ChangesDetected Or .FeedDataColumns.ChangesDetected Or
|
||||||
.FeedEndless.ChangesDetected Or .FeedStoreSessionsData.ChangesDetected Or
|
.FeedEndless.ChangesDetected Or .FeedStoreSessionsData.ChangesDetected Or
|
||||||
.FeedBackColor.ChangesDetected Or .FeedForeColor.ChangesDetected Or
|
.FeedBackColor.ChangesDetected Or .FeedForeColor.ChangesDetected Or
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ Namespace Editors
|
|||||||
End With
|
End With
|
||||||
|
|
||||||
Dim NameFieldProvider As IFormatProvider = Nothing
|
Dim NameFieldProvider As IFormatProvider = Nothing
|
||||||
|
RefillAccounts(Nothing)
|
||||||
|
|
||||||
If UserIsCollection Then
|
If UserIsCollection Then
|
||||||
CMB_SITE.CaptionEnabled = False
|
CMB_SITE.CaptionEnabled = False
|
||||||
@@ -401,6 +402,7 @@ Namespace Editors
|
|||||||
Else
|
Else
|
||||||
COLOR_USER.ColorsGetUser(_UserBackColor, _UserForeColor)
|
COLOR_USER.ColorsGetUser(_UserBackColor, _UserForeColor)
|
||||||
Dim tmpUser As UserInfo = User
|
Dim tmpUser As UserInfo = User
|
||||||
|
Dim accOld$ = tmpUser.AccountName
|
||||||
With tmpUser
|
With tmpUser
|
||||||
.Name = TXT_USER.Text
|
.Name = TXT_USER.Text
|
||||||
.Site = s.Name
|
.Site = s.Name
|
||||||
@@ -411,6 +413,8 @@ Namespace Editors
|
|||||||
If Not sp.IsEmptyString AndAlso Not SpecialPathHandler Is Nothing And UserInstance Is Nothing Then _
|
If Not sp.IsEmptyString AndAlso Not SpecialPathHandler Is Nothing And UserInstance Is Nothing Then _
|
||||||
sp = SpecialPathHandler.Invoke(.Self, sp)
|
sp = SpecialPathHandler.Invoke(.Self, sp)
|
||||||
.SpecialPath = sp
|
.SpecialPath = sp
|
||||||
|
If Not UserInstance Is Nothing Then _
|
||||||
|
SettingsHostCollection.UpdateUserAccount(tmpUser, Settings(.Plugin)(accOld), Settings(.Plugin)(.AccountName), False)
|
||||||
.UpdateUserFile()
|
.UpdateUserFile()
|
||||||
End With
|
End With
|
||||||
User = tmpUser
|
User = tmpUser
|
||||||
@@ -808,14 +812,13 @@ CloseForm:
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub RefillAccounts(ByVal sc As SettingsHostCollection)
|
Private Sub RefillAccounts(ByVal sc As SettingsHostCollection)
|
||||||
Try
|
Try
|
||||||
If Not sc Is Nothing And Not UserIsCollection Then
|
_AccountsRefilling = True
|
||||||
_AccountsRefilling = True
|
With CMB_ACCOUNT
|
||||||
CMB_ACCOUNT.BeginUpdate()
|
.BeginUpdate()
|
||||||
|
.Text = String.Empty
|
||||||
|
.Items.Clear()
|
||||||
|
|
||||||
With CMB_ACCOUNT
|
If Not sc Is Nothing And Not UserIsCollection Then
|
||||||
.BeginUpdate()
|
|
||||||
.Text = String.Empty
|
|
||||||
.Items.Clear()
|
|
||||||
If sc.Count = 1 Then
|
If sc.Count = 1 Then
|
||||||
.Text = SettingsHost.NameAccountNameDefault
|
.Text = SettingsHost.NameAccountNameDefault
|
||||||
.LeaveDefaultButtons = False
|
.LeaveDefaultButtons = False
|
||||||
@@ -824,16 +827,20 @@ CloseForm:
|
|||||||
.LeaveDefaultButtons = True
|
.LeaveDefaultButtons = True
|
||||||
.Items.AddRange(sc.Select(Function(s) New ListItem(s.AccountName.IfNullOrEmpty(SettingsHost.NameAccountNameDefault))))
|
.Items.AddRange(sc.Select(Function(s) New ListItem(s.AccountName.IfNullOrEmpty(SettingsHost.NameAccountNameDefault))))
|
||||||
End If
|
End If
|
||||||
.Buttons.UpdateButtonsPositions(True)
|
Else
|
||||||
.EndUpdate(True)
|
.LeaveDefaultButtons = False
|
||||||
If .Items.Count > 0 Then
|
.Buttons.Clear()
|
||||||
.Enabled = True
|
End If
|
||||||
.SelectedIndex = 0
|
|
||||||
Else
|
.Buttons.UpdateButtonsPositions(True)
|
||||||
.Enabled = False
|
.EndUpdate(True)
|
||||||
End If
|
If .Items.Count > 0 Then
|
||||||
End With
|
.Enabled = True
|
||||||
End If
|
.SelectedIndex = 0
|
||||||
|
Else
|
||||||
|
.Enabled = False
|
||||||
|
End If
|
||||||
|
End With
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[UserCreatorForm.RefillAccounts]")
|
ErrorsDescriber.Execute(EDP.SendToLog, ex, "[UserCreatorForm.RefillAccounts]")
|
||||||
Finally
|
Finally
|
||||||
|
|||||||
@@ -205,19 +205,25 @@ CloseResume:
|
|||||||
Private Sub MainFrame_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
Private Sub MainFrame_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
||||||
If Not _UFinit Then UpdateImageColor()
|
If Not _UFinit Then UpdateImageColor()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub UpdateImageColor()
|
Private ListImageLastWidth As Integer = -1
|
||||||
|
Private Sub UpdateImageColor(Optional ByVal UpdateOnlyImage As Boolean = False)
|
||||||
Try
|
Try
|
||||||
If Settings.UserListImage.Value.Exists Then
|
If Settings.UserListImage.Value.Exists Then
|
||||||
Using ir As New ImageRenderer(Settings.UserListImage) : LIST_PROFILES.BackgroundImage = ir.FitToWidth(LIST_PROFILES.Width) : End Using
|
If Not ListImageLastWidth = LIST_PROFILES.Width Or LIST_PROFILES.BackgroundImage Is Nothing Then
|
||||||
|
ListImageLastWidth = LIST_PROFILES.Width
|
||||||
|
Using ir As New ImageRenderer(Settings.UserListImage) : LIST_PROFILES.BackgroundImage = ir.FitToWidth(LIST_PROFILES.Width) : End Using
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
LIST_PROFILES.BackgroundImage = Nothing
|
LIST_PROFILES.BackgroundImage = Nothing
|
||||||
End If
|
End If
|
||||||
With Settings
|
If Not UpdateOnlyImage Then
|
||||||
If Not .UserListBackColorF = LIST_PROFILES.BackColor Or Not .UserListForeColorF = LIST_PROFILES.ForeColor Then
|
With Settings
|
||||||
LIST_PROFILES.BackColor = .UserListBackColorF
|
If Not .UserListBackColorF = LIST_PROFILES.BackColor Or Not .UserListForeColorF = LIST_PROFILES.ForeColor Then
|
||||||
LIST_PROFILES.ForeColor = .UserListForeColorF
|
LIST_PROFILES.BackColor = .UserListBackColorF
|
||||||
End If
|
LIST_PROFILES.ForeColor = .UserListForeColorF
|
||||||
End With
|
End If
|
||||||
|
End With
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
@@ -281,6 +287,7 @@ CloseResume:
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "List refill, update"
|
#Region "List refill, update"
|
||||||
Friend Sub RefillList()
|
Friend Sub RefillList()
|
||||||
|
UpdateImageColor(True)
|
||||||
UserListLoader.Update()
|
UserListLoader.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub UserListUpdate(ByVal User As IUserData, ByVal Add As Boolean)
|
Private Sub UserListUpdate(ByVal User As IUserData, ByVal Add As Boolean)
|
||||||
@@ -449,6 +456,7 @@ CloseResume:
|
|||||||
DownloadQueue.FormShow(EDP.LogMessageValue)
|
DownloadQueue.FormShow(EDP.LogMessageValue)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If Round = 0 Then
|
If Round = 0 Then
|
||||||
|
ErrorsDescriber.Execute(EDP.SendToLog, ex, "ShowDownloadQueueForm_0")
|
||||||
If Not DownloadQueue Is Nothing Then DownloadQueue.Dispose() : DownloadQueue = Nothing
|
If Not DownloadQueue Is Nothing Then DownloadQueue.Dispose() : DownloadQueue = Nothing
|
||||||
ShowDownloadQueueForm(Round + 1)
|
ShowDownloadQueueForm(Round + 1)
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ Namespace Plugin.Hosts
|
|||||||
Return newHost
|
Return newHost
|
||||||
End Function
|
End Function
|
||||||
Friend Function Clone() As SettingsHost
|
Friend Function Clone() As SettingsHost
|
||||||
Return New SettingsHost(Source.Clone(False), Path, Temporary, DownloadImages, DownloadVideos) With {.SavedPostsPath = SavedPostsPath}
|
Return New SettingsHost(Source.Clone(False), Path, Temporary, DownloadImages, DownloadVideos) With {.SavedPostsPath = SavedPostsPath, .Path = Path}
|
||||||
End Function
|
End Function
|
||||||
#Region "Forks"
|
#Region "Forks"
|
||||||
Friend Function IsMyUser(ByVal UserURL As String) As ExchangeOptions
|
Friend Function IsMyUser(ByVal UserURL As String) As ExchangeOptions
|
||||||
|
|||||||
@@ -230,35 +230,13 @@ Namespace Plugin.Hosts
|
|||||||
Dim tUser As UserInfo
|
Dim tUser As UserInfo
|
||||||
Dim tUserIndx%
|
Dim tUserIndx%
|
||||||
Dim tUserBase As UserDataBase
|
Dim tUserBase As UserDataBase
|
||||||
Dim samePath As Boolean = Obj.Path(False) = Hosts(selectedAcc).Path(False)
|
|
||||||
Dim processUserPath As Boolean
|
|
||||||
For Each tUser In users
|
For Each tUser In users
|
||||||
tUserIndx = .UsersList.IndexOf(tUser)
|
UpdateUserAccount(tUser, Obj, Hosts(selectedAcc), True, tUserIndx)
|
||||||
If tUserIndx = -1 Then
|
tUserBase = .GetUser(tUser)
|
||||||
Throw New KeyNotFoundException("User not found in the collection")
|
tUserBase.AccountName = String.Empty
|
||||||
Else
|
tUserBase.User = tUser
|
||||||
tUserBase = .GetUser(tUser)
|
tUserBase.UpdateUserInformation()
|
||||||
With tUser
|
changedUsers.Add(tUserBase.ToStringForLog)
|
||||||
If Not samePath AndAlso .SpecialPath.IsEmptyString AndAlso .SpecialCollectionPath.IsEmptyString Then
|
|
||||||
processUserPath = False
|
|
||||||
If .IncludedInCollection Then
|
|
||||||
If Not .IsVirtual Then
|
|
||||||
.SpecialCollectionPath = .GetCollectionRootPath
|
|
||||||
Else
|
|
||||||
processUserPath = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Not .IncludedInCollection Or processUserPath Then .SpecialPath = .File.CutPath.PathWithSeparator
|
|
||||||
End If
|
|
||||||
End With
|
|
||||||
tUser.AccountName = Hosts(selectedAcc).AccountName
|
|
||||||
tUser.UpdateUserFile()
|
|
||||||
.UsersList(tUserIndx) = tUser
|
|
||||||
tUserBase.AccountName = String.Empty
|
|
||||||
tUserBase.User = tUser
|
|
||||||
tUserBase.UpdateUserInformation()
|
|
||||||
changedUsers.Add(tUserBase.ToStringForLog)
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
.UpdateUsersList()
|
.UpdateUsersList()
|
||||||
End If
|
End If
|
||||||
@@ -281,6 +259,34 @@ Namespace Plugin.Hosts
|
|||||||
If p <> np Then Settings.Automation.Pause = p
|
If p <> np Then Settings.Automation.Pause = p
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
Friend Shared Sub UpdateUserAccount(ByRef ChangingUser As UserInfo, ByVal HostOld As SettingsHost, ByVal HostNew As SettingsHost,
|
||||||
|
ByVal UpdateUserInTheList As Boolean, Optional ByRef UserIndex As Integer = -1)
|
||||||
|
With Settings
|
||||||
|
UserIndex = .UsersList.IndexOf(ChangingUser)
|
||||||
|
If UserIndex = -1 Then
|
||||||
|
Throw New KeyNotFoundException("User not found in the collection")
|
||||||
|
Else
|
||||||
|
Dim processUserPath As Boolean
|
||||||
|
Dim samePath As Boolean = HostOld.Path(False) = HostNew.Path(False)
|
||||||
|
With ChangingUser
|
||||||
|
If Not samePath AndAlso .SpecialPath.IsEmptyString AndAlso .SpecialCollectionPath.IsEmptyString Then
|
||||||
|
processUserPath = False
|
||||||
|
If .IncludedInCollection Then
|
||||||
|
If Not .IsVirtual Then
|
||||||
|
.SpecialCollectionPath = .GetCollectionRootPath
|
||||||
|
Else
|
||||||
|
processUserPath = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Not .IncludedInCollection Or processUserPath Then .SpecialPath = .File.CutPath.PathWithSeparator
|
||||||
|
End If
|
||||||
|
End With
|
||||||
|
ChangingUser.AccountName = HostNew.AccountName
|
||||||
|
ChangingUser.UpdateUserFile()
|
||||||
|
If UpdateUserInTheList Then .UsersList(UserIndex) = ChangingUser
|
||||||
|
End If
|
||||||
|
End With
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Count, Item"
|
#Region "Count, Item"
|
||||||
Friend ReadOnly Property Count As Integer Implements IMyEnumerator(Of SettingsHost).MyEnumeratorCount
|
Friend ReadOnly Property Count As Integer Implements IMyEnumerator(Of SettingsHost).MyEnumeratorCount
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
|||||||
FeedOpenLastMode = New XMLValue(Of Boolean)("OpenLastMode", False, MyXML, n)
|
FeedOpenLastMode = New XMLValue(Of Boolean)("OpenLastMode", False, MyXML, n)
|
||||||
FeedLastModeSubscriptions = New XMLValue(Of Boolean)("LastModeSubscriptions", False, MyXML, n)
|
FeedLastModeSubscriptions = New XMLValue(Of Boolean)("LastModeSubscriptions", False, MyXML, n)
|
||||||
FeedShowFriendlyNames = New XMLValue(Of Boolean)("ShowFriendlyNames", True, MyXML, n)
|
FeedShowFriendlyNames = New XMLValue(Of Boolean)("ShowFriendlyNames", True, MyXML, n)
|
||||||
|
FeedShowSpecialFeedsMediaItem = New XMLValue(Of Boolean)("ShowSpecialFeedsMediaItem", False, MyXML, n)
|
||||||
|
|
||||||
n = {"Users"}
|
n = {"Users"}
|
||||||
FromChannelDownloadTop = New XMLValue(Of Integer)("FromChannelDownloadTop", 10, MyXML, n)
|
FromChannelDownloadTop = New XMLValue(Of Integer)("FromChannelDownloadTop", 10, MyXML, n)
|
||||||
@@ -923,6 +924,7 @@ Friend Class SettingsCLS : Implements IDownloaderSettings, IDisposable
|
|||||||
Friend ReadOnly Property FeedOpenLastMode As XMLValue(Of Boolean)
|
Friend ReadOnly Property FeedOpenLastMode As XMLValue(Of Boolean)
|
||||||
Friend ReadOnly Property FeedLastModeSubscriptions As XMLValue(Of Boolean)
|
Friend ReadOnly Property FeedLastModeSubscriptions As XMLValue(Of Boolean)
|
||||||
Friend ReadOnly Property FeedShowFriendlyNames As XMLValue(Of Boolean)
|
Friend ReadOnly Property FeedShowFriendlyNames As XMLValue(Of Boolean)
|
||||||
|
Friend ReadOnly Property FeedShowSpecialFeedsMediaItem As XMLValue(Of Boolean)
|
||||||
#End Region
|
#End Region
|
||||||
#Region "New version properties"
|
#Region "New version properties"
|
||||||
Friend ReadOnly Property CheckUpdatesAtStart As XMLValue(Of Boolean)
|
Friend ReadOnly Property CheckUpdatesAtStart As XMLValue(Of Boolean)
|
||||||
|
|||||||
Reference in New Issue
Block a user