Compare commits
5 Commits
2022.9.10.
...
2022.9.24.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
129558c262 | ||
|
|
a3e79eb4bc | ||
|
|
eb28255de3 | ||
|
|
92be0994ae | ||
|
|
9567b0a367 |
53
Changelog.md
@@ -1,3 +1,56 @@
|
||||
# 2022.9.24.0
|
||||
|
||||
*2022-09-24*
|
||||
|
||||
- Added
|
||||
- Ability to copy user data to another destination
|
||||
- Ability to add 'Session' and 'Date' values to the post title in the feed
|
||||
- Minor feed improvements
|
||||
- The newly created collection will now appear at the top of the list (after reopening the form)
|
||||
- Ability to add multiple users at a time to the collection.
|
||||
- Fixed
|
||||
- Autodownloader opens a compressed image instead of a full one
|
||||
- Incorrect resizing of the feed grid after deleting a media file
|
||||
- Incorrect behavior when deleting/removing a user from a collection.
|
||||
- An incorrect function that displayed the number of spent Instagram requests.
|
||||
- Bug in the XVIDEOS downloader
|
||||
- Minor bugs
|
||||
|
||||
# 2022.9.17.0
|
||||
|
||||
*2022-09-17*
|
||||
|
||||
- Added
|
||||
- Added two date filters to filter users (in range, not in range)
|
||||
- (Request #71) Download data for a specific date range
|
||||
- The ability to disable site downloading (in the site settings form)
|
||||
- Updated
|
||||
- Plugins
|
||||
- Fixed
|
||||
- (Issue #71) ```Download data to the date``` doesn't work for Twitter
|
||||
- Download data for a specific date range doesn't work for multiple users
|
||||
- Incorrect feed sorting algorithm
|
||||
- Minor bugs
|
||||
|
||||
# 2022.9.16.0
|
||||
|
||||
*2022-09-16*
|
||||
|
||||
- Fixed
|
||||
- Failed to get video thumbnail for channel video post
|
||||
- Incorrect rendering of the 'Feed' table when the number of columns is more than one
|
||||
- Minor design bugs
|
||||
|
||||
# 2022.9.13.0
|
||||
|
||||
*2022-09-13*
|
||||
|
||||
- Added
|
||||
- Video duration to the feed
|
||||
- Fixed
|
||||
- (Issue #70) Instagram posts not downloading if there are pinned posts that have already been downloaded
|
||||
- Minor bugs
|
||||
|
||||
# 2022.9.10.0
|
||||
|
||||
*2022-09-10*
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 370 KiB |
|
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 381 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
BIN
ProgramScreenshots/SettingsSiteRedGifs.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
@@ -8,6 +8,8 @@
|
||||
|
||||
A program to download photo and video from [any site](#supported-sites) (e.g. Reddit, Twitter, Instagram).
|
||||
|
||||
**If you like SCrawler, please like the program on [this site]( https://alternativeto.net/software/scrawler/about/)**
|
||||
|
||||
Do you like this program? Consider adding to my coffee fund by making a donation to show your support. :blush:
|
||||
|
||||
[](https://ko-fi.com/andyprogram)
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyVersion("2022.9.17.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.17.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -38,7 +38,8 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder
|
||||
Public Property DataPath As String Implements IPluginContentProvider.DataPath
|
||||
Public Property PostsNumberLimit As Integer? Implements IPluginContentProvider.PostsNumberLimit
|
||||
Public Property PostsDateLimit As Date? Implements IPluginContentProvider.PostsDateLimit
|
||||
Public Property DownloadDateFrom As Date? Implements IPluginContentProvider.DownloadDateFrom
|
||||
Public Property DownloadDateTo As Date? Implements IPluginContentProvider.DownloadDateTo
|
||||
#End Region
|
||||
#Region "Interface exchange options"
|
||||
Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyVersion("2022.9.24.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.24.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -35,7 +35,7 @@ Public Class SettingsForm
|
||||
Settings.UpdateDomains()
|
||||
MyDefs.CloseForm()
|
||||
End Sub
|
||||
Private Sub MyDefs_ButtonAddClick(ByVal Sender As Object, ByVal e As EditToolbar.EditToolbarEventArgs) Handles MyDefs.ButtonAddClick
|
||||
Private Sub MyDefs_ButtonAddClick(ByVal Sender As Object, ByVal e As EditToolbarEventArgs) Handles MyDefs.ButtonAddClick
|
||||
Dim nd$ = InputBoxE("Enter a new domain using the pattern [xvideos.com]:", "New domain")
|
||||
If Not nd.IsEmptyString Then
|
||||
If Not LIST_DOMAINS.Items.Contains(nd) Then
|
||||
@@ -45,7 +45,7 @@ Public Class SettingsForm
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub MyDefs_ButtonDeleteClickE(ByVal Sender As Object, ByVal e As EditToolbar.EditToolbarEventArgs) Handles MyDefs.ButtonDeleteClickE
|
||||
Private Sub MyDefs_ButtonDeleteClickE(ByVal Sender As Object, ByVal e As EditToolbarEventArgs) Handles MyDefs.ButtonDeleteClickE
|
||||
If _LatestSelected.ValueBetween(0, LIST_DOMAINS.Items.Count - 1) Then
|
||||
Dim n$ = LIST_DOMAINS.Items(_LatestSelected)
|
||||
If MsgBoxE({$"Are you sure you want to delete the [{n}] domain?", "Removing domains"}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
|
||||
@@ -37,7 +37,8 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder
|
||||
Public Property DataPath As String Implements IPluginContentProvider.DataPath
|
||||
Public Property PostsNumberLimit As Integer? Implements IPluginContentProvider.PostsNumberLimit
|
||||
Public Property PostsDateLimit As Date? Implements IPluginContentProvider.PostsDateLimit
|
||||
Public Property DownloadDateFrom As Date? Implements IPluginContentProvider.DownloadDateFrom
|
||||
Public Property DownloadDateTo As Date? Implements IPluginContentProvider.DownloadDateTo
|
||||
#End Region
|
||||
#Region "Interface exchange options"
|
||||
Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet
|
||||
@@ -70,7 +71,7 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
|
||||
Dim NextPage% = 0
|
||||
Dim r$
|
||||
Dim j As EContainer, jj As EContainer
|
||||
Dim jj As EContainer
|
||||
Dim e As ErrorsDescriber = EDP.ThrowException
|
||||
Dim user$ = Settings.GetUserUrl(Name, False)
|
||||
Dim p As PluginUserMedia
|
||||
@@ -81,8 +82,7 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
r = Responser.GetResponse($"https://www.xvideos.com/{user}/videos/new/{If(NextPage = 0, String.Empty, NextPage)}",, e)
|
||||
If Not r.IsEmptyString Then
|
||||
If Not EnvirSet Then UserExists = True : UserSuspended = False : EnvirSet = True
|
||||
j = JsonDocument.Parse(r).XmlIfNothing
|
||||
With j
|
||||
With JsonDocument.Parse(r).XmlIfNothing
|
||||
If .Contains("videos") Then
|
||||
With .Item("videos")
|
||||
If .Count > 0 Then
|
||||
@@ -93,9 +93,12 @@ Public Class UserData : Implements IPluginContentProvider
|
||||
.URL = $"https://www.xvideos.com{jj.Value("u")}"
|
||||
}
|
||||
If Not p.PostID.IsEmptyString And Not jj.Value("u").IsEmptyString Then
|
||||
If Not TempPostsList.Contains(p.PostID) Then TempPostsList.Add(p.PostID) : TempMediaList.Add(p) Else Exit Do
|
||||
If Not TempPostsList.Contains(p.PostID) Then TempPostsList.Add(p.PostID) : TempMediaList.Add(p) Else .Dispose() : Exit Do
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
.Dispose()
|
||||
Exit Do
|
||||
End If
|
||||
End With
|
||||
Else
|
||||
|
||||
@@ -26,7 +26,8 @@ Namespace Plugin
|
||||
Property SeparateVideoFolder As Boolean
|
||||
Property DataPath As String
|
||||
Property PostsNumberLimit As Integer?
|
||||
Property PostsDateLimit As Date?
|
||||
Property DownloadDateFrom As Date?
|
||||
Property DownloadDateTo As Date?
|
||||
Function ExchangeOptionsGet() As Object
|
||||
Sub ExchangeOptionsSet(ByVal Obj As Object)
|
||||
Sub XmlFieldsSet(ByVal Fields As List(Of KeyValuePair(Of String, String)))
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyVersion("2022.9.17.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.17.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -550,23 +550,31 @@ BlockNullPicture:
|
||||
End Function
|
||||
Friend Overridable ReadOnly Property FitToAddParams As Boolean Implements IUserData.FitToAddParams
|
||||
Get
|
||||
If Settings.LastUpdatedDate.HasValue AndAlso LastUpdated.HasValue AndAlso
|
||||
LastUpdated.Value.Date > Settings.LastUpdatedDate.Value.Date Then Return False
|
||||
If Not Settings.Labels.ExcludedIgnore AndAlso Settings.Labels.Excluded.ValuesList.ListContains(Labels) Then Return False
|
||||
If Settings.SelectedSites.Count = 0 OrElse Settings.SelectedSites.Contains(Site) Then
|
||||
Select Case Settings.ShowingMode.Value
|
||||
Case ShowingModes.Regular : Return Not Temporary And Not Favorite
|
||||
Case ShowingModes.Temporary : Return Temporary
|
||||
Case ShowingModes.Favorite : Return Favorite
|
||||
Case ShowingModes.Deleted : Return Not UserExists
|
||||
Case ShowingModes.Suspended : Return UserSuspended
|
||||
Case ShowingModes.Labels : Return Settings.Labels.Current.ValuesList.ListContains(Labels)
|
||||
Case ShowingModes.NoLabels : Return Labels.Count = 0
|
||||
Case Else : Return True
|
||||
End Select
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
With Settings
|
||||
If LastUpdated.HasValue And Not .ViewDateMode.Value = ShowingDates.Off Then
|
||||
Dim f As Date = If(.ViewDateFrom.HasValue, .ViewDateFrom.Value.Date, Date.MinValue.Date)
|
||||
Dim t As Date = If(.ViewDateTo.HasValue, .ViewDateTo.Value.Date, Date.MaxValue.Date)
|
||||
Select Case DirectCast(.ViewDateMode.Value, ShowingDates)
|
||||
Case ShowingDates.In : If Not LastUpdated.Value.ValueBetween(f, t) Then Return False
|
||||
Case ShowingDates.Not : If LastUpdated.Value.ValueBetween(f, t) Then Return False
|
||||
End Select
|
||||
End If
|
||||
If Not .Labels.ExcludedIgnore AndAlso .Labels.Excluded.ValuesList.ListContains(Labels) Then Return False
|
||||
If .SelectedSites.Count = 0 OrElse .SelectedSites.Contains(Site) Then
|
||||
Select Case .ShowingMode.Value
|
||||
Case ShowingModes.Regular : Return Not Temporary And Not Favorite
|
||||
Case ShowingModes.Temporary : Return Temporary
|
||||
Case ShowingModes.Favorite : Return Favorite
|
||||
Case ShowingModes.Deleted : Return Not UserExists
|
||||
Case ShowingModes.Suspended : Return UserSuspended
|
||||
Case ShowingModes.Labels : Return Settings.Labels.Current.ValuesList.ListContains(Labels)
|
||||
Case ShowingModes.NoLabels : Return Labels.Count = 0
|
||||
Case Else : Return True
|
||||
End Select
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End With
|
||||
End Get
|
||||
End Property
|
||||
Friend Function GetLVIGroup(ByVal Destination As ListView) As ListViewGroup Implements IUserData.GetLVIGroup
|
||||
@@ -792,9 +800,52 @@ BlockNullPicture:
|
||||
GlobalOpenPath(MyFile.CutPath)
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Download functions and options"
|
||||
#Region "Download limits"
|
||||
Protected Enum DateResult : [Continue] : [Skip] : [Exit] : End Enum
|
||||
Friend Overridable Property DownloadTopCount As Integer? = Nothing Implements IUserData.DownloadTopCount, IPluginContentProvider.PostsNumberLimit
|
||||
Friend Overridable Property DownloadToDate As Date? = Nothing Implements IUserData.DownloadToDate, IPluginContentProvider.PostsDateLimit
|
||||
Private _DownloadDateFrom As Date? = Nothing
|
||||
Private _DownloadDateFromF As Date
|
||||
Friend Overridable Property DownloadDateFrom As Date? Implements IUserData.DownloadDateFrom, IPluginContentProvider.DownloadDateFrom
|
||||
Get
|
||||
Return _DownloadDateFrom
|
||||
End Get
|
||||
Set(ByVal d As Date?)
|
||||
_DownloadDateFrom = d
|
||||
If _DownloadDateFrom.HasValue Then _DownloadDateFromF = _DownloadDateFrom.Value.Date Else _DownloadDateFromF = Date.MinValue.Date
|
||||
End Set
|
||||
End Property
|
||||
Private _DownloadDateTo As Date? = Nothing
|
||||
Private _DownloadDateToF As Date
|
||||
Friend Overridable Property DownloadDateTo As Date? Implements IUserData.DownloadDateTo, IPluginContentProvider.DownloadDateTo
|
||||
Get
|
||||
Return _DownloadDateTo
|
||||
End Get
|
||||
Set(ByVal d As Date?)
|
||||
_DownloadDateTo = d
|
||||
If _DownloadDateTo.HasValue Then _DownloadDateToF = _DownloadDateTo.Value Else _DownloadDateToF = Date.MaxValue.Date
|
||||
End Set
|
||||
End Property
|
||||
Protected Function CheckDatesLimit(ByVal DateString As String, ByVal DateProvider As IFormatProvider) As DateResult
|
||||
Try
|
||||
If (DownloadDateFrom.HasValue Or DownloadDateTo.HasValue) And Not DateString.IsEmptyString Then
|
||||
Dim td As Date? = AConvert(Of Date)(DateString, DateProvider, Nothing)
|
||||
If td.HasValue Then
|
||||
If td.Value.ValueBetween(_DownloadDateFromF, _DownloadDateToF) Then
|
||||
Return DateResult.Continue
|
||||
ElseIf td.Value > _DownloadDateToF Then
|
||||
Return DateResult.Skip
|
||||
Else
|
||||
Return DateResult.Exit
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return DateResult.Continue
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[UserDataBase.CheckDatesLimit({DateString})]", DateResult.Continue)
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Download functions and options"
|
||||
Protected Responser As Response
|
||||
Friend Overridable Sub DownloadData(ByVal Token As CancellationToken) Implements IContentProvider.DownloadData
|
||||
Dim Canceled As Boolean = False
|
||||
@@ -828,9 +879,10 @@ BlockNullPicture:
|
||||
DownloadDataF(Token)
|
||||
ThrowAny(Token)
|
||||
Else
|
||||
'PENDING: UserDataBase ReparseMissing (DownloadDataF)
|
||||
'ReparseMissing(Token)
|
||||
End If
|
||||
_TempMediaList.ListAddList(ContentMissing, LNC)
|
||||
'_TempMediaList.ListAddList(ContentMissing, LNC)
|
||||
|
||||
If _TempMediaList.Count > 0 Then
|
||||
If Not DownloadImages Then _TempMediaList.RemoveAll(Function(m) m.Type = UTypes.GIF Or m.Type = UTypes.Picture)
|
||||
@@ -845,9 +897,12 @@ BlockNullPicture:
|
||||
_ContentNew.ListAddList(_TempMediaList, LAP.ClearBeforeAdd)
|
||||
DownloadContent(Token)
|
||||
ThrowIfDisposed()
|
||||
|
||||
LatestData.ListAddList(_ContentNew.Where(_downContent), LNC)
|
||||
Dim mcb& = If(ContentMissingExists, _ContentList.LongCount(Function(c) MissingFinder(c)), 0)
|
||||
_ContentList.ListAddList(_ContentNew.Where(Function(c) _downContent(c) Or MissingFinder(c)), LNC)
|
||||
If DownloadedTotal(False) > 0 Or EnvirChanged.Invoke Or _ContentList.Exists(MissingFinder) Then
|
||||
Dim mca& = If(ContentMissingExists, _ContentList.LongCount(Function(c) MissingFinder(c)), 0)
|
||||
If DownloadedTotal(False) > 0 Or EnvirChanged.Invoke Or Not mcb = mca Then
|
||||
If __SaveData Then
|
||||
LastUpdated = Now
|
||||
RunScript()
|
||||
@@ -880,21 +935,11 @@ BlockNullPicture:
|
||||
If Not Canceled Then _DataParsed = True
|
||||
_ContentNew.Clear()
|
||||
DownloadTopCount = Nothing
|
||||
DownloadToDate = Nothing
|
||||
DownloadDateFrom = Nothing
|
||||
DownloadDateTo = Nothing
|
||||
DownloadMissingOnly = False
|
||||
End Try
|
||||
End Sub
|
||||
Protected Function CheckDatesLimit(ByVal DateString As String, ByVal DateProvider As IFormatProvider) As Boolean
|
||||
Try
|
||||
If DownloadToDate.HasValue And Not DateString.IsEmptyString Then
|
||||
Dim td As Date? = AConvert(Of Date)(DateString, DateProvider, Nothing)
|
||||
If td.HasValue Then Return td.Value < DownloadToDate.Value
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[UserDataBase.CheckDatesLimit({DateString})]", True)
|
||||
End Try
|
||||
End Function
|
||||
Protected Sub UpdateDataFiles()
|
||||
If Not User.File.IsEmptyString Then
|
||||
MyFileData = User.File
|
||||
@@ -1056,14 +1101,14 @@ BlockNullPicture:
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Delete, Move, Merge"
|
||||
#Region "Delete, Move, Merge, Copy"
|
||||
Friend Overridable Function Delete() As Integer Implements IUserData.Delete
|
||||
Dim f As SFile = SFile.GetPath(MyFile.CutPath.Path)
|
||||
If f.Exists(SFO.Path, False) AndAlso (User.Merged OrElse f.Delete(SFO.Path, Settings.DeleteMode)) Then
|
||||
MainFrameObj.ImageHandler(Me, False)
|
||||
If Not IncludedInCollection Then MainFrameObj.ImageHandler(Me, False)
|
||||
Settings.UsersList.Remove(User)
|
||||
Settings.UpdateUsersList()
|
||||
Settings.Users.Remove(Me)
|
||||
If Not IncludedInCollection Then Settings.Users.Remove(Me)
|
||||
Downloader.UserRemove(Me)
|
||||
Dispose(True)
|
||||
Return 1
|
||||
@@ -1180,6 +1225,48 @@ BlockNullPicture:
|
||||
End If
|
||||
Return f
|
||||
End Function
|
||||
Private Class FilesCopyingException : Inherits ErrorsDescriberException
|
||||
Friend Sub New(ByVal User As IUserData, ByVal Msg As String, ByVal Path As SFile)
|
||||
SendInLogOnlyMessage = True
|
||||
If User.IncludedInCollection Then _MainMessage = $"[{User.CollectionName}] - "
|
||||
_MainMessage &= $"[{User.Site}] - [{User.Name}]. {Msg}: {Path.Path}."
|
||||
End Sub
|
||||
End Class
|
||||
Friend Overridable Function CopyFiles(ByVal DestinationPath As SFile, Optional ByVal e As ErrorsDescriber = Nothing) As Boolean Implements IUserData.CopyFiles
|
||||
Dim fSource As SFile = Nothing
|
||||
Dim fDest As SFile = Nothing
|
||||
Try
|
||||
Dim pOffset%
|
||||
If IncludedInCollection Then
|
||||
If DataMerging Then pOffset = 1 Else pOffset = 2
|
||||
Else
|
||||
pOffset = 1
|
||||
End If
|
||||
fSource = User.File.CutPath(pOffset).Path.CSFileP
|
||||
|
||||
Dim OptPath$ = String.Empty
|
||||
If IncludedInCollection Then
|
||||
OptPath = $"Collections\{CollectionName}" 'Copying a collection based on the first file
|
||||
Else
|
||||
OptPath = $"{Site}\{Name}"
|
||||
End If
|
||||
fDest = $"{DestinationPath.PathWithSeparator}{OptPath}".CSFileP
|
||||
If fDest.Exists(SFO.Path, False) AndAlso MsgBoxE({$"The following path already exists:{vbCr}{fDest.Path}" & vbCr &
|
||||
"Do you want to copy files here?", "Copying files"}, vbExclamation + vbYesNo) = vbNo Then _
|
||||
Throw New FilesCopyingException(Me, "The following path already exists", fDest)
|
||||
|
||||
If DestinationPath.Exists(SFO.Path, True) Then
|
||||
My.Computer.FileSystem.CopyDirectory(fSource, fDest, FileIO.UIOption.OnlyErrorDialogs, FileIO.UICancelOption.ThrowException)
|
||||
Else
|
||||
Throw New FilesCopyingException(Me, "Cannot create the following path", fDest)
|
||||
End If
|
||||
Return True
|
||||
Catch cex As OperationCanceledException
|
||||
Return ErrorsDescriber.Execute(e, New FilesCopyingException(Me, "Copy canceled", fDest),, False)
|
||||
Catch ex As Exception
|
||||
Return ErrorsDescriber.Execute(e, ex,, False)
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Errors functions"
|
||||
Protected Sub LogError(ByVal ex As Exception, ByVal Message As String)
|
||||
@@ -1210,6 +1297,16 @@ BlockNullPicture:
|
||||
Return IIf(FriendlyName.IsEmptyString, Name, FriendlyName)
|
||||
End If
|
||||
End Function
|
||||
Public Overrides Function GetHashCode() As Integer
|
||||
Dim hcStr$
|
||||
If Not CollectionName.IsEmptyString Then
|
||||
hcStr = CollectionName
|
||||
Else
|
||||
hcStr = IIf(FriendlyName.IsEmptyString, Name, FriendlyName)
|
||||
End If
|
||||
If hcStr.IsEmptyString Then hcStr = LVIKey
|
||||
Return hcStr.GetHashCode
|
||||
End Function
|
||||
#Region "Buttons actions"
|
||||
Private Sub BTT_CONTEXT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DOWN.Click
|
||||
Downloader.Add(Me)
|
||||
@@ -1344,10 +1441,12 @@ BlockNullPicture:
|
||||
''' </summary>
|
||||
Function Delete() As Integer
|
||||
Function MoveFiles(ByVal CollectionName As String) As Boolean
|
||||
Function CopyFiles(ByVal DestinationPath As SFile, Optional ByVal e As ErrorsDescriber = Nothing) As Boolean
|
||||
Sub OpenFolder()
|
||||
ReadOnly Property Self As IUserData
|
||||
Property DownloadTopCount As Integer?
|
||||
Property DownloadToDate As Date?
|
||||
Property DownloadDateFrom As Date?
|
||||
Property DownloadDateTo As Date?
|
||||
Sub SetEnvironment(ByRef h As SettingsHost, ByVal u As UserInfo, ByVal _LoadUserInformation As Boolean,
|
||||
Optional ByVal AttachUserInfo As Boolean = True)
|
||||
ReadOnly Property Disposed As Boolean
|
||||
|
||||
@@ -233,7 +233,7 @@ Namespace API.Instagram
|
||||
LastDownloadDate = New XMLValue(Of Date)("LastDownloadDate", Now.AddDays(-1), _XML, n)
|
||||
LastRequestsCount = New XMLValue(Of Integer)("LastRequestsCount", 0, _XML, n)
|
||||
LastRequestsCountLabel = New PropertyValue(LastRequestsCountLabelStr.Invoke(LastRequestsCount.Value))
|
||||
AddHandler LastRequestsCount.OnValueChanged, Sub(sender, __name, __value) LastRequestsCountLabel.Value = LastRequestsCountLabelStr.Invoke(__value)
|
||||
AddHandler LastRequestsCount.OnValueChanged, Sub(sender, __name, __value) LastRequestsCountLabel.Value = LastRequestsCountLabelStr.Invoke(DirectCast(__value, Existable(Of Integer)).Value)
|
||||
|
||||
UrlPatternUser = "https://www.instagram.com/{0}/"
|
||||
UserRegex = RParams.DMS("[htps:/]{7,8}.*?instagram.com/([^/]+)", 1)
|
||||
|
||||
@@ -247,6 +247,7 @@ Namespace API.Instagram
|
||||
Try
|
||||
Dim n As EContainer, nn As EContainer, node As EContainer
|
||||
Dim HasNextPage As Boolean = False
|
||||
Dim Pinned As Boolean
|
||||
Dim EndCursor$ = String.Empty
|
||||
Dim PostID$ = String.Empty, PostDate$ = String.Empty, SpecFolder$ = String.Empty
|
||||
Dim TaggedCount%
|
||||
@@ -296,7 +297,7 @@ Namespace API.Instagram
|
||||
RequestsCount += 1
|
||||
ThrowAny(Token)
|
||||
|
||||
'Data
|
||||
'Parsing
|
||||
If Not r.IsEmptyString Then
|
||||
Using j As EContainer = JsonDocument.Parse(r).XmlIfNothing
|
||||
n = j.ItemF(ENode).XmlIfNothing
|
||||
@@ -321,13 +322,17 @@ Namespace API.Instagram
|
||||
End If
|
||||
End If
|
||||
PostID = node.Value("id")
|
||||
If Not PostID.IsEmptyString And _TempPostsList.Contains(PostID) Then Throw New ExitException(_DownloadComplete)
|
||||
Pinned = CBool(If(node("pinned_for_users")?.Count, 0))
|
||||
If Not PostID.IsEmptyString And _TempPostsList.Contains(PostID) And Not Pinned Then Throw New ExitException(_DownloadComplete)
|
||||
_TempPostsList.Add(PostID)
|
||||
PostDate = node.Value("taken_at_timestamp")
|
||||
If IsSavedPosts Then
|
||||
_SavedPostsIDs.Add(PostID)
|
||||
Else
|
||||
If Not CheckDatesLimit(PostDate, DateProvider) Then Throw New ExitException(_DownloadComplete)
|
||||
Select Case CheckDatesLimit(PostDate, DateProvider)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : If Not Pinned Then Throw New ExitException(_DownloadComplete)
|
||||
End Select
|
||||
ObtainMedia(node, PostID, PostDate, SpecFolder)
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -150,6 +150,7 @@ Namespace API.Reddit
|
||||
End Sub
|
||||
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||
_TotalPostsDownloaded = 0
|
||||
'PENDING: Reddit ReparseMissing (DownloadDataF)
|
||||
'If Not IsSavedPosts AndAlso (Not IsChannel OrElse ChannelInfo Is Nothing) Then ReparseMissing(Token)
|
||||
If IsSavedPosts Then
|
||||
DownloadDataChannel(String.Empty, Token)
|
||||
@@ -164,6 +165,8 @@ Namespace API.Reddit
|
||||
End If
|
||||
If DownloadTopCount.HasValue Then DownloadLimitCount = DownloadTopCount
|
||||
End If
|
||||
If SaveToCache AndAlso Not Responser.Decoders.Contains(SymbolsConverter.Converters.HTML) Then _
|
||||
Responser.Decoders.Add(SymbolsConverter.Converters.HTML)
|
||||
DownloadDataChannel(String.Empty, Token)
|
||||
If ChannelInfo Is Nothing Then _TempPostsList.ListAddList(_TempMediaList.Select(Function(m) m.Post.ID), LNC)
|
||||
Else
|
||||
@@ -228,7 +231,10 @@ Namespace API.Reddit
|
||||
Continue For
|
||||
End If
|
||||
If nn.Contains("created") Then PostDate = nn("created").Value Else PostDate = String.Empty
|
||||
If DownloadToDate.HasValue AndAlso Not CheckDatesLimit(PostDate, DateTrueProvider(IsChannel)) Then Exit Sub
|
||||
Select Case CheckDatesLimit(PostDate, DateTrueProvider(IsChannel))
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
|
||||
_ItemsBefore = _TempMediaList.Count
|
||||
added = True
|
||||
@@ -371,9 +377,11 @@ Namespace API.Reddit
|
||||
ElseIf Not s.Value({"media", "reddit_video"}, "fallback_url").IsEmptyString Then
|
||||
tmpUrl = s.Value({"media", "reddit_video"}, "fallback_url")
|
||||
If SaveToCache Then
|
||||
tmpUrl = s.Value("thumbnail")
|
||||
'TODELETE: Reddit thumbnail -> GetVideoRedditPreview
|
||||
'tmpUrl = s.Value("thumbnail")
|
||||
tmpUrl = GetVideoRedditPreview(s)
|
||||
If Not tmpUrl.IsEmptyString Then
|
||||
_TempMediaList.ListAddValue(MediaFromData(UTypes.Picture, tmpUrl, PostID, PostDate, _UserID, IsChannel), LNC)
|
||||
_TempMediaList.ListAddValue(MediaFromData(UTypes.Picture, tmpUrl, PostID, PostDate, _UserID, IsChannel, False), LNC)
|
||||
_TotalPostsDownloaded += 1
|
||||
End If
|
||||
ElseIf UseM3U8 AndAlso Not s.Value({"media", "reddit_video"}, "hls_url").IsEmptyString Then
|
||||
@@ -471,6 +479,38 @@ Namespace API.Reddit
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function GetVideoRedditPreview(ByVal Node As EContainer) As String
|
||||
Try
|
||||
If Not Node Is Nothing Then
|
||||
Dim n As EContainer = Node.ItemF({"preview", "images", 0})
|
||||
Dim DestNode$() = Nothing
|
||||
If If(n?.Count, 0) > 0 Then
|
||||
If If(n("resolutions")?.Count, 0) > 0 Then
|
||||
DestNode = {"resolutions"}
|
||||
ElseIf If(n({"variants", "nsfw", "resolutions"})?.Count, 0) > 0 Then
|
||||
DestNode = {"variants", "nsfw", "resolutions"}
|
||||
End If
|
||||
If Not DestNode Is Nothing Then
|
||||
With n(DestNode)
|
||||
Dim sl As List(Of Sizes) = .Select(Function(e) New Sizes(e.Value("width"), e.Value("url"))).
|
||||
ListWithRemove(Function(ss) ss.HasError Or ss.Data.IsEmptyString)
|
||||
If sl.ListExists Then
|
||||
Dim s As Sizes
|
||||
sl.Sort()
|
||||
s = sl.First
|
||||
sl.Clear()
|
||||
Return s.Data
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return String.Empty
|
||||
Catch ex As Exception
|
||||
ProcessException(ex, Nothing, "reddit video preview parsing error", False)
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
Protected Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
|
||||
Try
|
||||
ThrowAny(Token)
|
||||
@@ -593,12 +633,13 @@ Namespace API.Reddit
|
||||
#End Region
|
||||
#Region "Structure creator"
|
||||
Protected Shared Function MediaFromData(ByVal t As UTypes, ByVal _URL As String, ByVal PostID As String, ByVal PostDate As String,
|
||||
Optional ByVal _UserID As String = "", Optional ByVal IsChannel As Boolean = False) As UserMedia
|
||||
Optional ByVal _UserID As String = "", Optional ByVal IsChannel As Boolean = False,
|
||||
Optional ByVal ReplacePreview As Boolean = True) As UserMedia
|
||||
If _URL.IsEmptyString And t = UTypes.Picture Then Return Nothing
|
||||
_URL = LinkFormatterSecure(RegexReplace(_URL.Replace("\", String.Empty), LinkPattern))
|
||||
Dim m As New UserMedia(_URL, t) With {.Post = New UserPost With {.ID = PostID, .UserID = _UserID}}
|
||||
If t = UTypes.Picture Or t = UTypes.GIF Then m.File = UrlToFile(m.URL) Else m.File = Nothing
|
||||
If m.URL.Contains("preview") Then m.URL = $"https://i.redd.it/{m.File.File}"
|
||||
If ReplacePreview And m.URL.Contains("preview") Then m.URL = $"https://i.redd.it/{m.File.File}"
|
||||
If Not PostDate.IsEmptyString Then m.Post.Date = AConvert(Of Date)(PostDate, DateTrueProvider(IsChannel), Nothing) Else m.Post.Date = Nothing
|
||||
Return m
|
||||
End Function
|
||||
|
||||
@@ -39,6 +39,7 @@ Namespace API.RedGifs
|
||||
Return $"https://www.redgifs.com/watch/{PostID}"
|
||||
End Function
|
||||
Friend Overrides Function Available(ByVal What As ISiteSettings.Download, ByVal Silent As Boolean) As Boolean
|
||||
'PENDING: RedGifs SiteSettings Available FALSE
|
||||
Return False
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -37,7 +37,10 @@ Namespace API.RedGifs
|
||||
pTotal = j.Value("pages").FromXML(Of Integer)(0)
|
||||
For Each g As EContainer In j("gifs")
|
||||
postDate = g.Value("createDate")
|
||||
If Not CheckDatesLimit(postDate, DateProvider) Then Exit Sub
|
||||
Select Case CheckDatesLimit(postDate, DateProvider)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
postID = g.Value("id")
|
||||
If Not _TempPostsList.Contains(postID) Then _TempPostsList.Add(postID) Else Exit For
|
||||
ObtainMedia(g, postID, postDate)
|
||||
|
||||
@@ -34,6 +34,7 @@ Namespace API.Twitter
|
||||
Else
|
||||
If _ContentList.Count > 0 Then _DataNames.ListAddList(_ContentList.Select(Function(c) c.File.File), LAP.ClearBeforeAdd, LAP.NotContainsOnly)
|
||||
DownloadData(String.Empty, Token)
|
||||
'PENDING: Twitter ReparseMissing (DownloadDataF)
|
||||
'ReparseMissing(Token)
|
||||
End If
|
||||
End Sub
|
||||
@@ -86,7 +87,10 @@ Namespace API.Twitter
|
||||
'Date Pattern:
|
||||
'Sat Jan 01 01:10:15 +0000 2000
|
||||
If nn.Contains("created_at") Then PostDate = nn("created_at").Value Else PostDate = String.Empty
|
||||
If Not CheckDatesLimit(PostDate, Declarations.DateProvider) Then Exit Sub
|
||||
Select Case CheckDatesLimit(PostDate, Declarations.DateProvider)
|
||||
Case DateResult.Skip : Continue For
|
||||
Case DateResult.Exit : Exit Sub
|
||||
End Select
|
||||
|
||||
If Not _TempPostsList.Contains(PostID) Then
|
||||
NewPostDetected = True
|
||||
@@ -98,6 +102,7 @@ Namespace API.Twitter
|
||||
|
||||
If IsSavedPosts OrElse Not ParseUserMediaOnly OrElse (Not nn.Contains("retweeted_status") OrElse
|
||||
(Not ID.IsEmptyString AndAlso UID(nn("retweeted_status")) = ID)) Then
|
||||
'TODELETE: Twitter ObtainMedia
|
||||
'If Not CheckVideoNode(nn, PostID, PostDate) Then
|
||||
' s = nn.ItemF({"extended_entities", "media"})
|
||||
' If s Is Nothing OrElse s.Count = 0 Then s = nn.ItemF({"retweeted_status", "extended_entities", "media"})
|
||||
@@ -158,6 +163,7 @@ Namespace API.Twitter
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub ReparseMissing(ByVal Token As CancellationToken)
|
||||
'PENDING: Twitter ReparseMissing verify
|
||||
Dim rList As New List(Of Integer)
|
||||
Dim URL$ = String.Empty
|
||||
Try
|
||||
|
||||
@@ -346,6 +346,14 @@ Namespace API
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
Private Sub CopyTo(ByVal _Array() As IUserData, ByVal _ArrayIndex As Integer) Implements ICollection(Of IUserData).CopyTo
|
||||
Throw New NotImplementedException("[CopyTo] method does not supported in collections context")
|
||||
End Sub
|
||||
Friend Sub Clear() Implements ICollection(Of IUserData).Clear
|
||||
Collections.ListClearDispose
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Add"
|
||||
''' <exception cref="InvalidOperationException"></exception>
|
||||
Friend Overloads Sub Add(ByVal _Item As IUserData) Implements ICollection(Of IUserData).Add
|
||||
With _Item
|
||||
@@ -413,6 +421,8 @@ Namespace API
|
||||
For i% = 0 To _Items.Count - 1 : Add(_Items(i)) : Next
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Move, Merge"
|
||||
Friend Overrides Function MoveFiles(ByVal __CollectionName As String) As Boolean
|
||||
Throw New NotImplementedException("Move files is not available in the collection context")
|
||||
End Function
|
||||
@@ -440,15 +450,8 @@ Namespace API
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Friend Sub Clear() Implements ICollection(Of IUserData).Clear
|
||||
Collections.ListClearDispose
|
||||
End Sub
|
||||
Friend Function Contains(ByVal _Item As IUserData) As Boolean Implements ICollection(Of IUserData).Contains
|
||||
Return Count > 0 AndAlso Collections.Contains(_Item)
|
||||
End Function
|
||||
Private Sub CopyTo(ByVal _Array() As IUserData, ByVal _ArrayIndex As Integer) Implements ICollection(Of IUserData).CopyTo
|
||||
Throw New NotImplementedException("[CopyTo] method does not supported in collections context")
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Remove, Delete"
|
||||
Friend Function Remove(ByVal _Item As IUserData) As Boolean Implements ICollection(Of IUserData).Remove
|
||||
If DataMerging Then
|
||||
MsgBoxE($"Collection [{CollectionName}] data is already merged" & vbCr &
|
||||
@@ -547,6 +550,17 @@ Namespace API
|
||||
End If
|
||||
End With
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Copy"
|
||||
Friend Overrides Function CopyFiles(ByVal DestinationPath As SFile, Optional ByVal e As ErrorsDescriber = Nothing) As Boolean
|
||||
Return Count > 0 AndAlso Collections(0).CopyFiles(DestinationPath, e)
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Contains"
|
||||
Friend Function Contains(ByVal _Item As IUserData) As Boolean Implements ICollection(Of IUserData).Contains
|
||||
Return Count > 0 AndAlso Collections.Contains(_Item)
|
||||
End Function
|
||||
#End Region
|
||||
#Region "IEnumerable Support"
|
||||
Private Function GetEnumerator() As IEnumerator(Of IUserData) Implements IEnumerable(Of IUserData).GetEnumerator
|
||||
Return New MyEnumerator(Of IUserData)(Me)
|
||||
@@ -554,7 +568,6 @@ Namespace API
|
||||
Private Function IEnumerable_GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
|
||||
Return GetEnumerator()
|
||||
End Function
|
||||
#End Region
|
||||
#End Region
|
||||
Friend Overrides Function Equals(ByVal Other As UserDataBase) As Boolean
|
||||
If Other.IsCollection Then
|
||||
|
||||
BIN
SCrawler/Content/Pictures/PastePic32.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
SCrawler/Content/Pictures/StopPic32.png
Normal file
|
After Width: | Height: | Size: 652 B |
@@ -84,12 +84,14 @@ Namespace DownloadObjects
|
||||
Using Notify As New Notification(Text, Title) With {.Key = Key}
|
||||
Dim uPic As SFile = Nothing
|
||||
Dim uif As SFile = Nothing
|
||||
Dim uif_orig As SFile = Nothing
|
||||
Dim uif_compressed As SFile = Nothing
|
||||
Dim uifKey$ = String.Empty
|
||||
If AutoDownloaderSource.ShowPictureUser Then uPic = DirectCast(User, UserDataBase).GetUserPictureToastAddress
|
||||
If AutoDownloaderSource.ShowPictureUser AndAlso uPic.Exists Then Notify.Images = {New ToastImage(uPic)}
|
||||
If AutoDownloaderSource.ShowPictureDownloaded And User.DownloadedPictures(False) > 0 Then
|
||||
uif = DirectCast(User, UserDataBase).GetLastImageAddress
|
||||
uif_orig = uif
|
||||
If uif.Exists Then
|
||||
uif_compressed = uif
|
||||
uif_compressed.Path = CachePath.Path
|
||||
@@ -101,7 +103,7 @@ Namespace DownloadObjects
|
||||
If uif.Exists Then
|
||||
Notify.Images = {New ToastImage(uif, IImage.Modes.Inline)}
|
||||
uifKey = $"{Key}_{Images.Keys.Count + 1}_{KeyBttPhoto}"
|
||||
If Not Images.ContainsKey(uifKey) Then Images.Add(uifKey, uif)
|
||||
If Not Images.ContainsKey(uifKey) Then Images.Add(uifKey, uif_orig)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -23,6 +23,7 @@ Namespace DownloadObjects
|
||||
Private DataRows As Integer = 10
|
||||
Private DataColumns As Integer = 1
|
||||
Private FeedEndless As Boolean = False
|
||||
Private ReadOnly FileNotExist As Predicate(Of UserMediaD) = Function(d) Not d.Data.File.Exists
|
||||
#End Region
|
||||
#Region "Initializer"
|
||||
Friend Sub New()
|
||||
@@ -44,6 +45,7 @@ Namespace DownloadObjects
|
||||
Private Sub DownloadFeedForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
With MyDefs
|
||||
.MyViewInitialize()
|
||||
LastWinState = WindowState
|
||||
With MyRange
|
||||
.AutoToolTip = True
|
||||
.ButtonKey(RCI.Previous) = Keys.F3
|
||||
@@ -91,7 +93,7 @@ Namespace DownloadObjects
|
||||
Dim p% = IIf(DataColumns = 1, 100, 50)
|
||||
For i = 0 To DataColumns - 1 : .ColumnStyles.Add(New ColumnStyle(SizeType.Percent, p)) : Next
|
||||
.ColumnCount = .ColumnStyles.Count
|
||||
For i = 0 To DataRows - 1 : .RowStyles.Add(New RowStyle(SizeType.Absolute, 0)) : Next
|
||||
For i = 0 To DataRows : .RowStyles.Add(New RowStyle(SizeType.Absolute, 0)) : Next
|
||||
.RowCount = .RowStyles.Count
|
||||
.HorizontalScroll.Visible = False
|
||||
End With
|
||||
@@ -111,6 +113,7 @@ Namespace DownloadObjects
|
||||
End Sub
|
||||
Private Sub RefillList() Handles BTT_REFRESH.Click
|
||||
DataPopulated = False
|
||||
Try : Downloader.Files.RemoveAll(FileNotExist) : Catch : End Try
|
||||
DataList.ListAddList(Downloader.Files, LAP.ClearBeforeAdd, LAP.NotContainsOnly)
|
||||
MyRange.Source = DataList
|
||||
ControlInvoke(ToolbarTOP, LBL_FILES, Sub() LBL_FILES.Text = String.Empty)
|
||||
@@ -127,7 +130,7 @@ Namespace DownloadObjects
|
||||
RefillList()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Data"
|
||||
#Region "Delete"
|
||||
Private Sub BTT_DELETE_SELECTED_Click(sender As Object, e As EventArgs) Handles BTT_DELETE_SELECTED.Click
|
||||
Const MsgTitle$ = "Deleting marked files"
|
||||
Try
|
||||
@@ -138,25 +141,18 @@ Namespace DownloadObjects
|
||||
Dim d% = 0
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA
|
||||
.SuspendLayout()
|
||||
For Each fm As FeedMedia In c
|
||||
If fm.DeleteFile(True) Then
|
||||
d += 1
|
||||
DataList.RemoveAll(Function(dd) dd.Data.File = fm.File)
|
||||
TPRemoveControl(fm, False)
|
||||
End If
|
||||
Next
|
||||
.ResumeLayout(True)
|
||||
End With
|
||||
End Sub)
|
||||
If d > 0 Then
|
||||
If DataList.Count > 0 Then
|
||||
MyRange.HandlersSuspended = True
|
||||
MyRange.Source = DataList
|
||||
If indx.ValueBetween(0, MyRange.Count - 1) Then MyRange.CurrentIndex = indx
|
||||
MyRange.HandlersSuspended = False
|
||||
DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).PerformIndexChanged()
|
||||
Else
|
||||
RefillList()
|
||||
End If
|
||||
End If
|
||||
If d > 0 Then RefillAfterDelete()
|
||||
MsgBoxE({$"{d}/{c.Count} file(s) deleted", MsgTitle})
|
||||
Else
|
||||
MsgBoxE({"Operation canceled", MsgTitle})
|
||||
@@ -168,6 +164,59 @@ Namespace DownloadObjects
|
||||
ErrorsDescriber.Execute(EDP.LogMessageValue, ex, MsgTitle)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub FeedMedia_MediaDeleted(ByVal Sender As FeedMedia)
|
||||
Try
|
||||
ControlInvoke(TP_DATA, Sub() TPRemoveControl(Sender, True))
|
||||
DataList.RemoveAll(Function(dd) dd.Data.File = Sender.File)
|
||||
RefillAfterDelete()
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub TPRemoveControl(ByVal CNT As FeedMedia, ByVal Suspend As Boolean)
|
||||
Try
|
||||
If Suspend Then TP_DATA.SuspendLayout()
|
||||
Dim p As TableLayoutPanelCellPosition = TP_DATA.GetCellPosition(CNT)
|
||||
Dim HeightChanged As Boolean = False
|
||||
TP_DATA.Controls.Remove(CNT)
|
||||
CNT.Dispose()
|
||||
If DataColumns = 1 Then
|
||||
If p.Column >= 0 And p.Row >= 0 Then TP_DATA.RowStyles(p.Row).Height = 0 : HeightChanged = True
|
||||
Else
|
||||
If p.Row.ValueBetween(0, TP_DATA.RowStyles.Count - 1) And p.Column.ValueBetween(0, TP_DATA.ColumnStyles.Count - 1) Then
|
||||
Dim found As Boolean = False
|
||||
For i% = 0 To TP_DATA.ColumnStyles.Count - 1
|
||||
If Not TP_DATA.GetControlFromPosition(i, p.Row) Is Nothing Then found = True : Exit For
|
||||
Next
|
||||
If Not found Then TP_DATA.RowStyles(p.Row).Height = 0 : HeightChanged = True
|
||||
End If
|
||||
End If
|
||||
If HeightChanged Then TP_DATA.AutoScroll = False : TP_DATA.AutoScroll = True
|
||||
Catch
|
||||
Finally
|
||||
If Suspend Then TP_DATA.ResumeLayout(True)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RefillAfterDelete()
|
||||
If ControlInvoke(TP_DATA, Function() TP_DATA.Controls.Count) = 0 Then
|
||||
With MyRange
|
||||
Dim indx% = .CurrentIndex
|
||||
.HandlersSuspended = True
|
||||
.Source = DataList
|
||||
If .Count > 0 Then
|
||||
If indx.ValueBetween(0, .Count - 1) Then
|
||||
.CurrentIndex = indx
|
||||
ElseIf (indx - 1).ValueBetween(0, .Count - 1) Then
|
||||
.CurrentIndex = indx - 1
|
||||
Else
|
||||
.CurrentIndex = .Count - 1
|
||||
End If
|
||||
.HandlersSuspended = False
|
||||
DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).PerformIndexChanged()
|
||||
End If
|
||||
.HandlersSuspended = False
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Range"
|
||||
Private DataPopulated As Boolean = False
|
||||
@@ -177,8 +226,8 @@ Namespace DownloadObjects
|
||||
Friend ReadOnly Row As Integer
|
||||
Friend ReadOnly Column As Integer
|
||||
Friend Sub New(ByVal RowsCount As Integer, ByVal ColumnsCount As Integer)
|
||||
Me.RowsCount = RowsCount - 1
|
||||
Me.ColumnsCount = ColumnsCount - 1
|
||||
Me.RowsCount = RowsCount
|
||||
Me.ColumnsCount = ColumnsCount
|
||||
Row = 0
|
||||
Column = 0
|
||||
End Sub
|
||||
@@ -190,86 +239,84 @@ Namespace DownloadObjects
|
||||
Friend Function [Next]() As TPCELL
|
||||
Dim r% = Row
|
||||
Dim c% = Column + 1
|
||||
If Not c.ValueBetween(0, ColumnsCount) Then c = 0 : r += 1
|
||||
If Not c.ValueBetween(0, ColumnsCount - 1) Then c = 0 : r += 1
|
||||
Return New TPCELL(RowsCount, ColumnsCount, r, c)
|
||||
End Function
|
||||
End Structure
|
||||
Private RefillInProgress As Boolean = False
|
||||
Private Sub MyRange_IndexChanged(ByVal Sender As IRangeSwitcherProvider, ByVal e As EventArgs) Handles MyRange.IndexChanged
|
||||
Try
|
||||
If Sender.CurrentIndex >= 0 Then
|
||||
If Not RefillInProgress AndAlso Sender.CurrentIndex >= 0 Then
|
||||
RefillInProgress = True
|
||||
AllowTopScroll = False
|
||||
ScrollSuspended = True
|
||||
Dim d As List(Of Integer) = MyRange.Indexes(Sender.CurrentIndex, EDP.ReturnValue).ListIfNothing
|
||||
Dim d As List(Of UserMediaD) = MyRange.Current
|
||||
Dim d2 As List(Of UserMediaD)
|
||||
Dim i%
|
||||
If d.Count > 0 Then
|
||||
If d.ListExists And d.All(Function(md) FileNotExist(md)) Then
|
||||
i = Sender.CurrentIndex
|
||||
Sender.HandlersSuspended = True
|
||||
RefillList()
|
||||
If Sender.Count > 0 Then
|
||||
If i.ValueBetween(0, Sender.Count - 1) Then Sender.CurrentIndex = i
|
||||
Sender.HandlersSuspended = False
|
||||
End If
|
||||
RefillInProgress = False
|
||||
Sender.HandlersSuspended = False
|
||||
DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).PerformIndexChanged()
|
||||
Exit Sub
|
||||
End If
|
||||
If d.ListExists Then
|
||||
ClearTable()
|
||||
If Sender.CurrentIndex > 0 And FeedEndless Then
|
||||
i = MyRange.Indexes(Sender.CurrentIndex - 1, EDP.ReturnValue).DefaultIfEmpty(-1).Last
|
||||
If i.ValueBetween(0, DataList.Count - 1) Then
|
||||
If d.Count = 0 Then d.Add(i) Else d.Insert(0, i)
|
||||
End If
|
||||
d2 = DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).Item(Sender.CurrentIndex - 1).ListTake(-2, DataColumns, EDP.ReturnValue).ListIfNothing
|
||||
If d2.Count > 0 Then d.InsertRange(0, d2) : d2.Clear()
|
||||
End If
|
||||
Dim w% = GetWidth()
|
||||
Dim hp% = PaddingE.GetOf({TP_DATA}).Vertical(2)
|
||||
Dim p As New TPCELL(DataRows, DataColumns)
|
||||
Dim fmList As New List(Of FeedMedia)
|
||||
Dim rhd As New Dictionary(Of Integer, List(Of Integer))
|
||||
For Each i In d
|
||||
If i.ValueBetween(0, DataList.Count - 1) Then fmList.Add(New FeedMedia(DataList(i), w))
|
||||
Next
|
||||
d.ForEach(Sub(de) fmList.Add(New FeedMedia(de, w, AddressOf FeedMedia_MediaDeleted)))
|
||||
If fmList.Count > 0 Then fmList.ListDisposeRemoveAll(Function(fm) fm Is Nothing OrElse fm.HasError)
|
||||
If fmList.Count > 0 Then
|
||||
For i = 0 To fmList.Count - 1
|
||||
If Not rhd.ContainsKey(p.Row) Then rhd.Add(p.Row, New List(Of Integer))
|
||||
rhd(p.Row).Add(fmList(i).Height)
|
||||
p = p.Next
|
||||
Next
|
||||
p = New TPCELL(DataRows, DataColumns)
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA
|
||||
With .RowStyles
|
||||
For i = 0 To .Count - 1
|
||||
With .Item(i) : .SizeType = SizeType.Absolute : .Height = 0 : End With
|
||||
Next
|
||||
End With
|
||||
.AutoScroll = False
|
||||
.AutoScroll = True
|
||||
End With
|
||||
End Sub)
|
||||
For i = 0 To fmList.Count - 1
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA
|
||||
With .RowStyles(p.Row) : .SizeType = SizeType.Absolute : .Height = rhd(p.Row).Max : End With
|
||||
.Controls.Add(fmList(i), p.Column, p.Row)
|
||||
End With
|
||||
End Sub)
|
||||
ControlInvoke(TP_DATA, Sub() TP_DATA.Controls.Add(fmList(i), p.Column, p.Row))
|
||||
p = p.Next
|
||||
Next
|
||||
End If
|
||||
ResizeGrid()
|
||||
fmList.Clear()
|
||||
rhd.ListForEach(Sub(kv, ii) kv.Value.Clear())
|
||||
rhd.Clear()
|
||||
d.Clear()
|
||||
End If
|
||||
RefillInProgress = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[DownloadObjects.DownloadFeedForm.Range.IndexChanged({Sender.CurrentIndex})]")
|
||||
RefillInProgress = False
|
||||
Finally
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA.VerticalScroll
|
||||
If Offset = 1 Then .Value = 0 Else .Value = .Maximum
|
||||
End With
|
||||
End Sub)
|
||||
ScrollSuspended = False
|
||||
DataPopulated = True
|
||||
If Not RefillInProgress Then
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA.VerticalScroll
|
||||
If Offset = 1 Then .Value = 0 Else .Value = .Maximum
|
||||
End With
|
||||
End Sub)
|
||||
ScrollSuspended = False
|
||||
DataPopulated = True
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Size"
|
||||
Private LastWinState As FormWindowState = FormWindowState.Normal
|
||||
Private Function GetWidth() As Integer
|
||||
Return (TP_DATA.Width - PaddingE.GetOf({Me, TP_DATA}).Horizontal(2)) / DataColumns
|
||||
End Function
|
||||
Private Sub DownloadFeedForm_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
||||
ResizeGrid()
|
||||
End Sub
|
||||
Private Sub DownloadFeedForm_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
|
||||
If Not LastWinState = WindowState And Not If(MyDefs?.Initializing, True) Then LastWinState = WindowState : ResizeGrid()
|
||||
End Sub
|
||||
Private Sub ResizeGrid()
|
||||
ControlInvoke(TP_DATA, Sub()
|
||||
With TP_DATA
|
||||
If .Controls.Count > 0 Then
|
||||
@@ -282,9 +329,10 @@ Namespace DownloadObjects
|
||||
If Not rh.ContainsKey(p.Row) Then rh.Add(p.Row, New List(Of Integer))
|
||||
rh(p.Row).Add(cnt.Height)
|
||||
Next
|
||||
For i% = 0 To .RowStyles.Count - 1 : .RowStyles(i).Height = 0 : Next
|
||||
If rh.Count > 0 Then
|
||||
For Each kv In rh
|
||||
With .RowStyles(kv.Key) : .SizeType = SizeType.Absolute : .Height = kv.Value.Max : End With
|
||||
.RowStyles(kv.Key).Height = kv.Value.Max
|
||||
kv.Value.Clear()
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -16,6 +16,7 @@ Namespace DownloadObjects
|
||||
<ToolboxItem(False), DesignTimeVisible(False)>
|
||||
Public Class FeedMedia
|
||||
#Region "Declarations"
|
||||
Friend Event MediaDeleted(ByVal Sender As Object)
|
||||
Private Const VideoHeight As Integer = 450
|
||||
Private WithEvents MyPicture As PictureBox
|
||||
Private ReadOnly MyImage As ImageRenderer
|
||||
@@ -64,7 +65,7 @@ Namespace DownloadObjects
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
Friend Sub New(ByVal Media As UserMediaD, ByVal Width As Integer)
|
||||
Friend Sub New(ByVal Media As UserMediaD, ByVal Width As Integer, ByVal Handler As MediaDeletedEventHandler)
|
||||
Try
|
||||
InitializeComponent()
|
||||
File = Media.Data.File
|
||||
@@ -131,12 +132,16 @@ Namespace DownloadObjects
|
||||
End With
|
||||
End If
|
||||
|
||||
If Settings.FeedAddSessionToCaption Then info = $"[{Media.Session}] {info}"
|
||||
If Settings.FeedAddDateToCaption Then info &= $" ({Media.Date.ToStringDate(ADateTime.Formats.BaseDateTime)})"
|
||||
LBL_INFO.Text = info
|
||||
'TT_MAIN.SetToolTip(LBL_INFO, Information)
|
||||
|
||||
s = New Size(Width, h + TP_MAIN.RowStyles(0).Height + PaddingE.GetOf({TP_MAIN}).Vertical(2))
|
||||
Size = s
|
||||
MinimumSize = s
|
||||
MaximumSize = s
|
||||
|
||||
If Not Handler Is Nothing Then AddHandler Me.MediaDeleted, Handler
|
||||
Else
|
||||
Throw New ArgumentNullException With {.HelpLink = 1}
|
||||
End If
|
||||
@@ -158,6 +163,9 @@ Namespace DownloadObjects
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "LBL"
|
||||
Private Sub LBL_INFO_MouseClick(sender As Object, e As MouseEventArgs) Handles LBL_INFO.MouseClick
|
||||
If e.Button = MouseButtons.Left Then ControlInvoke(CH_CHECKED, Sub() CH_CHECKED.Checked = Not CH_CHECKED.Checked)
|
||||
End Sub
|
||||
Private Sub LBL_INFO_DoubleClick(sender As Object, e As EventArgs) Handles LBL_INFO.DoubleClick
|
||||
If Not UserKey.IsEmptyString Then
|
||||
Dim u As IUserData = Settings.GetUser(UserKey)
|
||||
@@ -214,10 +222,10 @@ Namespace DownloadObjects
|
||||
Const msgTitle$ = "Deleting a file"
|
||||
Try
|
||||
If Silent OrElse MsgBoxE({$"Are you sure you want to delete the [{File.File}] file?{vbCr}{File}", msgTitle}, vbExclamation,,, {"Process", "Cancel"}) = 0 Then
|
||||
If Not MyVideo Is Nothing Then MyVideo.Stop()
|
||||
If File.Delete(SFO.File, Settings.DeleteMode, EDP.ThrowException) Then
|
||||
If Not Silent Then MsgBoxE({"File deleted", msgTitle})
|
||||
If Not Silent Then RaiseEvent MediaDeleted(Me) : MsgBoxE({"File deleted", msgTitle})
|
||||
LBL_INFO.Height = 0
|
||||
If Not MyPicture Is Nothing Then MyPicture.Size = New Size(0, 0)
|
||||
Height = 0
|
||||
Return True
|
||||
End If
|
||||
|
||||
34
SCrawler/Download/FeedVideo.Designer.vb
generated
@@ -24,12 +24,14 @@ Namespace DownloadObjects
|
||||
Private Sub InitializeComponent()
|
||||
Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel
|
||||
Dim TP_BUTTONS As System.Windows.Forms.TableLayoutPanel
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FeedVideo))
|
||||
Me.MyVideo = New LibVLCSharp.WinForms.VideoView()
|
||||
Me.TR_POSITION = New System.Windows.Forms.TrackBar()
|
||||
Me.TR_VOLUME = New System.Windows.Forms.TrackBar()
|
||||
Me.LBL_TIME = New System.Windows.Forms.Label()
|
||||
Me.BTT_PLAY = New System.Windows.Forms.Button()
|
||||
Me.BTT_PAUSE = New System.Windows.Forms.Button()
|
||||
Me.BTT_STOP = New System.Windows.Forms.Button()
|
||||
Me.TR_VOLUME = New System.Windows.Forms.TrackBar()
|
||||
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_BUTTONS = New System.Windows.Forms.TableLayoutPanel()
|
||||
TP_MAIN.SuspendLayout()
|
||||
@@ -88,6 +90,7 @@ Namespace DownloadObjects
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_PAUSE, 1, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.BTT_STOP, 2, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.TR_VOLUME, 4, 0)
|
||||
TP_BUTTONS.Controls.Add(Me.LBL_TIME, 3, 0)
|
||||
TP_BUTTONS.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_BUTTONS.Location = New System.Drawing.Point(1, 133)
|
||||
TP_BUTTONS.Margin = New System.Windows.Forms.Padding(1)
|
||||
@@ -97,6 +100,24 @@ Namespace DownloadObjects
|
||||
TP_BUTTONS.Size = New System.Drawing.Size(178, 26)
|
||||
TP_BUTTONS.TabIndex = 2
|
||||
'
|
||||
'TR_VOLUME
|
||||
'
|
||||
Me.TR_VOLUME.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TR_VOLUME.Location = New System.Drawing.Point(81, 3)
|
||||
Me.TR_VOLUME.Name = "TR_VOLUME"
|
||||
Me.TR_VOLUME.Size = New System.Drawing.Size(94, 20)
|
||||
Me.TR_VOLUME.TabIndex = 3
|
||||
'
|
||||
'LBL_TIME
|
||||
'
|
||||
Me.LBL_TIME.AutoSize = True
|
||||
Me.LBL_TIME.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LBL_TIME.Location = New System.Drawing.Point(78, 0)
|
||||
Me.LBL_TIME.Name = "LBL_TIME"
|
||||
Me.LBL_TIME.Size = New System.Drawing.Size(1, 26)
|
||||
Me.LBL_TIME.TabIndex = 4
|
||||
Me.LBL_TIME.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'BTT_PLAY
|
||||
'
|
||||
Me.BTT_PLAY.BackgroundImage = Global.SCrawler.My.Resources.Resources.StartPic_01_Green_16
|
||||
@@ -123,7 +144,7 @@ Namespace DownloadObjects
|
||||
'
|
||||
'BTT_STOP
|
||||
'
|
||||
Me.BTT_STOP.BackgroundImage = Global.SCrawler.My.Resources.Resources.Delete
|
||||
Me.BTT_STOP.BackgroundImage = CType(resources.GetObject("BTT_STOP.BackgroundImage"), System.Drawing.Image)
|
||||
Me.BTT_STOP.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.BTT_STOP.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BTT_STOP.Location = New System.Drawing.Point(51, 1)
|
||||
@@ -133,14 +154,6 @@ Namespace DownloadObjects
|
||||
Me.BTT_STOP.TabIndex = 2
|
||||
Me.BTT_STOP.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TR_VOLUME
|
||||
'
|
||||
Me.TR_VOLUME.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TR_VOLUME.Location = New System.Drawing.Point(81, 3)
|
||||
Me.TR_VOLUME.Name = "TR_VOLUME"
|
||||
Me.TR_VOLUME.Size = New System.Drawing.Size(94, 20)
|
||||
Me.TR_VOLUME.TabIndex = 3
|
||||
'
|
||||
'FeedVideo
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -164,5 +177,6 @@ Namespace DownloadObjects
|
||||
Private WithEvents BTT_PAUSE As Button
|
||||
Private WithEvents BTT_STOP As Button
|
||||
Private WithEvents TR_VOLUME As TrackBar
|
||||
Private WithEvents LBL_TIME As Label
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -123,4 +123,18 @@
|
||||
<metadata name="TP_BUTTONS.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="BTT_STOP.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAGLSURBVFhH7Vc7TsNAEPUNaDhAxAl8EaT0UKRFoqdNTcsp
|
||||
qHIEHyGn4CNAiihwu7w3mTFrZeI466Ch4Emv8O7Mm9nd8X6qsWjbtgaXYAOmPWQfbWp1mw6ILcA16AUc
|
||||
In0WKnM84DwDu9F+vb6kzcN9eru6TM8XZ+npvOqRbeyjDW3NTzVmKjsOcJiDGwpQ7P3meifgIdInS4Ra
|
||||
c5UfBgw55eL4uXp0RzuW9KWG6VFbw/iAAUcuxh93t65oCalluoyh4fpAB9dcpv2UwY1ZEoyxWxNolILj
|
||||
lHkCp2C2HI2G3QINsu4smilrfojUzgrzpx7wIf/5vmovhafFGJrA2oJzh5PMPAeyFJ4Wmc1CzQS4dcoG
|
||||
4hmTpfC0SMbSBJZd8XEX84zJUnhaJGNpAg0TkI+h4iuFp0UylsXtEvAMjaXwtIz/Cfy9BCKLMPw3DN+I
|
||||
YrdiPQ/iDiMCHxHHcf9mhIa4CwmBxtgrGYGOuEupAQZx13IDDOMeJgY4xD3NcsB5yuP0uFEPAWK/8Dyv
|
||||
qm/Ki638CNApKAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -10,6 +10,7 @@ Imports LibVLCSharp
|
||||
Imports System.ComponentModel
|
||||
Imports PersonalUtilities.Tools
|
||||
Imports PersonalUtilities.Tools.WEB
|
||||
Imports VLCState = LibVLCSharp.Shared.VLCState
|
||||
Namespace DownloadObjects
|
||||
<ToolboxItem(False), DesignTimeVisible(False)>
|
||||
Public Class FeedVideo
|
||||
@@ -18,7 +19,19 @@ Namespace DownloadObjects
|
||||
Dim v# = DivideWithZeroChecking(MediaPlayer.Time, MediaPlayer.Length) * 10
|
||||
If v > 10 Then TR_POSITION.Value = 10 Else TR_POSITION.Value = v
|
||||
End Sub
|
||||
Private ReadOnly TimeChangeLabel As Action = Sub()
|
||||
If MediaPlayer.Time >= 0 Then
|
||||
Dim t As TimeSpan = TimeSpan.FromMilliseconds(MediaPlayer.Time)
|
||||
If Not VideoLength.HasValue Then
|
||||
VideoLength = TimeSpan.FromMilliseconds(MediaPlayer.Length)
|
||||
VideoLengthStr = VideoLength.Value.ToStringTime(FeedVideoLengthProvider)
|
||||
End If
|
||||
LBL_TIME.Text = $"{t.ToStringTime(FeedVideoLengthProvider)}/{VideoLengthStr}"
|
||||
End If
|
||||
End Sub
|
||||
Private ReadOnly MyImage As ImageRenderer
|
||||
Private VideoLength As TimeSpan?
|
||||
Private VideoLengthStr As String
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
@@ -42,22 +55,34 @@ Namespace DownloadObjects
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub FeedVideo_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||
If Not MediaPlayer Is Nothing Then MediaPlayer.Dispose()
|
||||
If Not MyImage Is Nothing Then MyImage.Dispose()
|
||||
End Sub
|
||||
Private Sub BTT_PLAY_Click(sender As Object, e As EventArgs) Handles BTT_PLAY.Click
|
||||
Try : MediaPlayer.Play() : Catch : End Try
|
||||
Try
|
||||
Select Case MediaPlayer.State
|
||||
Case VLCState.NothingSpecial, VLCState.Stopped, VLCState.Paused : MediaPlayer.Play()
|
||||
Case VLCState.Ended : MediaPlayer.Stop() : MediaPlayer.Play()
|
||||
End Select
|
||||
Catch
|
||||
Finally
|
||||
UpdateButtons()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BTT_PAUSE_Click(sender As Object, e As EventArgs) Handles BTT_PAUSE.Click
|
||||
Try : MediaPlayer.Pause() : Catch : End Try
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub BTT_STOP_Click(sender As Object, e As EventArgs) Handles BTT_STOP.Click
|
||||
Friend Sub [Stop]() Handles BTT_STOP.Click
|
||||
Try : MediaPlayer.Stop() : Catch : End Try
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub MediaPlayer_TimeChanged(sender As Object, e As [Shared].MediaPlayerTimeChangedEventArgs) Handles MediaPlayer.TimeChanged
|
||||
If TR_POSITION.InvokeRequired Then TR_POSITION.Invoke(TimeChange) Else TimeChange.Invoke
|
||||
If LBL_TIME.InvokeRequired Then LBL_TIME.Invoke(TimeChangeLabel) Else TimeChangeLabel.Invoke
|
||||
End Sub
|
||||
Private Sub TR_POSITION_MouseUp(sender As Object, e As MouseEventArgs) Handles TR_POSITION.MouseUp
|
||||
Try : MediaPlayer.Time = (MediaPlayer.Length / 100) * (TR_POSITION.Value * 10) : Catch : End Try
|
||||
@@ -68,6 +93,22 @@ Namespace DownloadObjects
|
||||
Private Sub MediaPlayer_Stopped(sender As Object, e As EventArgs) Handles MediaPlayer.Stopped
|
||||
Dim a As Action = Sub() TR_POSITION.Value = TR_POSITION.Maximum
|
||||
If TR_POSITION.InvokeRequired Then TR_POSITION.Invoke(a) Else a.Invoke
|
||||
UpdateButtons()
|
||||
End Sub
|
||||
Private Sub UpdateButtons() Handles MediaPlayer.Playing, MediaPlayer.Paused, MediaPlayer.Opening
|
||||
Try
|
||||
Dim _play As Boolean = False, _pause As Boolean = False, _stop As Boolean = False
|
||||
Select Case MediaPlayer.State
|
||||
Case VLCState.NothingSpecial, VLCState.Stopped : _play = True
|
||||
Case VLCState.Paused : _play = True : _stop = True
|
||||
Case VLCState.Ended : _play = True
|
||||
Case VLCState.Playing : _pause = True : _stop = True
|
||||
End Select
|
||||
ControlInvoke(BTT_PLAY, Sub() BTT_PLAY.Enabled = _play)
|
||||
ControlInvoke(BTT_PAUSE, Sub() BTT_PAUSE.Enabled = _pause)
|
||||
ControlInvoke(BTT_STOP, Sub() BTT_STOP.Enabled = _stop)
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -53,7 +53,7 @@ Namespace DownloadObjects
|
||||
ErrorsDescriber.Execute(EDP.SendInLog, ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub MyDefs_ButtonAddClick(ByVal Sender As Object, ByVal e As EditToolbar.EditToolbarEventArgs) Handles MyDefs.ButtonAddClick
|
||||
Private Sub MyDefs_ButtonAddClick(ByVal Sender As Object, ByVal e As EditToolbarEventArgs) Handles MyDefs.ButtonAddClick
|
||||
Dim a As New AutoDownloader(True)
|
||||
Using f As New AutoDownloaderEditorForm(a)
|
||||
f.ShowDialog()
|
||||
@@ -74,7 +74,7 @@ Namespace DownloadObjects
|
||||
End If
|
||||
End Sub
|
||||
Private _DeleteInProgress As Boolean = False
|
||||
Private Async Sub MyDefs_ButtonDeleteClickE(ByVal Sender As Object, ByVal e As EditToolbar.EditToolbarEventArgs) Handles MyDefs.ButtonDeleteClickE
|
||||
Private Async Sub MyDefs_ButtonDeleteClickE(ByVal Sender As Object, ByVal e As EditToolbarEventArgs) Handles MyDefs.ButtonDeleteClickE
|
||||
If Not _DeleteInProgress Then
|
||||
If _LatestSelected.ValueBetween(0, LIST_PLANS.Items.Count - 1) Then
|
||||
_DeleteInProgress = True
|
||||
|
||||
@@ -27,13 +27,21 @@ Namespace DownloadObjects
|
||||
Friend ReadOnly User As IUserData
|
||||
Friend ReadOnly Data As UserMedia
|
||||
Friend ReadOnly [Date] As Date
|
||||
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData)
|
||||
Friend ReadOnly Session As Integer
|
||||
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData, ByVal Session As Integer)
|
||||
Me.Data = Data
|
||||
Me.User = User
|
||||
[Date] = Now
|
||||
Me.Session = Session
|
||||
End Sub
|
||||
Private Function CompareTo(ByVal Other As UserMediaD) As Integer Implements IComparable(Of UserMediaD).CompareTo
|
||||
Return [Date].Ticks.CompareTo(Other.Date.Ticks) * -1
|
||||
If Not Session = Other.Session Then
|
||||
Return Session.CompareTo(Other.Session) * -1
|
||||
ElseIf Not If(User?.GetHashCode, 0) = If(Other.User?.GetHashCode, 0) Then
|
||||
Return If(User?.GetHashCode, 0).CompareTo(If(Other.User?.GetHashCode, 0))
|
||||
Else
|
||||
Return [Date].Ticks.CompareTo(Other.Date.Ticks) * -1
|
||||
End If
|
||||
End Function
|
||||
Private Overloads Function Equals(ByVal Other As UserMediaD) As Boolean Implements IEquatable(Of UserMediaD).Equals
|
||||
Return Data.File = Other.Data.File
|
||||
@@ -214,12 +222,14 @@ Namespace DownloadObjects
|
||||
#Region "Thread"
|
||||
Private CheckerThread As Thread
|
||||
Private MissingPostsDetected As Boolean = False
|
||||
Private Session As Integer = 0
|
||||
Private Sub [Start]()
|
||||
If Not AutoDownloaderWorking AndAlso MyProgressForm.ReadyToOpen AndAlso Pool.LongCount(Function(p) p.Count > 0) > 1 Then MyProgressForm.Show() : MainFrameObj.Focus()
|
||||
If Not If(CheckerThread?.IsAlive, False) Then
|
||||
MainProgress.Visible = True
|
||||
If Not AutoDownloaderWorking AndAlso InfoForm.ReadyToOpen Then InfoForm.Show() : MainFrameObj.Focus()
|
||||
MissingPostsDetected = False
|
||||
Session += 1
|
||||
CheckerThread = New Thread(New ThreadStart(AddressOf JobsChecker))
|
||||
CheckerThread.SetApartmentState(ApartmentState.MTA)
|
||||
CheckerThread.Start()
|
||||
@@ -342,7 +352,7 @@ Namespace DownloadObjects
|
||||
If Not .Disposed AndAlso Not .IsCollection AndAlso .DownloadedTotal(False) > 0 Then
|
||||
If Not Downloaded.Contains(.Self) Then Downloaded.Add(Settings.GetUser(.Self))
|
||||
With DirectCast(.Self, UserDataBase)
|
||||
If .LatestData.Count > 0 Then Files.ListAddList(.LatestData.Select(Function(d) New UserMediaD(d, .Self)), FilesLP)
|
||||
If .LatestData.Count > 0 Then Files.ListAddList(.LatestData.Select(Function(d) New UserMediaD(d, .Self, Session)), FilesLP)
|
||||
End With
|
||||
dcc = True
|
||||
End If
|
||||
|
||||
@@ -109,15 +109,15 @@ Namespace DownloadObjects
|
||||
StartDownloading()
|
||||
End Sub
|
||||
Private Sub BTT_STOP_Click(sender As Object, e As EventArgs) Handles BTT_STOP.Click
|
||||
SetControlValueInvoke(ToolbarTOP, BTT_STOP, Sub() BTT_STOP.Enabled = False)
|
||||
ControlInvoke(ToolbarTOP, BTT_STOP, Sub() BTT_STOP.Enabled = False)
|
||||
MyJob.Stop()
|
||||
End Sub
|
||||
#End Region
|
||||
#Region "Downloading"
|
||||
Private Sub StartDownloading()
|
||||
If Not MyJob.Working And MyJob.Count > 0 Then
|
||||
SetControlValueInvoke(ToolbarTOP, BTT_DOWN, Sub() BTT_DOWN.Enabled = False)
|
||||
SetControlValueInvoke(ToolbarTOP, BTT_STOP, Sub() BTT_STOP.Enabled = True)
|
||||
ControlInvoke(ToolbarTOP, BTT_DOWN, Sub() BTT_DOWN.Enabled = False)
|
||||
ControlInvoke(ToolbarTOP, BTT_STOP, Sub() BTT_STOP.Enabled = True)
|
||||
MyJob.Start(AddressOf DownloadVideos, Threading.ApartmentState.STA)
|
||||
End If
|
||||
End Sub
|
||||
@@ -137,8 +137,8 @@ Namespace DownloadObjects
|
||||
RefillList()
|
||||
MyJob.Progress.Visible = False
|
||||
End If
|
||||
SetControlValueInvoke(ToolbarTOP, BTT_DOWN, Sub() BTT_DOWN.Enabled = True)
|
||||
SetControlValueInvoke(ToolbarTOP, BTT_STOP, Sub() BTT_STOP.Enabled = False)
|
||||
ControlInvoke(ToolbarTOP, BTT_DOWN, Sub() BTT_DOWN.Enabled = True)
|
||||
ControlInvoke(ToolbarTOP, BTT_STOP, Sub() BTT_STOP.Enabled = False)
|
||||
MyJob.Stopped()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
20
SCrawler/Editors/CollectionEditorForm.Designer.vb
generated
@@ -15,9 +15,9 @@
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
|
||||
Dim ActionButton3 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton1 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(CollectionEditorForm))
|
||||
Dim ActionButton4 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton2 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Me.CMB_COLLECTIONS = New PersonalUtilities.Forms.Controls.ComboBoxExtended()
|
||||
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||
CONTAINER_MAIN.ContentPanel.SuspendLayout()
|
||||
@@ -44,14 +44,14 @@
|
||||
'
|
||||
'CMB_COLLECTIONS
|
||||
'
|
||||
ActionButton3.BackgroundImage = CType(resources.GetObject("ActionButton3.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton3.Name = "Add"
|
||||
ActionButton3.ToolTipText = "Add new collection"
|
||||
ActionButton4.BackgroundImage = CType(resources.GetObject("ActionButton4.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton4.Name = "ArrowDown"
|
||||
ActionButton4.Visible = False
|
||||
Me.CMB_COLLECTIONS.Buttons.Add(ActionButton3)
|
||||
Me.CMB_COLLECTIONS.Buttons.Add(ActionButton4)
|
||||
ActionButton1.BackgroundImage = CType(resources.GetObject("ActionButton1.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton1.Name = "Add"
|
||||
ActionButton1.ToolTipText = "Add new collection"
|
||||
ActionButton2.BackgroundImage = CType(resources.GetObject("ActionButton2.BackgroundImage"), System.Drawing.Image)
|
||||
ActionButton2.Name = "ArrowDown"
|
||||
ActionButton2.Visible = False
|
||||
Me.CMB_COLLECTIONS.Buttons.Add(ActionButton1)
|
||||
Me.CMB_COLLECTIONS.Buttons.Add(ActionButton2)
|
||||
Me.CMB_COLLECTIONS.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CMB_COLLECTIONS.ListDropDownStyle = PersonalUtilities.Forms.Controls.ComboBoxExtended.ListMode.Simple
|
||||
Me.CMB_COLLECTIONS.Location = New System.Drawing.Point(2, 0)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="ActionButton3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsTAAALEwEAmpwYAAADmUlE
|
||||
@@ -143,7 +143,7 @@
|
||||
0AUyNxOP1DOwcaG/8I+/LRB+At7psBnyDBG0AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ActionButton4.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ActionButton2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAE65JREFUeF7t
|
||||
3X2sJWddB/DdLi2lQG2hdOHuvfM887J7Cxca4ELTQMDWKigIFpBAEAgi9g+CJpJo9Q8NJhgBiYZIYspL
|
||||
|
||||
@@ -27,6 +27,7 @@ Namespace Editors
|
||||
With MyDefs
|
||||
.MyViewInitialize()
|
||||
.AddOkCancelToolbar()
|
||||
Collections.ListAddList(Settings.LastCollections)
|
||||
Collections.ListAddList((From c In Settings.Users Where c.IsCollection Select c.CollectionName), LAP.NotContainsOnly, EDP.ThrowException)
|
||||
If Collections.ListExists Then Collections.Sort() : CMB_COLLECTIONS.Items.AddRange(From c In Collections Select New ListItem(c))
|
||||
If Not Collection.IsEmptyString And Collections.Contains(Collection) Then CMB_COLLECTIONS.SelectedIndex = Collections.IndexOf(Collection)
|
||||
@@ -46,6 +47,10 @@ Namespace Editors
|
||||
Private Sub MyDefs_ButtonOkClick() Handles MyDefs.ButtonOkClick
|
||||
If CMB_COLLECTIONS.SelectedIndex >= 0 Then
|
||||
Collection = CMB_COLLECTIONS.Value.ToString
|
||||
With Settings.LastCollections
|
||||
If .Contains(Collection) Then .Remove(Collection)
|
||||
If .Count = 0 Then .Add(Collection) Else .Insert(0, Collection)
|
||||
End With
|
||||
MyDefs.CloseForm()
|
||||
Else
|
||||
MsgBoxE("Collection not selected", MsgBoxStyle.Exclamation)
|
||||
|
||||
37
SCrawler/Editors/GlobalSettingsForm.Designer.vb
generated
@@ -95,6 +95,8 @@
|
||||
Me.TXT_FEED_ROWS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_FEED_COLUMNS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_FEED_ENDLESS = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_FEED_ADD_SESSION = New System.Windows.Forms.CheckBox()
|
||||
Me.CH_FEED_ADD_DATE = New System.Windows.Forms.CheckBox()
|
||||
Me.TAB_MAIN = New System.Windows.Forms.TabControl()
|
||||
Me.CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||
TP_BASIS = New System.Windows.Forms.TableLayoutPanel()
|
||||
@@ -1091,14 +1093,17 @@
|
||||
TP_FEED.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_FEED.Controls.Add(TP_FEED_IMG_COUNT, 0, 0)
|
||||
TP_FEED.Controls.Add(Me.CH_FEED_ENDLESS, 0, 1)
|
||||
TP_FEED.Controls.Add(Me.CH_FEED_ADD_SESSION, 0, 2)
|
||||
TP_FEED.Controls.Add(Me.CH_FEED_ADD_DATE, 0, 3)
|
||||
TP_FEED.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_FEED.Location = New System.Drawing.Point(0, 0)
|
||||
TP_FEED.Name = "TP_FEED"
|
||||
TP_FEED.RowCount = 3
|
||||
TP_FEED.RowCount = 5
|
||||
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.Percent, 100.0!))
|
||||
TP_FEED.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
TP_FEED.Size = New System.Drawing.Size(576, 284)
|
||||
TP_FEED.TabIndex = 0
|
||||
'
|
||||
@@ -1117,7 +1122,7 @@
|
||||
TP_FEED_IMG_COUNT.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_FEED_IMG_COUNT.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
TP_FEED_IMG_COUNT.Size = New System.Drawing.Size(574, 28)
|
||||
TP_FEED_IMG_COUNT.TabIndex = 1
|
||||
TP_FEED_IMG_COUNT.TabIndex = 0
|
||||
'
|
||||
'TXT_FEED_ROWS
|
||||
'
|
||||
@@ -1158,10 +1163,32 @@
|
||||
Me.CH_FEED_ENDLESS.Location = New System.Drawing.Point(4, 33)
|
||||
Me.CH_FEED_ENDLESS.Name = "CH_FEED_ENDLESS"
|
||||
Me.CH_FEED_ENDLESS.Size = New System.Drawing.Size(568, 19)
|
||||
Me.CH_FEED_ENDLESS.TabIndex = 3
|
||||
Me.CH_FEED_ENDLESS.TabIndex = 1
|
||||
Me.CH_FEED_ENDLESS.Text = "Endless feed"
|
||||
Me.CH_FEED_ENDLESS.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CH_FEED_ADD_SESSION
|
||||
'
|
||||
Me.CH_FEED_ADD_SESSION.AutoSize = True
|
||||
Me.CH_FEED_ADD_SESSION.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_ADD_SESSION.Location = New System.Drawing.Point(4, 59)
|
||||
Me.CH_FEED_ADD_SESSION.Name = "CH_FEED_ADD_SESSION"
|
||||
Me.CH_FEED_ADD_SESSION.Size = New System.Drawing.Size(568, 19)
|
||||
Me.CH_FEED_ADD_SESSION.TabIndex = 2
|
||||
Me.CH_FEED_ADD_SESSION.Text = "Add the session number to the post title"
|
||||
Me.CH_FEED_ADD_SESSION.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CH_FEED_ADD_DATE
|
||||
'
|
||||
Me.CH_FEED_ADD_DATE.AutoSize = True
|
||||
Me.CH_FEED_ADD_DATE.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_FEED_ADD_DATE.Location = New System.Drawing.Point(4, 85)
|
||||
Me.CH_FEED_ADD_DATE.Name = "CH_FEED_ADD_DATE"
|
||||
Me.CH_FEED_ADD_DATE.Size = New System.Drawing.Size(568, 19)
|
||||
Me.CH_FEED_ADD_DATE.TabIndex = 3
|
||||
Me.CH_FEED_ADD_DATE.Text = "Add the date to the post title"
|
||||
Me.CH_FEED_ADD_DATE.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TAB_MAIN
|
||||
'
|
||||
Me.TAB_MAIN.Controls.Add(TAB_BASIS)
|
||||
@@ -1314,5 +1341,7 @@
|
||||
Private WithEvents TXT_FEED_ROWS As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents TXT_FEED_COLUMNS As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents CH_FEED_ENDLESS As CheckBox
|
||||
Private WithEvents CH_FEED_ADD_SESSION As CheckBox
|
||||
Private WithEvents CH_FEED_ADD_DATE As CheckBox
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -83,6 +83,8 @@ Namespace Editors
|
||||
TXT_FEED_ROWS.Value = .FeedDataRows.Value
|
||||
TXT_FEED_COLUMNS.Value = .FeedDataColumns.Value
|
||||
CH_FEED_ENDLESS.Checked = .FeedEndless
|
||||
CH_FEED_ADD_SESSION.Checked = .FeedAddSessionToCaption
|
||||
CH_FEED_ADD_DATE.Checked = .FeedAddDateToCaption
|
||||
End With
|
||||
.MyFieldsChecker = New FieldsChecker
|
||||
With .MyFieldsCheckerE
|
||||
@@ -191,6 +193,8 @@ Namespace Editors
|
||||
.FeedDataRows.Value = CInt(TXT_FEED_ROWS.Value)
|
||||
.FeedDataColumns.Value = CInt(TXT_FEED_COLUMNS.Value)
|
||||
.FeedEndless.Value = CH_FEED_ENDLESS.Checked
|
||||
.FeedAddSessionToCaption.Value = CH_FEED_ADD_SESSION.Checked
|
||||
.FeedAddDateToCaption.Value = CH_FEED_ADD_DATE.Checked
|
||||
FeedParametersChanged = .FeedDataRows.ChangesDetected Or .FeedDataColumns.ChangesDetected Or .FeedEndless.ChangesDetected
|
||||
|
||||
.EndUpdate()
|
||||
|
||||
82
SCrawler/Editors/SiteEditorForm.Designer.vb
generated
@@ -15,6 +15,7 @@
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
|
||||
Dim ActionButton1 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(SiteEditorForm))
|
||||
Dim ActionButton2 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
@@ -22,7 +23,6 @@
|
||||
Dim ActionButton4 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton5 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim ActionButton6 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
|
||||
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
|
||||
Me.TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.TXT_PATH = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.TXT_COOKIES = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
@@ -30,34 +30,53 @@
|
||||
Me.TXT_PATH_SAVED_POSTS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.CH_GET_USER_MEDIA_ONLY = New System.Windows.Forms.CheckBox()
|
||||
Me.TT_MAIN = New System.Windows.Forms.ToolTip(Me.components)
|
||||
Me.CH_DOWNLOAD_SITE_DATA = New System.Windows.Forms.CheckBox()
|
||||
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||
CONTAINER_MAIN.ContentPanel.SuspendLayout()
|
||||
CONTAINER_MAIN.SuspendLayout()
|
||||
Me.TP_MAIN.SuspendLayout()
|
||||
CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TXT_PATH_SAVED_POSTS, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CONTAINER_MAIN.ContentPanel.SuspendLayout()
|
||||
CONTAINER_MAIN.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'CONTAINER_MAIN
|
||||
'
|
||||
'
|
||||
'CONTAINER_MAIN.ContentPanel
|
||||
'
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.TP_MAIN)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(544, 218)
|
||||
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
CONTAINER_MAIN.LeftToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
CONTAINER_MAIN.Name = "CONTAINER_MAIN"
|
||||
CONTAINER_MAIN.RightToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(544, 243)
|
||||
CONTAINER_MAIN.TabIndex = 0
|
||||
CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||
'
|
||||
'TP_MAIN
|
||||
'
|
||||
Me.TP_MAIN.ColumnCount = 1
|
||||
Me.TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_MAIN.Controls.Add(Me.TXT_PATH, 0, 0)
|
||||
Me.TP_MAIN.Controls.Add(Me.TXT_COOKIES, 0, 2)
|
||||
Me.TP_MAIN.Controls.Add(Me.TP_SITE_PROPS, 0, 4)
|
||||
Me.TP_MAIN.Controls.Add(Me.TP_SITE_PROPS, 0, 5)
|
||||
Me.TP_MAIN.Controls.Add(Me.TXT_PATH_SAVED_POSTS, 0, 1)
|
||||
Me.TP_MAIN.Controls.Add(Me.CH_GET_USER_MEDIA_ONLY, 0, 3)
|
||||
Me.TP_MAIN.Controls.Add(Me.CH_GET_USER_MEDIA_ONLY, 0, 4)
|
||||
Me.TP_MAIN.Controls.Add(Me.CH_DOWNLOAD_SITE_DATA, 0, 3)
|
||||
Me.TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TP_MAIN.Name = "TP_MAIN"
|
||||
Me.TP_MAIN.RowCount = 5
|
||||
Me.TP_MAIN.RowCount = 6
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_MAIN.Size = New System.Drawing.Size(544, 219)
|
||||
Me.TP_MAIN.Size = New System.Drawing.Size(544, 218)
|
||||
Me.TP_MAIN.TabIndex = 0
|
||||
'
|
||||
'TXT_PATH
|
||||
@@ -101,15 +120,15 @@
|
||||
Me.TP_SITE_PROPS.ColumnCount = 1
|
||||
Me.TP_SITE_PROPS.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_SITE_PROPS.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TP_SITE_PROPS.Location = New System.Drawing.Point(3, 112)
|
||||
Me.TP_SITE_PROPS.Location = New System.Drawing.Point(3, 137)
|
||||
Me.TP_SITE_PROPS.Name = "TP_SITE_PROPS"
|
||||
Me.TP_SITE_PROPS.RowCount = 4
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
|
||||
Me.TP_SITE_PROPS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TP_SITE_PROPS.Size = New System.Drawing.Size(538, 104)
|
||||
Me.TP_SITE_PROPS.TabIndex = 4
|
||||
Me.TP_SITE_PROPS.Size = New System.Drawing.Size(538, 78)
|
||||
Me.TP_SITE_PROPS.TabIndex = 5
|
||||
'
|
||||
'TXT_PATH_SAVED_POSTS
|
||||
'
|
||||
@@ -130,54 +149,52 @@
|
||||
'
|
||||
Me.CH_GET_USER_MEDIA_ONLY.AutoSize = True
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Location = New System.Drawing.Point(3, 87)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Location = New System.Drawing.Point(3, 112)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Name = "CH_GET_USER_MEDIA_ONLY"
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Padding = New System.Windows.Forms.Padding(100, 0, 0, 0)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Size = New System.Drawing.Size(538, 19)
|
||||
Me.CH_GET_USER_MEDIA_ONLY.TabIndex = 3
|
||||
Me.CH_GET_USER_MEDIA_ONLY.TabIndex = 4
|
||||
Me.CH_GET_USER_MEDIA_ONLY.Text = "Get user media only"
|
||||
Me.CH_GET_USER_MEDIA_ONLY.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CONTAINER_MAIN
|
||||
'CH_DOWNLOAD_SITE_DATA
|
||||
'
|
||||
'
|
||||
'CONTAINER_MAIN.ContentPanel
|
||||
'
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.TP_MAIN)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(544, 219)
|
||||
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
CONTAINER_MAIN.LeftToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
CONTAINER_MAIN.Name = "CONTAINER_MAIN"
|
||||
CONTAINER_MAIN.RightToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(544, 219)
|
||||
CONTAINER_MAIN.TabIndex = 0
|
||||
CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||
Me.CH_DOWNLOAD_SITE_DATA.AutoSize = True
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Location = New System.Drawing.Point(3, 87)
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Name = "CH_DOWNLOAD_SITE_DATA"
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Padding = New System.Windows.Forms.Padding(100, 0, 0, 0)
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Size = New System.Drawing.Size(538, 19)
|
||||
Me.CH_DOWNLOAD_SITE_DATA.TabIndex = 3
|
||||
Me.CH_DOWNLOAD_SITE_DATA.Text = "Download site data"
|
||||
Me.TT_MAIN.SetToolTip(Me.CH_DOWNLOAD_SITE_DATA, "If disabled, this site's data will not be downloaded." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "You can disable downloadin" &
|
||||
"g data from the site if you need it.")
|
||||
Me.CH_DOWNLOAD_SITE_DATA.UseVisualStyleBackColor = True
|
||||
'
|
||||
'SiteEditorForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(544, 219)
|
||||
Me.ClientSize = New System.Drawing.Size(544, 243)
|
||||
Me.Controls.Add(CONTAINER_MAIN)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.KeyPreview = True
|
||||
Me.MaximizeBox = False
|
||||
Me.MaximumSize = New System.Drawing.Size(560, 258)
|
||||
Me.MaximumSize = New System.Drawing.Size(560, 282)
|
||||
Me.MinimizeBox = False
|
||||
Me.MinimumSize = New System.Drawing.Size(560, 258)
|
||||
Me.MinimumSize = New System.Drawing.Size(560, 282)
|
||||
Me.Name = "SiteEditorForm"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
Me.Text = "Site"
|
||||
CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
|
||||
CONTAINER_MAIN.ResumeLayout(False)
|
||||
CONTAINER_MAIN.PerformLayout()
|
||||
Me.TP_MAIN.ResumeLayout(False)
|
||||
Me.TP_MAIN.PerformLayout()
|
||||
CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TXT_PATH_SAVED_POSTS, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
|
||||
CONTAINER_MAIN.ResumeLayout(False)
|
||||
CONTAINER_MAIN.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -188,5 +205,6 @@
|
||||
Private WithEvents TP_SITE_PROPS As SiteDefaults
|
||||
Private WithEvents CH_GET_USER_MEDIA_ONLY As CheckBox
|
||||
Private WithEvents TT_MAIN As ToolTip
|
||||
Private WithEvents CH_DOWNLOAD_SITE_DATA As CheckBox
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="CONTAINER_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="ActionButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
@@ -222,9 +225,6 @@
|
||||
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="CONTAINER_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="TT_MAIN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
|
||||
@@ -11,6 +11,7 @@ Imports PersonalUtilities.Forms.Controls
|
||||
Imports PersonalUtilities.Forms.Controls.Base
|
||||
Imports PersonalUtilities.Tools.WEB
|
||||
Imports CookieControl = PersonalUtilities.Tools.WEB.CookieListForm.CookieControl
|
||||
Imports ADB = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons
|
||||
Imports SCrawler.Plugin
|
||||
Imports SCrawler.Plugin.Hosts
|
||||
Namespace Editors
|
||||
@@ -63,7 +64,8 @@ Namespace Editors
|
||||
|
||||
TXT_PATH.Text = .Path(False)
|
||||
TXT_PATH_SAVED_POSTS.Text = .SavedPostsPath(False)
|
||||
CH_GET_USER_MEDIA_ONLY.Checked = .GetUserMediaOnly.Value
|
||||
CH_DOWNLOAD_SITE_DATA.Checked = .DownloadSiteData
|
||||
CH_GET_USER_MEDIA_ONLY.Checked = .GetUserMediaOnly
|
||||
|
||||
SiteDefaultsFunctions.SetChecker(TP_SITE_PROPS, Host)
|
||||
|
||||
@@ -131,6 +133,7 @@ Namespace Editors
|
||||
TXT_PATH.CaptionWidth = offset
|
||||
TXT_PATH_SAVED_POSTS.CaptionWidth = offset
|
||||
TXT_COOKIES.CaptionWidth = offset
|
||||
CH_DOWNLOAD_SITE_DATA.Padding = New PaddingE(CH_DOWNLOAD_SITE_DATA.Padding) With {.Left = offset}
|
||||
CH_GET_USER_MEDIA_ONLY.Padding = New PaddingE(CH_GET_USER_MEDIA_ONLY.Padding) With {.Left = offset}
|
||||
If c > 0 Or Not Host.IsMyClass Then
|
||||
Dim ss As New Size(Size.Width, Size.Height + h + c)
|
||||
@@ -183,6 +186,7 @@ Namespace Editors
|
||||
SiteDefaultsFunctions.SetPropByChecker(TP_SITE_PROPS, Host)
|
||||
If TXT_PATH.IsEmptyString Then .Path = Nothing Else .Path = TXT_PATH.Text
|
||||
.SavedPostsPath = TXT_PATH_SAVED_POSTS.Text
|
||||
.DownloadSiteData.Value = CH_DOWNLOAD_SITE_DATA.Checked
|
||||
.GetUserMediaOnly.Value = CH_GET_USER_MEDIA_ONLY.Checked
|
||||
|
||||
If .PropList.Count > 0 Then .PropList.ForEach(Sub(p) If Not p.Options Is Nothing Then p.UpdateValueByControl())
|
||||
@@ -203,14 +207,14 @@ Namespace Editors
|
||||
ChangePath(Sender, Host.SavedPostsPath(False), TXT_PATH_SAVED_POSTS)
|
||||
End Sub
|
||||
Private Sub ChangePath(ByVal Sender As ActionButton, ByVal PathValue As SFile, ByRef CNT As TextBoxExtended)
|
||||
If Sender.DefaultButton = ActionButton.DefaultButtons.Open Then
|
||||
If Sender.DefaultButton = ADB.Open Then
|
||||
Dim f As SFile = SFile.SelectPath(PathValue)
|
||||
If Not f.IsEmptyString Then CNT.Text = f
|
||||
End If
|
||||
End Sub
|
||||
Private Sub TXT_COOKIES_ActionOnButtonClick(ByVal Sender As ActionButton, ByVal e As EventArgs) Handles TXT_COOKIES.ActionOnButtonClick
|
||||
Select Case Sender.DefaultButton
|
||||
Case ActionButton.DefaultButtons.Edit
|
||||
Case ADB.Edit
|
||||
If Not Host.Responser Is Nothing Then
|
||||
Using f As New CookieListForm(Host.Responser) With {
|
||||
.MyDesignXML = Settings.Design,
|
||||
@@ -220,7 +224,7 @@ Namespace Editors
|
||||
End Using
|
||||
SetCookieText()
|
||||
End If
|
||||
Case ActionButton.DefaultButtons.Clear
|
||||
Case ADB.Clear
|
||||
If Not Host.Responser Is Nothing Then
|
||||
With Host.Responser
|
||||
If Not .Cookies Is Nothing Then .Cookies.Dispose()
|
||||
|
||||
76
SCrawler/FDatePickerForm.Designer.vb
generated
@@ -22,10 +22,16 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer
|
||||
Me.DT = New System.Windows.Forms.DateTimePicker()
|
||||
Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel
|
||||
Me.DT_FROM = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
Me.DT_TO = New PersonalUtilities.Forms.Controls.TextBoxExtended()
|
||||
CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
|
||||
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
|
||||
CONTAINER_MAIN.ContentPanel.SuspendLayout()
|
||||
CONTAINER_MAIN.SuspendLayout()
|
||||
TP_MAIN.SuspendLayout()
|
||||
CType(Me.DT_FROM, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.DT_TO, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'CONTAINER_MAIN
|
||||
@@ -33,38 +39,73 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
|
||||
'
|
||||
'CONTAINER_MAIN.ContentPanel
|
||||
'
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.DT)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(209, 47)
|
||||
CONTAINER_MAIN.ContentPanel.Controls.Add(TP_MAIN)
|
||||
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(395, 28)
|
||||
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
CONTAINER_MAIN.LeftToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
CONTAINER_MAIN.Name = "CONTAINER_MAIN"
|
||||
CONTAINER_MAIN.RightToolStripPanelVisible = False
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(209, 47)
|
||||
CONTAINER_MAIN.Size = New System.Drawing.Size(395, 53)
|
||||
CONTAINER_MAIN.TabIndex = 0
|
||||
CONTAINER_MAIN.TopToolStripPanelVisible = False
|
||||
'
|
||||
'DT
|
||||
'TP_MAIN
|
||||
'
|
||||
Me.DT.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DT.Location = New System.Drawing.Point(0, 0)
|
||||
Me.DT.Name = "DT"
|
||||
Me.DT.ShowCheckBox = True
|
||||
Me.DT.Size = New System.Drawing.Size(209, 20)
|
||||
Me.DT.TabIndex = 0
|
||||
TP_MAIN.ColumnCount = 2
|
||||
TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
TP_MAIN.Controls.Add(Me.DT_FROM, 0, 0)
|
||||
TP_MAIN.Controls.Add(Me.DT_TO, 1, 0)
|
||||
TP_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
TP_MAIN.Location = New System.Drawing.Point(0, 0)
|
||||
TP_MAIN.Name = "TP_MAIN"
|
||||
TP_MAIN.RowCount = 1
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 53.0!))
|
||||
TP_MAIN.Size = New System.Drawing.Size(395, 28)
|
||||
TP_MAIN.TabIndex = 1
|
||||
'
|
||||
'DT_FROM
|
||||
'
|
||||
Me.DT_FROM.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
|
||||
Me.DT_FROM.CaptionText = "From"
|
||||
Me.DT_FROM.CaptionWidth = 50.0R
|
||||
Me.DT_FROM.ControlMode = PersonalUtilities.Forms.Controls.TextBoxExtended.ControlModes.DateTimePicker
|
||||
Me.DT_FROM.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DT_FROM.Location = New System.Drawing.Point(3, 3)
|
||||
Me.DT_FROM.Name = "DT_FROM"
|
||||
Me.DT_FROM.Size = New System.Drawing.Size(191, 22)
|
||||
Me.DT_FROM.TabIndex = 0
|
||||
Me.DT_FROM.Text = "17.09.2022 2:13:36"
|
||||
Me.DT_FROM.TextBoxWidthMinimal = 50
|
||||
'
|
||||
'DT_TO
|
||||
'
|
||||
Me.DT_TO.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
|
||||
Me.DT_TO.CaptionText = "To"
|
||||
Me.DT_TO.CaptionWidth = 50.0R
|
||||
Me.DT_TO.ControlMode = PersonalUtilities.Forms.Controls.TextBoxExtended.ControlModes.DateTimePicker
|
||||
Me.DT_TO.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DT_TO.Location = New System.Drawing.Point(200, 3)
|
||||
Me.DT_TO.Name = "DT_TO"
|
||||
Me.DT_TO.Size = New System.Drawing.Size(192, 22)
|
||||
Me.DT_TO.TabIndex = 1
|
||||
Me.DT_TO.Text = "17.09.2022 2:13:40"
|
||||
Me.DT_TO.TextBoxWidthMinimal = 50
|
||||
'
|
||||
'FDatePickerForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(209, 47)
|
||||
Me.ClientSize = New System.Drawing.Size(395, 53)
|
||||
Me.Controls.Add(CONTAINER_MAIN)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.KeyPreview = True
|
||||
Me.MaximizeBox = False
|
||||
Me.MaximumSize = New System.Drawing.Size(225, 86)
|
||||
Me.MaximumSize = New System.Drawing.Size(411, 92)
|
||||
Me.MinimizeBox = False
|
||||
Me.MinimumSize = New System.Drawing.Size(225, 86)
|
||||
Me.MinimumSize = New System.Drawing.Size(411, 92)
|
||||
Me.Name = "FDatePickerForm"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
@@ -73,8 +114,13 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
|
||||
CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
|
||||
CONTAINER_MAIN.ResumeLayout(False)
|
||||
CONTAINER_MAIN.PerformLayout()
|
||||
TP_MAIN.ResumeLayout(False)
|
||||
CType(Me.DT_FROM, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.DT_TO, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Private WithEvents DT As DateTimePicker
|
||||
|
||||
Private WithEvents DT_FROM As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
Private WithEvents DT_TO As PersonalUtilities.Forms.Controls.TextBoxExtended
|
||||
End Class
|
||||
@@ -120,4 +120,7 @@
|
||||
<metadata name="CONTAINER_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="TP_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -9,27 +9,28 @@
|
||||
Imports PersonalUtilities.Forms
|
||||
Friend Class FDatePickerForm
|
||||
Private ReadOnly MyDefs As DefaultFormOptions
|
||||
Friend ReadOnly Property SelectedDate As Date?
|
||||
Friend ReadOnly Property DateFrom As Date?
|
||||
Get
|
||||
If DT.Checked Then Return DT.Value.Date Else Return Nothing
|
||||
If DT_FROM.Checked Then Return CDate(DT_FROM.Value).Date Else Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly _InitialValue As Date?
|
||||
Friend Sub New(ByVal d As Date?)
|
||||
Friend ReadOnly Property DateTo As Date?
|
||||
Get
|
||||
If DT_TO.Checked Then Return CDate(DT_TO.Value).Date Else Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub New(ByVal DateFrom As Date?, ByVal DateTo As Date?)
|
||||
InitializeComponent()
|
||||
_InitialValue = d
|
||||
MyDefs = New DefaultFormOptions(Me, Settings.Design)
|
||||
If DateFrom.HasValue Then DT_FROM.Value = DateFrom.Value
|
||||
If DateTo.HasValue Then DT_TO.Value = DateTo.Value
|
||||
DT_FROM.Checked = DateFrom.HasValue
|
||||
DT_TO.Checked = DateTo.HasValue
|
||||
End Sub
|
||||
Private Sub FDatePickerForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
With MyDefs
|
||||
.MyViewInitialize(True)
|
||||
.AddOkCancelToolbar(True)
|
||||
If _InitialValue.HasValue Then
|
||||
DT.Checked = True
|
||||
DT.Value = _InitialValue.Value.Date
|
||||
Else
|
||||
DT.Checked = False
|
||||
End If
|
||||
.DelegateClosingChecker = False
|
||||
.EndLoaderOperations()
|
||||
MyDefs.MyOkCancel.EnableOK = True
|
||||
|
||||
@@ -176,9 +176,7 @@ Friend Class ListImagesLoader
|
||||
Try
|
||||
Dim t As New List(Of Task)
|
||||
Dim l As New List(Of UserOption)
|
||||
For Each u As IUserData In Settings.Users
|
||||
If u.FitToAddParams Then t.Add(Task.Run(Sub() l.Add(New UserOption(u, MyList, True))))
|
||||
Next
|
||||
t.AddRange(From u As IUserData In Settings.Users Where u.FitToAddParams Select Task.Run(Sub() l.Add(New UserOption(u, MyList, True))))
|
||||
If t.Count > 0 Then Task.WaitAll(t.ToArray)
|
||||
If l.Count > 0 Then
|
||||
For i% = 0 To l.Count - 1
|
||||
|
||||
62
SCrawler/MainFrame.Designer.vb
generated
@@ -40,6 +40,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_DELETE_USER = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_REFRESH = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_SHOW_INFO = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_FEED = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_CHANNELS = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_DOWN_SAVED = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_DOWN_SELECTED = New System.Windows.Forms.ToolStripButton()
|
||||
@@ -71,7 +72,8 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_SHOW_EXCLUDED_LABELS = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_EXCLUDED_LABELS_IGNORE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_SHOW_GROUPS = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_LIMIT_DATES = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_LOG = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_VERSION_INFO = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BTT_DONATE = New System.Windows.Forms.ToolStripButton()
|
||||
@@ -88,6 +90,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_CONTEXT_DOWN_DATE_LIMIT = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_EDIT = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_DELETE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_COPY_TO_FOLDER = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_FAV = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_TEMP = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_CONTEXT_READY = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -105,7 +108,6 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_TRAY_CLOSE = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.BTT_FEED = New System.Windows.Forms.ToolStripButton()
|
||||
SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
SEP_2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
@@ -269,12 +271,12 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
'
|
||||
'BTT_REFRESH
|
||||
'
|
||||
Me.BTT_REFRESH.AutoToolTip = False
|
||||
Me.BTT_REFRESH.Image = Global.SCrawler.My.Resources.Resources.Refresh
|
||||
Me.BTT_REFRESH.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BTT_REFRESH.Name = "BTT_REFRESH"
|
||||
Me.BTT_REFRESH.Size = New System.Drawing.Size(66, 22)
|
||||
Me.BTT_REFRESH.Text = "Refresh"
|
||||
Me.BTT_REFRESH.ToolTipText = "Refresh user list"
|
||||
'
|
||||
'BTT_SHOW_INFO
|
||||
'
|
||||
@@ -285,6 +287,15 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_SHOW_INFO.Text = "Info"
|
||||
Me.BTT_SHOW_INFO.ToolTipText = "Left-click: open the 'Info' form (show download summary)." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Right click: open the " &
|
||||
"'Missing' form (show information about missing posts)."
|
||||
'
|
||||
'BTT_FEED
|
||||
'
|
||||
Me.BTT_FEED.Image = Global.SCrawler.My.Resources.Resources.RSSPic
|
||||
Me.BTT_FEED.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BTT_FEED.Name = "BTT_FEED"
|
||||
Me.BTT_FEED.Size = New System.Drawing.Size(52, 22)
|
||||
Me.BTT_FEED.Text = "Feed"
|
||||
Me.BTT_FEED.ToolTipText = "Feed of recently downloaded data"
|
||||
'
|
||||
'BTT_CHANNELS
|
||||
'
|
||||
@@ -406,7 +417,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
'
|
||||
Me.MENU_VIEW.AutoToolTip = False
|
||||
Me.MENU_VIEW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.MENU_VIEW.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_VIEW_LARGE, Me.BTT_VIEW_SMALL, Me.BTT_VIEW_LIST, Me.BTT_VIEW_DETAILS, MENU_VIEW_SEP_1, Me.BTT_SITE_ALL, Me.BTT_SITE_SPECIFIC, MENU_VIEW_SEP_2, Me.BTT_SHOW_ALL, Me.BTT_SHOW_REGULAR, Me.BTT_SHOW_TEMP, Me.BTT_SHOW_FAV, Me.BTT_SHOW_DELETED, Me.BTT_SHOW_SUSPENDED, Me.BTT_SHOW_LABELS, Me.BTT_SHOW_NO_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS_IGNORE, Me.BTT_SHOW_SHOW_GROUPS, MENU_VIEW_SEP_3, Me.BTT_SHOW_LIMIT_DATES})
|
||||
Me.MENU_VIEW.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_VIEW_LARGE, Me.BTT_VIEW_SMALL, Me.BTT_VIEW_LIST, Me.BTT_VIEW_DETAILS, MENU_VIEW_SEP_1, Me.BTT_SITE_ALL, Me.BTT_SITE_SPECIFIC, MENU_VIEW_SEP_2, Me.BTT_SHOW_ALL, Me.BTT_SHOW_REGULAR, Me.BTT_SHOW_TEMP, Me.BTT_SHOW_FAV, Me.BTT_SHOW_DELETED, Me.BTT_SHOW_SUSPENDED, Me.BTT_SHOW_LABELS, Me.BTT_SHOW_NO_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS, Me.BTT_SHOW_EXCLUDED_LABELS_IGNORE, Me.BTT_SHOW_SHOW_GROUPS, MENU_VIEW_SEP_3, Me.BTT_SHOW_LIMIT_DATES_NOT, Me.BTT_SHOW_LIMIT_DATES_IN})
|
||||
Me.MENU_VIEW.Image = CType(resources.GetObject("MENU_VIEW.Image"), System.Drawing.Image)
|
||||
Me.MENU_VIEW.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.MENU_VIEW.Name = "MENU_VIEW"
|
||||
@@ -519,13 +530,21 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_SHOW_SHOW_GROUPS.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_SHOW_GROUPS.Text = "Show groups instead of labels"
|
||||
'
|
||||
'BTT_SHOW_LIMIT_DATES
|
||||
'BTT_SHOW_LIMIT_DATES_NOT
|
||||
'
|
||||
Me.BTT_SHOW_LIMIT_DATES.AutoToolTip = True
|
||||
Me.BTT_SHOW_LIMIT_DATES.Name = "BTT_SHOW_LIMIT_DATES"
|
||||
Me.BTT_SHOW_LIMIT_DATES.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_LIMIT_DATES.Text = "Limit dates"
|
||||
Me.BTT_SHOW_LIMIT_DATES.ToolTipText = "Show profiles that haven't downloaded new data since date..."
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.AutoToolTip = True
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.Name = "BTT_SHOW_LIMIT_DATES_NOT"
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.Text = "Limit dates (not in range)"
|
||||
Me.BTT_SHOW_LIMIT_DATES_NOT.ToolTipText = "Filter users whose last download date is not in the selected date range"
|
||||
'
|
||||
'BTT_SHOW_LIMIT_DATES_IN
|
||||
'
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.AutoToolTip = True
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.Name = "BTT_SHOW_LIMIT_DATES_IN"
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.Size = New System.Drawing.Size(231, 22)
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.Text = "Limit dates (in range)"
|
||||
Me.BTT_SHOW_LIMIT_DATES_IN.ToolTipText = "Filter users whose last download date is in the selected date range"
|
||||
'
|
||||
'BTT_LOG
|
||||
'
|
||||
@@ -612,9 +631,9 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
'
|
||||
'USER_CONTEXT
|
||||
'
|
||||
Me.USER_CONTEXT.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_CONTEXT_DOWN, Me.BTT_CONTEXT_DOWN_LIMITED, Me.BTT_CONTEXT_DOWN_DATE_LIMIT, Me.BTT_CONTEXT_EDIT, Me.BTT_CONTEXT_DELETE, CONTEXT_SEP_1, Me.BTT_CONTEXT_FAV, Me.BTT_CONTEXT_TEMP, Me.BTT_CONTEXT_READY, Me.BTT_CONTEXT_GROUPS, Me.BTT_CONTEXT_SCRIPT, Me.BTT_CONTEXT_ADD_TO_COL, Me.BTT_CONTEXT_COL_MERGE, Me.BTT_CONTEXT_CHANGE_FOLDER, CONTEXT_SEP_2, Me.BTT_CHANGE_IMAGE, CONTEXT_SEP_3, Me.BTT_CONTEXT_OPEN_PATH, CONTEXT_SEP_4, Me.BTT_CONTEXT_OPEN_SITE, CONTEXT_SEP_5, Me.BTT_CONTEXT_INFO})
|
||||
Me.USER_CONTEXT.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_CONTEXT_DOWN, Me.BTT_CONTEXT_DOWN_LIMITED, Me.BTT_CONTEXT_DOWN_DATE_LIMIT, Me.BTT_CONTEXT_EDIT, Me.BTT_CONTEXT_DELETE, Me.BTT_CONTEXT_COPY_TO_FOLDER, CONTEXT_SEP_1, Me.BTT_CONTEXT_FAV, Me.BTT_CONTEXT_TEMP, Me.BTT_CONTEXT_READY, Me.BTT_CONTEXT_GROUPS, Me.BTT_CONTEXT_SCRIPT, Me.BTT_CONTEXT_ADD_TO_COL, Me.BTT_CONTEXT_COL_MERGE, Me.BTT_CONTEXT_CHANGE_FOLDER, CONTEXT_SEP_2, Me.BTT_CHANGE_IMAGE, CONTEXT_SEP_3, Me.BTT_CONTEXT_OPEN_PATH, CONTEXT_SEP_4, Me.BTT_CONTEXT_OPEN_SITE, CONTEXT_SEP_5, Me.BTT_CONTEXT_INFO})
|
||||
Me.USER_CONTEXT.Name = "USER_CONTEXT"
|
||||
Me.USER_CONTEXT.Size = New System.Drawing.Size(222, 408)
|
||||
Me.USER_CONTEXT.Size = New System.Drawing.Size(222, 452)
|
||||
'
|
||||
'BTT_CONTEXT_DOWN
|
||||
'
|
||||
@@ -653,6 +672,13 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_CONTEXT_DELETE.Size = New System.Drawing.Size(221, 22)
|
||||
Me.BTT_CONTEXT_DELETE.Text = "Delete user / collection"
|
||||
'
|
||||
'BTT_CONTEXT_COPY_TO_FOLDER
|
||||
'
|
||||
Me.BTT_CONTEXT_COPY_TO_FOLDER.Image = Global.SCrawler.My.Resources.Resources.PastePic32
|
||||
Me.BTT_CONTEXT_COPY_TO_FOLDER.Name = "BTT_CONTEXT_COPY_TO_FOLDER"
|
||||
Me.BTT_CONTEXT_COPY_TO_FOLDER.Size = New System.Drawing.Size(221, 22)
|
||||
Me.BTT_CONTEXT_COPY_TO_FOLDER.Text = "Copy data to another folder"
|
||||
'
|
||||
'BTT_CONTEXT_FAV
|
||||
'
|
||||
Me.BTT_CONTEXT_FAV.Image = Global.SCrawler.My.Resources.Resources.StarPic_24
|
||||
@@ -776,14 +802,6 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.ToolTipText = "Close the program without executing the script"
|
||||
Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False
|
||||
'
|
||||
'BTT_FEED
|
||||
'
|
||||
Me.BTT_FEED.Image = Global.SCrawler.My.Resources.Resources.RSSPic
|
||||
Me.BTT_FEED.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.BTT_FEED.Name = "BTT_FEED"
|
||||
Me.BTT_FEED.Size = New System.Drawing.Size(52, 22)
|
||||
Me.BTT_FEED.Text = "Feed"
|
||||
'
|
||||
'MainFrame
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -859,7 +877,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Private WithEvents BTT_DONATE As ToolStripButton
|
||||
Private WithEvents BTT_SHOW_DELETED As ToolStripMenuItem
|
||||
Private WithEvents BTT_SHOW_SUSPENDED As ToolStripMenuItem
|
||||
Private WithEvents BTT_SHOW_LIMIT_DATES As ToolStripMenuItem
|
||||
Private WithEvents BTT_SHOW_LIMIT_DATES_NOT As ToolStripMenuItem
|
||||
Private WithEvents BTT_VIEW_DETAILS As ToolStripMenuItem
|
||||
Private WithEvents COL_DEF As ColumnHeader
|
||||
Private WithEvents MENU_SETTINGS As ToolStripDropDownButton
|
||||
@@ -881,4 +899,6 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
|
||||
Friend WithEvents BTT_LOG As ToolStripButton
|
||||
Friend WithEvents Toolbar_TOP As ToolStrip
|
||||
Private WithEvents BTT_FEED As ToolStripButton
|
||||
Private WithEvents BTT_SHOW_LIMIT_DATES_IN As ToolStripMenuItem
|
||||
Private WithEvents BTT_CONTEXT_COPY_TO_FOLDER As ToolStripMenuItem
|
||||
End Class
|
||||
@@ -10,6 +10,7 @@ Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
Imports System.Threading
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Functions.Messaging
|
||||
Imports SCrawler.API
|
||||
Imports SCrawler.API.Base
|
||||
Imports SCrawler.Editors
|
||||
@@ -87,7 +88,10 @@ Public Class MainFrame
|
||||
CheckVersion(False)
|
||||
BTT_SITE_ALL.Checked = Settings.SelectedSites.Count = 0
|
||||
BTT_SITE_SPECIFIC.Checked = Settings.SelectedSites.Count > 0
|
||||
BTT_SHOW_LIMIT_DATES.Checked = Settings.LastUpdatedDate.HasValue
|
||||
BTT_SHOW_LIMIT_DATES_NOT.Tag = ShowingDates.Not
|
||||
BTT_SHOW_LIMIT_DATES_NOT.Checked = Settings.ViewDateMode.Value = ShowingDates.Not
|
||||
BTT_SHOW_LIMIT_DATES_IN.Tag = ShowingDates.In
|
||||
BTT_SHOW_LIMIT_DATES_IN.Checked = Settings.ViewDateMode.Value = ShowingDates.In
|
||||
With Settings.Groups
|
||||
AddHandler .Added, AddressOf GROUPS_Added
|
||||
AddHandler .Deleted, AddressOf GROUPS_Deleted
|
||||
@@ -595,26 +599,40 @@ CloseResume:
|
||||
End If
|
||||
End Using
|
||||
End Function
|
||||
Private Sub BTT_SHOW_LIMIT_DATES_Click(sender As Object, e As EventArgs) Handles BTT_SHOW_LIMIT_DATES.Click
|
||||
Private Sub BTT_SHOW_LIMIT_DATES_NOT_IN_Click(ByVal Sender As ToolStripMenuItem, ByVal e As EventArgs) Handles BTT_SHOW_LIMIT_DATES_NOT.Click,
|
||||
BTT_SHOW_LIMIT_DATES_IN.Click
|
||||
Dim r As Boolean = False
|
||||
Dim snd As Action(Of Date?) = Sub(ByVal d As Date?)
|
||||
With Settings.LastUpdatedDate
|
||||
If .HasValue And d.HasValue Then
|
||||
r = Not .Value.Date = d.Value.Date
|
||||
Else
|
||||
r = True
|
||||
End If
|
||||
End With
|
||||
Settings.LastUpdatedDate = d
|
||||
End Sub
|
||||
Using f As New FDatePickerForm(Settings.LastUpdatedDate)
|
||||
Dim UpSettings As Action(Of Date?, Date?, ShowingDates) = Sub(ByVal _from As Date?, ByVal _to As Date?, ByVal Mode As ShowingDates)
|
||||
With Settings
|
||||
.BeginUpdate()
|
||||
If Not .ViewDateMode.Value = CInt(Mode) Then r = True
|
||||
.ViewDateMode.Value = CInt(Mode)
|
||||
If Not Mode = ShowingDates.Off Then
|
||||
If .ViewDateFrom.HasValue And _from.HasValue Then
|
||||
If Not .ViewDateFrom.Value.Date = _from.Value.Date Then r = True
|
||||
Else
|
||||
r = True
|
||||
End If
|
||||
.ViewDateFrom = _from
|
||||
If .ViewDateTo.HasValue And _to.HasValue Then
|
||||
If Not .ViewDateTo.Value.Date = _to.Value.Date Then r = True
|
||||
Else
|
||||
r = True
|
||||
End If
|
||||
.ViewDateTo = _to
|
||||
End If
|
||||
.EndUpdate()
|
||||
End With
|
||||
End Sub
|
||||
Using f As New FDatePickerForm(Settings.ViewDateFrom, Settings.ViewDateTo)
|
||||
f.ShowDialog()
|
||||
Select Case f.DialogResult
|
||||
Case DialogResult.Abort : snd(Nothing)
|
||||
Case DialogResult.OK : snd(f.SelectedDate)
|
||||
Case DialogResult.Abort : UpSettings(f.DateFrom, f.DateTo, ShowingDates.Off)
|
||||
Case DialogResult.OK : UpSettings(f.DateFrom, f.DateTo, Sender.Tag)
|
||||
End Select
|
||||
End Using
|
||||
BTT_SHOW_LIMIT_DATES.Checked = Settings.LastUpdatedDate.HasValue
|
||||
BTT_SHOW_LIMIT_DATES_NOT.Checked = Settings.ViewDateMode.Value = ShowingDates.Not
|
||||
BTT_SHOW_LIMIT_DATES_IN.Checked = Settings.ViewDateMode.Value = ShowingDates.In
|
||||
If r Then RefillList()
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -655,6 +673,9 @@ CloseResume:
|
||||
Private Sub BTT_CONTEXT_DELETE_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DELETE.Click
|
||||
DeleteSelectedUser()
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_COPY_TO_FOLDER_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_COPY_TO_FOLDER.Click
|
||||
CopyUserData()
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_FAV_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_FAV.Click
|
||||
Dim users As List(Of IUserData) = GetSelectedUserArray()
|
||||
If AskForMassReplace(users, "Favorite") Then
|
||||
@@ -759,40 +780,83 @@ CloseResume:
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BTT_CONTEXT_ADD_TO_COL_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_ADD_TO_COL.Click
|
||||
Const MsgTitle$ = "Add users to the collection"
|
||||
If Settings.CollectionsPath.Value.IsEmptyString Then
|
||||
MsgBoxE("Collection path not specified", MsgBoxStyle.Exclamation)
|
||||
MsgBoxE({"Collection path not specified", MsgTitle}, MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
Dim user As IUserData = GetSelectedUser()
|
||||
If Not user Is Nothing Then
|
||||
If user.IsCollection Then
|
||||
MsgBoxE("Collection can not be added to collection!", MsgBoxStyle.Critical)
|
||||
Else
|
||||
Using f As New CollectionEditorForm(user.CollectionName)
|
||||
Dim users As List(Of IUserData) = GetSelectedUserArray()
|
||||
If users.ListExists Then
|
||||
Dim i%
|
||||
Dim _col_user As Predicate(Of IUserData) = Function(u) u.IsCollection
|
||||
Dim userCollection As UserDataBind = users.Find(_col_user)
|
||||
Dim _col_name$ = String.Empty
|
||||
If Not userCollection Is Nothing Then
|
||||
i = users.LongCount(Function(u) _col_user(u))
|
||||
If i > 1 OrElse i = users.Count OrElse
|
||||
(i = 1 AndAlso
|
||||
MsgBoxE({$"Do you want to add the following users to the [{userCollection.Name}] collection?" & vbCr &
|
||||
users.Where(Function(u) Not _col_user(u)).ListToString(vbCr),
|
||||
MsgTitle}, vbQuestion + vbYesNo) = vbNo) Then _
|
||||
MsgBoxE({"The collection cannot be added to the collection!", MsgTitle}, MsgBoxStyle.Critical) : Exit Sub
|
||||
_col_name = userCollection.Name
|
||||
End If
|
||||
If _col_name.IsEmptyString Then
|
||||
Using f As New CollectionEditorForm
|
||||
f.ShowDialog()
|
||||
If f.DialogResult = DialogResult.OK Then
|
||||
With Settings
|
||||
Dim fCol As Predicate(Of IUserData) = Function(u) u.IsCollection And u.CollectionName = f.Collection
|
||||
Dim i% = .Users.FindIndex(fCol)
|
||||
Dim Added As Boolean = i < 0
|
||||
If i < 0 Then
|
||||
.Users.Add(New UserDataBind(f.Collection))
|
||||
MainFrameObj.CollectionHandler(DirectCast(.Users.Last, UserDataBind))
|
||||
i = .Users.Count - 1
|
||||
End If
|
||||
Try
|
||||
DirectCast(.Users(i), UserDataBind).Add(user)
|
||||
RemoveUserFromList(user)
|
||||
i = .Users.FindIndex(fCol)
|
||||
If i >= 0 Then UserListUpdate(.Users(i), Added)
|
||||
MsgBoxE($"[{user.Name}] was added to collection [{f.Collection}]")
|
||||
Catch ex As InvalidOperationException
|
||||
i = .Users.FindIndex(fCol)
|
||||
If i >= 0 AndAlso DirectCast(.Users(i), UserDataBind).Count = 0 Then .Users(i).Dispose() : .Users.RemoveAt(i)
|
||||
End Try
|
||||
End With
|
||||
End If
|
||||
If f.DialogResult = DialogResult.OK Then _col_name = f.Collection
|
||||
End Using
|
||||
End If
|
||||
If _col_name.IsEmptyString Then
|
||||
MsgBoxE({"The destination collection has not been selected.", MsgTitle}, vbExclamation)
|
||||
Else
|
||||
With Settings
|
||||
userCollection = .Users.Find(Function(u) u.IsCollection And u.CollectionName = _col_name)
|
||||
Dim Added As Boolean = userCollection Is Nothing
|
||||
If Added Then
|
||||
.Users.Add(New UserDataBind(_col_name))
|
||||
MainFrameObj.CollectionHandler(DirectCast(.Users.Last, UserDataBind))
|
||||
userCollection = .Users.Last
|
||||
End If
|
||||
Dim __added_users As New List(Of IUserData)
|
||||
Dim __added_users_not As New List(Of IUserData)
|
||||
For Each user As IUserData In users
|
||||
If Not user.IsCollection Then
|
||||
Try
|
||||
userCollection.Add(user)
|
||||
RemoveUserFromList(user)
|
||||
UserListUpdate(userCollection, Added)
|
||||
If Not Added Then FocusUser(userCollection.LVIKey)
|
||||
Added = False
|
||||
__added_users.Add(user)
|
||||
Catch ex As InvalidOperationException
|
||||
userCollection.Remove(user)
|
||||
If __added_users.Count > 0 AndAlso __added_users.Contains(user) Then __added_users.Remove(user)
|
||||
__added_users_not.Add(user)
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
If userCollection.Count = 0 Then
|
||||
RemoveUserFromList(userCollection)
|
||||
If Settings.Users.Remove(userCollection) Then userCollection.Dispose()
|
||||
MsgBoxE({$"No users have been added to the [{_col_name}] collection.", MsgTitle}, vbCritical)
|
||||
ElseIf __added_users.Count = 1 And __added_users_not.Count = 0 Then
|
||||
MsgBoxE({$"The user [{__added_users(0)}] has been added to the collection [{_col_name}].", MsgTitle})
|
||||
ElseIf __added_users.Count = 0 And __added_users_not.Count = 1 Then
|
||||
MsgBoxE({$"The user [{__added_users_not(0)}] was not added to the collection [{_col_name}].", MsgTitle}, vbCritical)
|
||||
Else
|
||||
Dim m As New MMessage($"The following users have been added to the [{_col_name}] collection:{vbCr}", MsgTitle,,
|
||||
If(__added_users_not.Count > 0, vbExclamation, vbInformation))
|
||||
m.Text &= __added_users.ListToString(vbCr)
|
||||
If __added_users_not.Count > 0 Then
|
||||
m.Text &= $"{vbNewLine.StringDup(2)}The following users have not been added to the [{_col_name}] collection:{vbCr}"
|
||||
m.Text &= __added_users_not.ListToString(vbCr)
|
||||
End If
|
||||
MsgBoxE(m)
|
||||
End If
|
||||
__added_users.Clear()
|
||||
__added_users_not.Clear()
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -1008,15 +1072,15 @@ CloseResume:
|
||||
If USER_CONTEXT.Visible Then USER_CONTEXT.Hide()
|
||||
Dim ugn As Func(Of IUserData, String) = Function(u) $"{IIf(u.IsCollection, "Collection", "User")}: {u.Name}"
|
||||
Dim m As New MMessage(users.Select(ugn).ListToString(vbNewLine), "Users deleting",
|
||||
{New Messaging.MsgBoxButton("Delete and ban") With {.ToolTip = "Users and their data will be deleted and added to the blacklist"},
|
||||
New Messaging.MsgBoxButton("Delete user only and ban") With {
|
||||
{New MsgBoxButton("Delete and ban") With {.ToolTip = "Users and their data will be deleted and added to the blacklist"},
|
||||
New MsgBoxButton("Delete user only and ban") With {
|
||||
.ToolTip = "Users will be deleted and added to the blacklist (user data will not be deleted)"},
|
||||
New Messaging.MsgBoxButton("Delete and ban with reason") With {
|
||||
New MsgBoxButton("Delete and ban with reason") With {
|
||||
.ToolTip = "Users and their data will be deleted and added to the blacklist with set a reason to delete"},
|
||||
New Messaging.MsgBoxButton("Delete user only and ban with reason") With {
|
||||
New MsgBoxButton("Delete user only and ban with reason") With {
|
||||
.ToolTip = "Users will be deleted and added to the blacklist with set a reason to delete (user data will not be deleted)"},
|
||||
New Messaging.MsgBoxButton("Delete") With {.ToolTip = "Delete users and their data"},
|
||||
New Messaging.MsgBoxButton("Delete user only") With {.ToolTip = "Delete users but keep data"}, "Cancel"},
|
||||
New MsgBoxButton("Delete") With {.ToolTip = "Delete users and their data"},
|
||||
New MsgBoxButton("Delete user only") With {.ToolTip = "Delete users but keep data"}, "Cancel"},
|
||||
MsgBoxStyle.Exclamation) With {.ButtonsPerRow = 2, .ButtonsPlacing = MMessage.ButtonsPlacings.StartToEnd}
|
||||
m.Text = $"The following users ({users.Count}) will be deleted:{vbNewLine}{m.Text}"
|
||||
Dim result% = MsgBoxE(m)
|
||||
@@ -1077,7 +1141,89 @@ CloseResume:
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.LogMessageValue, ex, "Error on trying to delete user / collection")
|
||||
ErrorsDescriber.Execute(EDP.LogMessageValue, ex, "Error when trying to delete user / collection")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub CopyUserData()
|
||||
Const MsgTitle$ = "Copying user data"
|
||||
Try
|
||||
Dim users As List(Of IUserData) = GetSelectedUserArray()
|
||||
If users.ListExists Then
|
||||
Dim f As SFile = Settings.LastCopyPath
|
||||
Dim _select_path As Func(Of Boolean) = Function() As Boolean
|
||||
f = SFile.SelectPath(f, True)
|
||||
If f.Exists(SFO.Path, False) Then
|
||||
Return MsgBoxE({$"Are you sure you want to copy the data to the selected folder?{vbCr}{f}",
|
||||
MsgTitle}, vbQuestion + vbYesNo) = vbYes
|
||||
Else
|
||||
MsgBoxE({$"Destination path not selected.{vbCr}Operation canceled.", MsgTitle}, vbExclamation)
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
If f.Exists(SFO.Path, False) Then
|
||||
Select Case MsgBoxE({$"Last folder you copied to:{vbCr}{f}" & vbCr &
|
||||
"Do you want to copy to this folder or choose another destination?", MsgTitle}, vbQuestion,,,
|
||||
{New MsgBoxButton("Process") With {.ToolTip = "Use last folder"},
|
||||
New MsgBoxButton("Choose new") With {.ToolTip = "Choose a new destination"},
|
||||
New MsgBoxButton("Cancel")})
|
||||
Case 1 : If Not _select_path.Invoke Then Exit Sub
|
||||
Case 2 : MsgBoxE({"Operation canceled", MsgTitle}) : Exit Sub
|
||||
End Select
|
||||
Else
|
||||
If Not _select_path.Invoke Then Exit Sub
|
||||
End If
|
||||
If f.Exists(SFO.Path, False) Then
|
||||
Settings.LastCopyPath.Value = f
|
||||
Using logger As New TextSaver With {.LogMode = True}
|
||||
Dim m As New MMessage("", MsgTitle,,, {logger})
|
||||
Dim err As New ErrorsDescriber(EDP.SendInLog) With {.DeclaredMessage = m}
|
||||
Dim __copied_users As New List(Of IUserData)
|
||||
Dim __copied_users_not As New List(Of IUserData)
|
||||
For Each user As IUserData In users
|
||||
If user.CopyFiles(f, err) Then
|
||||
__copied_users.Add(user)
|
||||
Else
|
||||
__copied_users_not.Add(user)
|
||||
End If
|
||||
Next
|
||||
err = Nothing
|
||||
Dim buttons As New List(Of MsgBoxButton) From {New MsgBoxButton("OK")}
|
||||
If __copied_users_not.Count > 0 Then
|
||||
err = New ErrorsDescriber(EDP.ShowAllMsg)
|
||||
m.Style = If(__copied_users.Count > 0, vbExclamation, vbCritical)
|
||||
If Not logger.IsEmptyString Then
|
||||
m.DefaultButton = 0
|
||||
m.CancelButton = 0
|
||||
buttons.Add(New MsgBoxButton("Show LOG") With {
|
||||
.IsDialogResultButton = False,
|
||||
.BackColor = MyColor.DeleteBack,
|
||||
.ForeColor = MyColor.DeleteFore,
|
||||
.KeyCode = Keys.F1,
|
||||
.ToolTip = "Show error log",
|
||||
.CallBack = Sub(r, mm, b)
|
||||
Using ff As New LOG_FORM(logger) : ff.ShowDialog() : End Using
|
||||
End Sub})
|
||||
End If
|
||||
End If
|
||||
m.Buttons = buttons
|
||||
If __copied_users_not.Count = 0 Then
|
||||
m.Text = "All users are copied."
|
||||
ElseIf __copied_users.Count = 0 And __copied_users_not.Count > 0 Then
|
||||
m.Text = "No users have been copied."
|
||||
Else
|
||||
m.Text = $"The following users have been copied:{vbNewLine}"
|
||||
m.Text &= __copied_users.ListToString(vbNewLine)
|
||||
If __copied_users_not.Count > 0 Then
|
||||
m.Text = $"{vbNewLine.StringDup(2)}The following users have not been copied:{vbNewLine}"
|
||||
m.Text &= __copied_users_not.ListToString(vbNewLine)
|
||||
End If
|
||||
End If
|
||||
MsgBoxE(m,, err)
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorsDescriber.Execute(EDP.LogMessageValue, ex, "Error when trying to copy data")
|
||||
End Try
|
||||
End Sub
|
||||
Friend Sub UserRemovedFromCollection(ByVal User As IUserData)
|
||||
@@ -1090,22 +1236,25 @@ CloseResume:
|
||||
End Sub
|
||||
Private Enum DownUserLimits : None : Number : [Date] : End Enum
|
||||
Private Sub DownloadSelectedUser(ByVal UseLimits As DownUserLimits)
|
||||
Const MsgTitle$ = "Download limit"
|
||||
Dim users As List(Of IUserData) = GetSelectedUserArray()
|
||||
If users.ListExists Then
|
||||
Dim l%? = Nothing
|
||||
Dim d As Date? = Nothing
|
||||
Dim limit%? = Nothing
|
||||
Dim _from As Date? = Nothing
|
||||
Dim _to As Date? = Nothing
|
||||
Dim _fromStr$, _toStr$
|
||||
If UseLimits = DownUserLimits.Number Then
|
||||
Do
|
||||
l = AConvert(Of Integer)(InputBoxE("Enter top posts limit for downloading:", "Download limit", 10), AModes.Var, Nothing)
|
||||
If l.HasValue Then
|
||||
Select Case MsgBoxE(New MMessage($"You are set up downloading top [{l.Value}] posts", "Download limit",
|
||||
limit = AConvert(Of Integer)(InputBoxE("Enter top posts limit for downloading:", MsgTitle, 10), AModes.Var, Nothing)
|
||||
If limit.HasValue Then
|
||||
Select Case MsgBoxE(New MMessage($"You are set up downloading top [{limit.Value}] posts", MsgTitle,
|
||||
{"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : l = Nothing : Exit Do
|
||||
Case 2 : limit = Nothing : Exit Do
|
||||
Case 3 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
Else
|
||||
Select Case MsgBoxE({"You are not set up downloading limit", "Download limit"},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Select Case MsgBoxE({"You are not set up downloading limit", MsgTitle},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
@@ -1113,24 +1262,30 @@ CloseResume:
|
||||
Loop
|
||||
ElseIf UseLimits = DownUserLimits.Date Then
|
||||
Do
|
||||
Using fd As New FDatePickerForm(Nothing)
|
||||
Using fd As New FDatePickerForm(Nothing, Nothing)
|
||||
fd.ShowDialog()
|
||||
If fd.DialogResult = DialogResult.OK Then
|
||||
d = fd.SelectedDate
|
||||
_from = fd.DateFrom
|
||||
_to = fd.DateTo
|
||||
ElseIf fd.DialogResult = DialogResult.Abort Then
|
||||
d = Nothing
|
||||
_from = Nothing
|
||||
_to = Nothing
|
||||
End If
|
||||
End Using
|
||||
If d.HasValue Then
|
||||
Select Case MsgBoxE(New MMessage($"You are set up downloading posts until [{d.Value.Date.ToStringDate(ADateTime.Formats.BaseDate)}]",
|
||||
"Download limit",
|
||||
{"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index
|
||||
If _from.HasValue Or _to.HasValue Then
|
||||
_fromStr = AConvert(Of String)(_from, ADateTime.Formats.BaseDate, String.Empty)
|
||||
_toStr = AConvert(Of String)(_to, ADateTime.Formats.BaseDate, String.Empty)
|
||||
If Not _fromStr.IsEmptyString Then _fromStr = $"FROM [{_fromStr}]"
|
||||
If Not _toStr.IsEmptyString Then _toStr = $"TO [{_toStr}]"
|
||||
If Not _toStr.IsEmptyString And Not _fromStr.IsEmptyString Then _fromStr &= " "
|
||||
Select Case MsgBoxE(New MMessage($"You have set a date limit for downloading posts: {_fromStr}{_toStr}", MsgTitle,
|
||||
{"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : d = Nothing : Exit Do
|
||||
Case 2 : _from = Nothing : _to = Nothing : Exit Do
|
||||
Case 3 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
Else
|
||||
Select Case MsgBoxE({"You are not set up a date limit", "Download limit"},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Select Case MsgBoxE({"You have not set a date limit", MsgTitle},,,, {"Confirm", "Try again", "Cancel"}).Index
|
||||
Case 0 : Exit Do
|
||||
Case 2 : GoTo CancelDownloadingOperation
|
||||
End Select
|
||||
@@ -1144,18 +1299,17 @@ CancelDownloadingOperation:
|
||||
MsgBoxE("Operation canceled")
|
||||
Exit Sub
|
||||
ResumeDownloadingOperation:
|
||||
If users.Count = 1 Then
|
||||
users(0).DownloadTopCount = l
|
||||
users(0).DownloadToDate = d
|
||||
Downloader.Add(users(0))
|
||||
Else
|
||||
Dim uStr$ = users.Select(Function(u) u.ToString()).ListToString(vbNewLine)
|
||||
If MsgBoxE({$"You are select {users.Count} users' profiles{vbNewLine}Do you want to download all of them?{vbNewLine.StringDup(2)}" &
|
||||
$"Selected users:{vbNewLine}{uStr}", "A few users selected"},
|
||||
MsgBoxStyle.Question + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
users.ForEach(Sub(u) u.DownloadTopCount = l)
|
||||
Downloader.AddRange(users)
|
||||
End If
|
||||
Dim uStr$ = If(users.Count = 1, String.Empty, users.Select(Function(u) u.ToString()).ListToString(vbNewLine))
|
||||
If users.Count = 1 OrElse MsgBoxE({$"You have selected {users.Count} user profiles" & vbCr &
|
||||
$"Do you want to download them all?{vbNewLine.StringDup(2)}" &
|
||||
$"Selected users:{vbNewLine}{uStr}", "Multiple users selected"},
|
||||
MsgBoxStyle.Question + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
users.ForEach(Sub(u)
|
||||
u.DownloadTopCount = limit
|
||||
u.DownloadDateFrom = _from
|
||||
u.DownloadDateTo = _to
|
||||
End Sub)
|
||||
Downloader.AddRange(users)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -1171,10 +1325,10 @@ ResumeDownloadingOperation:
|
||||
Dim a As Action = Sub()
|
||||
Dim i% = LIST_PROFILES.Items.IndexOfKey(Key)
|
||||
If i < 0 Then
|
||||
i = Settings.Users.FindIndex(Function(u) u.Key = Key)
|
||||
If i >= 0 Then
|
||||
UserListUpdate(Settings.Users(i), True)
|
||||
i = LIST_PROFILES.Items.IndexOfKey(Key)
|
||||
Dim u As IUserData = Settings.GetUser(Key, True)
|
||||
If Not u Is Nothing Then
|
||||
UserListUpdate(u, True)
|
||||
i = LIST_PROFILES.Items.IndexOfKey(u.Key)
|
||||
End If
|
||||
End If
|
||||
If i >= 0 Then
|
||||
|
||||
@@ -83,6 +83,11 @@ Friend Module MainMod
|
||||
Deleted = 10000
|
||||
Suspended = 12000
|
||||
End Enum
|
||||
Friend Enum ShowingDates As Integer
|
||||
[Off] = 0
|
||||
[Not] = 1
|
||||
[In] = 2
|
||||
End Enum
|
||||
Friend Enum FileNameReplaceMode As Integer
|
||||
None = 0
|
||||
Replace = 1
|
||||
@@ -95,6 +100,7 @@ Friend Module MainMod
|
||||
Friend MyProgressForm As ActiveDownloadingProgress
|
||||
Friend MainFrameObj As MainFrameObjects
|
||||
Friend ReadOnly ParsersDataDateProvider As New ADateTime(ADateTime.Formats.BaseDateTime)
|
||||
Friend ReadOnly FeedVideoLengthProvider As New ADateTime("hh\:mm\:ss") With {.TimeParseMode = ADateTime.TimeModes.TimeSpan}
|
||||
Friend ReadOnly LogConnector As New LogHost
|
||||
#Region "File name operations"
|
||||
Friend FileDateAppenderProvider As IFormatProvider
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.10.0")>
|
||||
<Assembly: AssemblyVersion("2022.9.24.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.9.24.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
20
SCrawler/My Project/Resources.Designer.vb
generated
@@ -170,6 +170,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property PastePic32() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("PastePic32", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
@@ -350,6 +360,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property StopPic32() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("StopPic32", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
'''</summary>
|
||||
|
||||
@@ -211,4 +211,10 @@
|
||||
<data name="RSSPic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\RSSPic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="StopPic32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\StopPic32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PastePic32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Content\Pictures\PastePic32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -93,6 +93,7 @@ Namespace Plugin.Hosts
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Base properties compatibility"
|
||||
Friend ReadOnly Property DownloadSiteData As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property Temporary As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property DownloadImages As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property DownloadVideos As XMLValue(Of Boolean)
|
||||
@@ -263,6 +264,8 @@ Namespace Plugin.Hosts
|
||||
DownloadVideos.SetExtended("DownloadVideos", True, _XML, n)
|
||||
DownloadVideos.SetDefault(_Vids)
|
||||
|
||||
DownloadSiteData = New XMLValue(Of Boolean)("DownloadSiteData", True, _XML, n)
|
||||
|
||||
GetUserMediaOnly = New XMLValue(Of Boolean)("GetUserMediaOnly", True, _XML, n)
|
||||
If PropList.Count > 0 Then
|
||||
Dim MaxOffset% = Math.Max(PropList.Max(Function(pp) pp.LeftOffset), PropertyValueHost.LeftOffsetDefault)
|
||||
@@ -318,11 +321,15 @@ Namespace Plugin.Hosts
|
||||
Private _AvailableAsked As Boolean = False
|
||||
Private _ActiveTaskCount As Integer = 0
|
||||
Friend Function Available(ByVal What As Download, ByVal Silent As Boolean) As Boolean
|
||||
If Not _AvailableAsked Then
|
||||
_AvailableValue = Source.Available(What, Silent)
|
||||
_AvailableAsked = True
|
||||
If DownloadSiteData Then
|
||||
If Not _AvailableAsked Then
|
||||
_AvailableValue = Source.Available(What, Silent)
|
||||
_AvailableAsked = True
|
||||
End If
|
||||
Return _AvailableValue
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return _AvailableValue
|
||||
End Function
|
||||
Friend Sub DownloadStarted(ByVal What As Download)
|
||||
_ActiveTaskCount += 1
|
||||
|
||||
@@ -53,7 +53,8 @@ Namespace Plugin.Hosts
|
||||
.SeparateVideoFolder = SeparateVideoFolderF
|
||||
.DataPath = MyFile.CutPath.PathNoSeparator
|
||||
.PostsNumberLimit = DownloadTopCount
|
||||
.PostsDateLimit = DownloadToDate
|
||||
.DownloadDateFrom = DownloadDateFrom
|
||||
.DownloadDateTo = DownloadDateTo
|
||||
|
||||
.ExistingContentList = New List(Of PluginUserMedia)
|
||||
.TempMediaList = New List(Of PluginUserMedia)
|
||||
|
||||
@@ -491,6 +491,8 @@
|
||||
<None Include="Content\Pictures\RSSPic.png" />
|
||||
<None Include="Content\Icons\RedGifsIcon.ico" />
|
||||
<None Include="Content\Icons\RSSIcon.ico" />
|
||||
<None Include="Content\Pictures\StopPic32.png" />
|
||||
<None Include="Content\Pictures\PastePic32.png" />
|
||||
<Content Include="ffmpeg.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -36,6 +36,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
Friend Property Channels As Reddit.ChannelsCollection
|
||||
Friend ReadOnly Property Labels As LabelsKeeper
|
||||
Friend ReadOnly Property Groups As Groups.DownloadGroupCollection
|
||||
Friend ReadOnly Property LastCollections As List(Of String)
|
||||
Friend Property Automation As Scheduler
|
||||
Friend ReadOnly Property BlackList As List(Of UserBan)
|
||||
Private ReadOnly BlackListFile As SFile = $"{SettingsFolderName}\BlackList.txt"
|
||||
@@ -52,9 +53,11 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
UsersList = New List(Of UserInfo)
|
||||
BlackList = New List(Of UserBan)
|
||||
Plugins = New List(Of PluginHost)
|
||||
LastCollections = New List(Of String)
|
||||
|
||||
GlobalPath = New XMLValue(Of SFile)("GlobalPath", New SFile($"{SFile.GetPath(Application.StartupPath).PathWithSeparator}Data\"), MyXML,,
|
||||
New XMLValueBase.ToFilePath)
|
||||
LastCopyPath = New XMLValue(Of SFile)("LastCopyPath",, MyXML,, New XMLValueBase.ToFilePath)
|
||||
|
||||
CookiesEncrypted = New XMLValue(Of Boolean)("CookiesEncrypted", False, MyXML)
|
||||
EncryptCookies.CookiesEncrypted = CookiesEncrypted
|
||||
@@ -77,9 +80,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
|
||||
FastProfilesLoading = New XMLValue(Of Boolean)("FastProfilesLoading", False, MyXML)
|
||||
MaxLargeImageHeight = New XMLValue(Of Integer)("MaxLargeImageHeight", 150, MyXML)
|
||||
MaxLargeImageHeight.ReplaceByValue("MaxLargeImageHeigh",, MyXML)
|
||||
MaxSmallImageHeight = New XMLValue(Of Integer)("MaxSmallImageHeight", 15, MyXML)
|
||||
MaxSmallImageHeight.ReplaceByValue("MaxSmallImageHeigh",, MyXML)
|
||||
DownloadOpenInfo = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenInfo", "OpenAgain", False, False, MyXML)
|
||||
DownloadOpenProgress = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenProgress", "OpenAgain", False, False, MyXML)
|
||||
DownloadsCompleteCommand = New XMLValueAttribute(Of String, Boolean)("DownloadsCompleteCommand", "Use",,, MyXML)
|
||||
@@ -97,8 +98,13 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
|
||||
LatestSavingPath = New XMLValue(Of SFile)("LatestSavingPath", Nothing, MyXML,, New XMLValueBase.ToFilePath)
|
||||
LatestSelectedChannel = New XMLValue(Of String)("LatestSelectedChannel",, MyXML)
|
||||
LastUpdatedLimit = New XMLValue(Of Date)
|
||||
LastUpdatedLimit.SetExtended("LastUpdatedLimit",, MyXML)
|
||||
|
||||
_ViewDateFrom = New XMLValue(Of Date)
|
||||
_ViewDateFrom.SetExtended("ViewDateFrom",, MyXML)
|
||||
_ViewDateTo = New XMLValue(Of Date)
|
||||
_ViewDateTo.SetExtended("ViewDateTo",, MyXML)
|
||||
ViewDateMode = New XMLValue(Of Integer)("ViewDateMode", ShowingDates.Off, MyXML)
|
||||
|
||||
LatestDownloadedSites = New XMLValuesCollection(Of String)(XMLValueBase.ListModes.String, "LatestDownloadedSites", MyXML)
|
||||
|
||||
SelectedSites = New XMLValuesCollection(Of String)(XMLValueBase.ListModes.String, "SelectedSites", MyXML, {Name_Node_Sites})
|
||||
@@ -119,6 +125,8 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
FeedDataColumns = New XMLValue(Of Integer)("DataColumns", 1, MyXML, n)
|
||||
FeedDataRows = New XMLValue(Of Integer)("DataRows", 10, MyXML, n)
|
||||
FeedEndless = New XMLValue(Of Boolean)("Endless", True, MyXML, n)
|
||||
FeedAddDateToCaption = New XMLValue(Of Boolean)("AddDateToCaption", True, MyXML, n)
|
||||
FeedAddSessionToCaption = New XMLValue(Of Boolean)("AddSessionToCaption", False, MyXML, n)
|
||||
|
||||
n = {"Users"}
|
||||
FromChannelDownloadTop = New XMLValue(Of Integer)("FromChannelDownloadTop", 10, MyXML, n)
|
||||
@@ -343,47 +351,24 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
_UserListUpdateRequired = True
|
||||
End Try
|
||||
End Sub
|
||||
Friend Overloads Function GetUser(ByVal User As IUserData) As IUserData
|
||||
If Users.Count > 0 Then
|
||||
Dim uSimple As Predicate(Of IUserData) = Function(u) u.Equals(DirectCast(User, UserDataBase))
|
||||
Dim uCol As Predicate(Of IUserData) = Function(ByVal u As IUserData) As Boolean
|
||||
If u.IsCollection Then
|
||||
Return DirectCast(u, UserDataBind).Collections.Exists(uSimple)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Dim uu As Predicate(Of IUserData)
|
||||
If User.IncludedInCollection Then uu = uCol Else uu = uSimple
|
||||
Dim i% = Users.FindIndex(uu)
|
||||
If i >= 0 Then
|
||||
If Users(i).IsCollection Then
|
||||
With DirectCast(Users(i), UserDataBind)
|
||||
i = .Collections.FindIndex(uSimple)
|
||||
If i >= 0 Then Return .Collections(i)
|
||||
End With
|
||||
Else
|
||||
Return Users(i)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return Nothing
|
||||
Friend Overloads Function GetUser(ByVal User As IUserData, Optional ByVal GetCollection As Boolean = False) As IUserData
|
||||
Return GetUser(If(User?.Key, String.Empty), GetCollection)
|
||||
End Function
|
||||
Friend Overloads Function GetUser(ByVal UserKey As String) As IUserData
|
||||
If Users.Count > 0 Then
|
||||
Friend Overloads Function GetUser(ByVal UserKey As String, Optional ByVal GetCollection As Boolean = False) As IUserData
|
||||
If Users.Count > 0 And Not UserKey.IsEmptyString Then
|
||||
Dim finder As Predicate(Of IUserData) = Function(u) u.Key = UserKey
|
||||
Dim i%, ii%
|
||||
For i = 0 To Users.Count - 1
|
||||
With Users(i)
|
||||
If .IsCollection Then
|
||||
If finder.Invoke(.Self) Then
|
||||
Return .Self
|
||||
ElseIf .IsCollection Then
|
||||
With DirectCast(.Self, UserDataBind)
|
||||
If .Count > 0 Then
|
||||
ii = .Collections.FindIndex(finder)
|
||||
If ii >= 0 Then Return .Collections(ii)
|
||||
If ii >= 0 Then Return If(GetCollection, .Self, .Collections(ii))
|
||||
End If
|
||||
End With
|
||||
Else
|
||||
If finder.Invoke(.Self) Then Return .Self
|
||||
End If
|
||||
End With
|
||||
Next
|
||||
@@ -440,6 +425,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
End Get
|
||||
End Property
|
||||
Friend ReadOnly Property GlobalPath As XMLValue(Of SFile)
|
||||
Friend ReadOnly Property LastCopyPath As XMLValue(Of SFile)
|
||||
Friend ReadOnly Property SeparateVideoFolder As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property CollectionsPath As XMLValue(Of String)
|
||||
Friend ReadOnly Property CollectionsPathF As SFile
|
||||
@@ -498,15 +484,27 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
Friend ReadOnly Property UseGrouping As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property ShowGroupsInsteadLabels As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property SelectedSites As XMLValuesCollection(Of String)
|
||||
Private ReadOnly LastUpdatedLimit As XMLValue(Of Date)
|
||||
Friend Property LastUpdatedDate As Date?
|
||||
#Region "View dates"
|
||||
Private ReadOnly _ViewDateFrom As XMLValue(Of Date)
|
||||
Friend Property ViewDateFrom As Date?
|
||||
Get
|
||||
If LastUpdatedLimit.ValueF.Exists Then Return LastUpdatedLimit.Value Else Return Nothing
|
||||
If _ViewDateFrom.ValueF.Exists Then Return _ViewDateFrom.Value Else Return Nothing
|
||||
End Get
|
||||
Set(ByVal NewDate As Date?)
|
||||
If Not NewDate.HasValue Then LastUpdatedLimit.ValueF = Nothing Else LastUpdatedLimit.Value = NewDate.Value
|
||||
Set(ByVal d As Date?)
|
||||
If Not d.HasValue Then _ViewDateFrom.ValueF = Nothing Else _ViewDateFrom.Value = d.Value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly _ViewDateTo As XMLValue(Of Date)
|
||||
Friend Property ViewDateTo As Date?
|
||||
Get
|
||||
If _ViewDateTo.ValueF.Exists Then Return _ViewDateTo.Value Else Return Nothing
|
||||
End Get
|
||||
Set(ByVal d As Date?)
|
||||
If Not d.HasValue Then _ViewDateTo.ValueF = Nothing Else _ViewDateTo.Value = d.Value
|
||||
End Set
|
||||
End Property
|
||||
Friend ReadOnly Property ViewDateMode As XMLValue(Of Integer)
|
||||
#End Region
|
||||
#End Region
|
||||
#Region "Latest values"
|
||||
Friend ReadOnly Property LatestSavingPath As XMLValue(Of SFile)
|
||||
@@ -527,6 +525,8 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
Friend ReadOnly Property FeedDataColumns As XMLValue(Of Integer)
|
||||
Friend ReadOnly Property FeedDataRows As XMLValue(Of Integer)
|
||||
Friend ReadOnly Property FeedEndless As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedAddDateToCaption As XMLValue(Of Boolean)
|
||||
Friend ReadOnly Property FeedAddSessionToCaption As XMLValue(Of Boolean)
|
||||
#End Region
|
||||
#Region "New version properties"
|
||||
Friend ReadOnly Property CheckUpdatesAtStart As XMLValue(Of Boolean)
|
||||
@@ -558,6 +558,7 @@ Friend Class SettingsCLS : Implements IDisposable
|
||||
If Not Automation Is Nothing Then Automation.Dispose()
|
||||
CachePath.Delete(SFO.Path, SFODelete.DeletePermanently, EDP.None)
|
||||
Plugins.Clear()
|
||||
LastCollections.Clear()
|
||||
Users.ListClearDispose
|
||||
UsersList.Clear()
|
||||
SelectedSites.Dispose()
|
||||
|
||||