Compare commits

..

2 Commits

Author SHA1 Message Date
Andy
eb28255de3 2022.9.17.0
Extended filters by date
Added download by dates for multiple users
Changed validation of dates ranges in UserDataBase
Add user filters by dates
Add disabling site downloading
Fixed Twitter date validator
2022-09-17 19:59:55 +03:00
Andy
92be0994ae 2022.9.16.0
Removed some compatible functions
Fixed Settings.GetUser bug
Design improvements
Changed UserMediD comparer
FeedVideo design updated, incorrect time position fixed, bugs fixed
Fixed getting Reddit channel video thumbnail
2022-09-16 19:41:24 +03:00
36 changed files with 619 additions and 320 deletions

View File

@@ -1,3 +1,28 @@
# 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.9.13.0
*2022-09-13* *2022-09-13*

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2022.9.10.0")> <Assembly: AssemblyVersion("2022.9.17.0")>
<Assembly: AssemblyFileVersion("2022.9.10.0")> <Assembly: AssemblyFileVersion("2022.9.17.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -38,7 +38,8 @@ Public Class UserData : Implements IPluginContentProvider
Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder
Public Property DataPath As String Implements IPluginContentProvider.DataPath Public Property DataPath As String Implements IPluginContentProvider.DataPath
Public Property PostsNumberLimit As Integer? Implements IPluginContentProvider.PostsNumberLimit 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 #End Region
#Region "Interface exchange options" #Region "Interface exchange options"
Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2022.9.10.0")> <Assembly: AssemblyVersion("2022.9.17.0")>
<Assembly: AssemblyFileVersion("2022.9.10.0")> <Assembly: AssemblyFileVersion("2022.9.17.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -37,7 +37,8 @@ Public Class UserData : Implements IPluginContentProvider
Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder Public Property SeparateVideoFolder As Boolean Implements IPluginContentProvider.SeparateVideoFolder
Public Property DataPath As String Implements IPluginContentProvider.DataPath Public Property DataPath As String Implements IPluginContentProvider.DataPath
Public Property PostsNumberLimit As Integer? Implements IPluginContentProvider.PostsNumberLimit 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 #End Region
#Region "Interface exchange options" #Region "Interface exchange options"
Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet Public Sub ExchangeOptionsSet(ByVal Obj As Object) Implements IPluginContentProvider.ExchangeOptionsSet

View File

@@ -26,7 +26,8 @@ Namespace Plugin
Property SeparateVideoFolder As Boolean Property SeparateVideoFolder As Boolean
Property DataPath As String Property DataPath As String
Property PostsNumberLimit As Integer? Property PostsNumberLimit As Integer?
Property PostsDateLimit As Date? Property DownloadDateFrom As Date?
Property DownloadDateTo As Date?
Function ExchangeOptionsGet() As Object Function ExchangeOptionsGet() As Object
Sub ExchangeOptionsSet(ByVal Obj As Object) Sub ExchangeOptionsSet(ByVal Obj As Object)
Sub XmlFieldsSet(ByVal Fields As List(Of KeyValuePair(Of String, String))) Sub XmlFieldsSet(ByVal Fields As List(Of KeyValuePair(Of String, String)))

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2022.9.10.0")> <Assembly: AssemblyVersion("2022.9.17.0")>
<Assembly: AssemblyFileVersion("2022.9.10.0")> <Assembly: AssemblyFileVersion("2022.9.17.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -550,23 +550,31 @@ BlockNullPicture:
End Function End Function
Friend Overridable ReadOnly Property FitToAddParams As Boolean Implements IUserData.FitToAddParams Friend Overridable ReadOnly Property FitToAddParams As Boolean Implements IUserData.FitToAddParams
Get Get
If Settings.LastUpdatedDate.HasValue AndAlso LastUpdated.HasValue AndAlso With Settings
LastUpdated.Value.Date > Settings.LastUpdatedDate.Value.Date Then Return False If LastUpdated.HasValue And Not .ViewDateMode.Value = ShowingDates.Off Then
If Not Settings.Labels.ExcludedIgnore AndAlso Settings.Labels.Excluded.ValuesList.ListContains(Labels) Then Return False Dim f As Date = If(.ViewDateFrom.HasValue, .ViewDateFrom.Value.Date, Date.MinValue.Date)
If Settings.SelectedSites.Count = 0 OrElse Settings.SelectedSites.Contains(Site) Then Dim t As Date = If(.ViewDateTo.HasValue, .ViewDateTo.Value.Date, Date.MaxValue.Date)
Select Case Settings.ShowingMode.Value Select Case DirectCast(.ViewMode.Value, ShowingDates)
Case ShowingModes.Regular : Return Not Temporary And Not Favorite Case ShowingDates.In : If Not LastUpdated.Value.ValueBetween(f, t) Then Return False
Case ShowingModes.Temporary : Return Temporary Case ShowingDates.Not : If LastUpdated.Value.ValueBetween(f, t) Then Return False
Case ShowingModes.Favorite : Return Favorite End Select
Case ShowingModes.Deleted : Return Not UserExists End If
Case ShowingModes.Suspended : Return UserSuspended If Not .Labels.ExcludedIgnore AndAlso .Labels.Excluded.ValuesList.ListContains(Labels) Then Return False
Case ShowingModes.Labels : Return Settings.Labels.Current.ValuesList.ListContains(Labels) If .SelectedSites.Count = 0 OrElse .SelectedSites.Contains(Site) Then
Case ShowingModes.NoLabels : Return Labels.Count = 0 Select Case .ShowingMode.Value
Case Else : Return True Case ShowingModes.Regular : Return Not Temporary And Not Favorite
End Select Case ShowingModes.Temporary : Return Temporary
Else Case ShowingModes.Favorite : Return Favorite
Return False Case ShowingModes.Deleted : Return Not UserExists
End If 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 Get
End Property End Property
Friend Function GetLVIGroup(ByVal Destination As ListView) As ListViewGroup Implements IUserData.GetLVIGroup Friend Function GetLVIGroup(ByVal Destination As ListView) As ListViewGroup Implements IUserData.GetLVIGroup
@@ -792,9 +800,52 @@ BlockNullPicture:
GlobalOpenPath(MyFile.CutPath) GlobalOpenPath(MyFile.CutPath)
End Sub End Sub
#End Region #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 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 Protected Responser As Response
Friend Overridable Sub DownloadData(ByVal Token As CancellationToken) Implements IContentProvider.DownloadData Friend Overridable Sub DownloadData(ByVal Token As CancellationToken) Implements IContentProvider.DownloadData
Dim Canceled As Boolean = False Dim Canceled As Boolean = False
@@ -883,21 +934,11 @@ BlockNullPicture:
If Not Canceled Then _DataParsed = True If Not Canceled Then _DataParsed = True
_ContentNew.Clear() _ContentNew.Clear()
DownloadTopCount = Nothing DownloadTopCount = Nothing
DownloadToDate = Nothing DownloadDateFrom = Nothing
DownloadDateTo = Nothing
DownloadMissingOnly = False DownloadMissingOnly = False
End Try End Try
End Sub 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() Protected Sub UpdateDataFiles()
If Not User.File.IsEmptyString Then If Not User.File.IsEmptyString Then
MyFileData = User.File MyFileData = User.File
@@ -1213,6 +1254,16 @@ BlockNullPicture:
Return IIf(FriendlyName.IsEmptyString, Name, FriendlyName) Return IIf(FriendlyName.IsEmptyString, Name, FriendlyName)
End If End If
End Function 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" #Region "Buttons actions"
Private Sub BTT_CONTEXT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DOWN.Click Private Sub BTT_CONTEXT_DOWN_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_DOWN.Click
Downloader.Add(Me) Downloader.Add(Me)
@@ -1350,7 +1401,8 @@ BlockNullPicture:
Sub OpenFolder() Sub OpenFolder()
ReadOnly Property Self As IUserData ReadOnly Property Self As IUserData
Property DownloadTopCount As Integer? 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, Sub SetEnvironment(ByRef h As SettingsHost, ByVal u As UserInfo, ByVal _LoadUserInformation As Boolean,
Optional ByVal AttachUserInfo As Boolean = True) Optional ByVal AttachUserInfo As Boolean = True)
ReadOnly Property Disposed As Boolean ReadOnly Property Disposed As Boolean

View File

@@ -329,7 +329,10 @@ Namespace API.Instagram
If IsSavedPosts Then If IsSavedPosts Then
_SavedPostsIDs.Add(PostID) _SavedPostsIDs.Add(PostID)
Else Else
If Not CheckDatesLimit(PostDate, DateProvider) And Not Pinned 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) ObtainMedia(node, PostID, PostDate, SpecFolder)
End If End If
Next Next

View File

@@ -164,6 +164,8 @@ Namespace API.Reddit
End If End If
If DownloadTopCount.HasValue Then DownloadLimitCount = DownloadTopCount If DownloadTopCount.HasValue Then DownloadLimitCount = DownloadTopCount
End If End If
If SaveToCache AndAlso Not Responser.Decoders.Contains(SymbolsConverter.Converters.HTML) Then _
Responser.Decoders.Add(SymbolsConverter.Converters.HTML)
DownloadDataChannel(String.Empty, Token) DownloadDataChannel(String.Empty, Token)
If ChannelInfo Is Nothing Then _TempPostsList.ListAddList(_TempMediaList.Select(Function(m) m.Post.ID), LNC) If ChannelInfo Is Nothing Then _TempPostsList.ListAddList(_TempMediaList.Select(Function(m) m.Post.ID), LNC)
Else Else
@@ -228,7 +230,10 @@ Namespace API.Reddit
Continue For Continue For
End If End If
If nn.Contains("created") Then PostDate = nn("created").Value Else PostDate = String.Empty 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 _ItemsBefore = _TempMediaList.Count
added = True added = True
@@ -371,9 +376,10 @@ Namespace API.Reddit
ElseIf Not s.Value({"media", "reddit_video"}, "fallback_url").IsEmptyString Then ElseIf Not s.Value({"media", "reddit_video"}, "fallback_url").IsEmptyString Then
tmpUrl = s.Value({"media", "reddit_video"}, "fallback_url") tmpUrl = s.Value({"media", "reddit_video"}, "fallback_url")
If SaveToCache Then If SaveToCache Then
tmpUrl = s.Value("thumbnail") 'tmpUrl = s.Value("thumbnail")
tmpUrl = GetVideoRedditPreview(s)
If Not tmpUrl.IsEmptyString Then 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 _TotalPostsDownloaded += 1
End If End If
ElseIf UseM3U8 AndAlso Not s.Value({"media", "reddit_video"}, "hls_url").IsEmptyString Then ElseIf UseM3U8 AndAlso Not s.Value({"media", "reddit_video"}, "hls_url").IsEmptyString Then
@@ -471,6 +477,38 @@ Namespace API.Reddit
Return False Return False
End Try End Try
End Function 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) Protected Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
Try Try
ThrowAny(Token) ThrowAny(Token)
@@ -593,12 +631,13 @@ Namespace API.Reddit
#End Region #End Region
#Region "Structure creator" #Region "Structure creator"
Protected Shared Function MediaFromData(ByVal t As UTypes, ByVal _URL As String, ByVal PostID As String, ByVal PostDate As String, 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 If _URL.IsEmptyString And t = UTypes.Picture Then Return Nothing
_URL = LinkFormatterSecure(RegexReplace(_URL.Replace("\", String.Empty), LinkPattern)) _URL = LinkFormatterSecure(RegexReplace(_URL.Replace("\", String.Empty), LinkPattern))
Dim m As New UserMedia(_URL, t) With {.Post = New UserPost With {.ID = PostID, .UserID = _UserID}} 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 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 If Not PostDate.IsEmptyString Then m.Post.Date = AConvert(Of Date)(PostDate, DateTrueProvider(IsChannel), Nothing) Else m.Post.Date = Nothing
Return m Return m
End Function End Function

View File

@@ -37,7 +37,10 @@ Namespace API.RedGifs
pTotal = j.Value("pages").FromXML(Of Integer)(0) pTotal = j.Value("pages").FromXML(Of Integer)(0)
For Each g As EContainer In j("gifs") For Each g As EContainer In j("gifs")
postDate = g.Value("createDate") 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") postID = g.Value("id")
If Not _TempPostsList.Contains(postID) Then _TempPostsList.Add(postID) Else Exit For If Not _TempPostsList.Contains(postID) Then _TempPostsList.Add(postID) Else Exit For
ObtainMedia(g, postID, postDate) ObtainMedia(g, postID, postDate)

View File

@@ -86,7 +86,10 @@ Namespace API.Twitter
'Date Pattern: 'Date Pattern:
'Sat Jan 01 01:10:15 +0000 2000 'Sat Jan 01 01:10:15 +0000 2000
If nn.Contains("created_at") Then PostDate = nn("created_at").Value Else PostDate = String.Empty 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 If Not _TempPostsList.Contains(PostID) Then
NewPostDetected = True NewPostDetected = True

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

View File

@@ -44,6 +44,7 @@ Namespace DownloadObjects
Private Sub DownloadFeedForm_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub DownloadFeedForm_Load(sender As Object, e As EventArgs) Handles Me.Load
With MyDefs With MyDefs
.MyViewInitialize() .MyViewInitialize()
LastWinState = WindowState
With MyRange With MyRange
.AutoToolTip = True .AutoToolTip = True
.ButtonKey(RCI.Previous) = Keys.F3 .ButtonKey(RCI.Previous) = Keys.F3
@@ -91,7 +92,7 @@ Namespace DownloadObjects
Dim p% = IIf(DataColumns = 1, 100, 50) Dim p% = IIf(DataColumns = 1, 100, 50)
For i = 0 To DataColumns - 1 : .ColumnStyles.Add(New ColumnStyle(SizeType.Percent, p)) : Next For i = 0 To DataColumns - 1 : .ColumnStyles.Add(New ColumnStyle(SizeType.Percent, p)) : Next
.ColumnCount = .ColumnStyles.Count .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 .RowCount = .RowStyles.Count
.HorizontalScroll.Visible = False .HorizontalScroll.Visible = False
End With End With
@@ -177,8 +178,8 @@ Namespace DownloadObjects
Friend ReadOnly Row As Integer Friend ReadOnly Row As Integer
Friend ReadOnly Column As Integer Friend ReadOnly Column As Integer
Friend Sub New(ByVal RowsCount As Integer, ByVal ColumnsCount As Integer) Friend Sub New(ByVal RowsCount As Integer, ByVal ColumnsCount As Integer)
Me.RowsCount = RowsCount - 1 Me.RowsCount = RowsCount
Me.ColumnsCount = ColumnsCount - 1 Me.ColumnsCount = ColumnsCount
Row = 0 Row = 0
Column = 0 Column = 0
End Sub End Sub
@@ -190,86 +191,71 @@ Namespace DownloadObjects
Friend Function [Next]() As TPCELL Friend Function [Next]() As TPCELL
Dim r% = Row Dim r% = Row
Dim c% = Column + 1 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) Return New TPCELL(RowsCount, ColumnsCount, r, c)
End Function End Function
End Structure End Structure
Private RefillInProgress As Boolean = False
Private Sub MyRange_IndexChanged(ByVal Sender As IRangeSwitcherProvider, ByVal e As EventArgs) Handles MyRange.IndexChanged Private Sub MyRange_IndexChanged(ByVal Sender As IRangeSwitcherProvider, ByVal e As EventArgs) Handles MyRange.IndexChanged
Try Try
If Sender.CurrentIndex >= 0 Then If Not RefillInProgress AndAlso Sender.CurrentIndex >= 0 Then
RefillInProgress = True
AllowTopScroll = False AllowTopScroll = False
ScrollSuspended = True 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% Dim i%
If d.Count > 0 Then If d.ListExists Then
ClearTable() ClearTable()
If Sender.CurrentIndex > 0 And FeedEndless Then If Sender.CurrentIndex > 0 And FeedEndless Then
i = MyRange.Indexes(Sender.CurrentIndex - 1, EDP.ReturnValue).DefaultIfEmpty(-1).Last d2 = DirectCast(MyRange.Switcher, RangeSwitcher(Of UserMediaD)).Item(Sender.CurrentIndex - 1).ListTake(-2, DataColumns, EDP.ReturnValue).ListIfNothing
If i.ValueBetween(0, DataList.Count - 1) Then If d2.Count > 0 Then d.InsertRange(0, d2) : d2.Clear()
If d.Count = 0 Then d.Add(i) Else d.Insert(0, i)
End If
End If End If
Dim w% = GetWidth() Dim w% = GetWidth()
Dim hp% = PaddingE.GetOf({TP_DATA}).Vertical(2)
Dim p As New TPCELL(DataRows, DataColumns) Dim p As New TPCELL(DataRows, DataColumns)
Dim fmList As New List(Of FeedMedia) Dim fmList As New List(Of FeedMedia)
Dim rhd As New Dictionary(Of Integer, List(Of Integer)) d.ForEach(Sub(de) fmList.Add(New FeedMedia(de, w)))
For Each i In d
If i.ValueBetween(0, DataList.Count - 1) Then fmList.Add(New FeedMedia(DataList(i), w))
Next
If fmList.Count > 0 Then fmList.ListDisposeRemoveAll(Function(fm) fm Is Nothing OrElse fm.HasError) If fmList.Count > 0 Then fmList.ListDisposeRemoveAll(Function(fm) fm Is Nothing OrElse fm.HasError)
If fmList.Count > 0 Then If fmList.Count > 0 Then
For i = 0 To fmList.Count - 1 For i = 0 To fmList.Count - 1
If Not rhd.ContainsKey(p.Row) Then rhd.Add(p.Row, New List(Of Integer)) ControlInvoke(TP_DATA, Sub() TP_DATA.Controls.Add(fmList(i), p.Column, p.Row))
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)
p = p.Next p = p.Next
Next Next
End If End If
ResizeGrid()
fmList.Clear() fmList.Clear()
rhd.ListForEach(Sub(kv, ii) kv.Value.Clear())
rhd.Clear()
d.Clear() d.Clear()
End If End If
RefillInProgress = False
End If End If
Catch ex As Exception Catch ex As Exception
ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[DownloadObjects.DownloadFeedForm.Range.IndexChanged({Sender.CurrentIndex})]") ErrorsDescriber.Execute(EDP.SendInLog, ex, $"[DownloadObjects.DownloadFeedForm.Range.IndexChanged({Sender.CurrentIndex})]")
RefillInProgress = False
Finally Finally
ControlInvoke(TP_DATA, Sub() If Not RefillInProgress Then
With TP_DATA.VerticalScroll ControlInvoke(TP_DATA, Sub()
If Offset = 1 Then .Value = 0 Else .Value = .Maximum With TP_DATA.VerticalScroll
End With If Offset = 1 Then .Value = 0 Else .Value = .Maximum
End Sub) End With
ScrollSuspended = False End Sub)
DataPopulated = True ScrollSuspended = False
DataPopulated = True
End If
End Try End Try
End Sub End Sub
#End Region #End Region
#Region "Size" #Region "Size"
Private LastWinState As FormWindowState = FormWindowState.Normal
Private Function GetWidth() As Integer Private Function GetWidth() As Integer
Return (TP_DATA.Width - PaddingE.GetOf({Me, TP_DATA}).Horizontal(2)) / DataColumns Return (TP_DATA.Width - PaddingE.GetOf({Me, TP_DATA}).Horizontal(2)) / DataColumns
End Function End Function
Private Sub DownloadFeedForm_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd 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() ControlInvoke(TP_DATA, Sub()
With TP_DATA With TP_DATA
If .Controls.Count > 0 Then If .Controls.Count > 0 Then
@@ -282,9 +268,10 @@ Namespace DownloadObjects
If Not rh.ContainsKey(p.Row) Then rh.Add(p.Row, New List(Of Integer)) If Not rh.ContainsKey(p.Row) Then rh.Add(p.Row, New List(Of Integer))
rh(p.Row).Add(cnt.Height) rh(p.Row).Add(cnt.Height)
Next Next
For i% = 0 To .RowStyles.Count - 1 : .RowStyles(i).Height = 0 : Next
If rh.Count > 0 Then If rh.Count > 0 Then
For Each kv In rh 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() kv.Value.Clear()
Next Next
End If End If

View File

@@ -131,7 +131,6 @@ Namespace DownloadObjects
End With End With
End If End If
If Not MyVideo Is Nothing Then info &= $" ({MyVideo.VideoLength})"
LBL_INFO.Text = info LBL_INFO.Text = info
'TT_MAIN.SetToolTip(LBL_INFO, Information) 'TT_MAIN.SetToolTip(LBL_INFO, Information)
s = New Size(Width, h + TP_MAIN.RowStyles(0).Height + PaddingE.GetOf({TP_MAIN}).Vertical(2)) s = New Size(Width, h + TP_MAIN.RowStyles(0).Height + PaddingE.GetOf({TP_MAIN}).Vertical(2))
@@ -219,6 +218,7 @@ Namespace DownloadObjects
If Not Silent Then MsgBoxE({"File deleted", msgTitle}) If Not Silent Then MsgBoxE({"File deleted", msgTitle})
LBL_INFO.Height = 0 LBL_INFO.Height = 0
If Not MyPicture Is Nothing Then MyPicture.Size = New Size(0, 0) If Not MyPicture Is Nothing Then MyPicture.Size = New Size(0, 0)
If Not MyVideo Is Nothing Then MyVideo.MinimumSize = New Size(0, 0) : MyVideo.Size = New Size(0, 0)
Height = 0 Height = 0
Return True Return True
End If End If

View File

@@ -24,13 +24,14 @@ Namespace DownloadObjects
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel Dim TP_MAIN As System.Windows.Forms.TableLayoutPanel
Dim TP_BUTTONS 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.MyVideo = New LibVLCSharp.WinForms.VideoView()
Me.TR_POSITION = New System.Windows.Forms.TrackBar() 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_PLAY = New System.Windows.Forms.Button()
Me.BTT_PAUSE = New System.Windows.Forms.Button() Me.BTT_PAUSE = New System.Windows.Forms.Button()
Me.BTT_STOP = New System.Windows.Forms.Button() Me.BTT_STOP = New System.Windows.Forms.Button()
Me.TR_VOLUME = New System.Windows.Forms.TrackBar()
Me.LBL_TIME = New System.Windows.Forms.Label()
TP_MAIN = New System.Windows.Forms.TableLayoutPanel() TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
TP_BUTTONS = New System.Windows.Forms.TableLayoutPanel() TP_BUTTONS = New System.Windows.Forms.TableLayoutPanel()
TP_MAIN.SuspendLayout() TP_MAIN.SuspendLayout()
@@ -99,6 +100,24 @@ Namespace DownloadObjects
TP_BUTTONS.Size = New System.Drawing.Size(178, 26) TP_BUTTONS.Size = New System.Drawing.Size(178, 26)
TP_BUTTONS.TabIndex = 2 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 'BTT_PLAY
' '
Me.BTT_PLAY.BackgroundImage = Global.SCrawler.My.Resources.Resources.StartPic_01_Green_16 Me.BTT_PLAY.BackgroundImage = Global.SCrawler.My.Resources.Resources.StartPic_01_Green_16
@@ -125,7 +144,7 @@ Namespace DownloadObjects
' '
'BTT_STOP '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.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.BTT_STOP.Dock = System.Windows.Forms.DockStyle.Fill Me.BTT_STOP.Dock = System.Windows.Forms.DockStyle.Fill
Me.BTT_STOP.Location = New System.Drawing.Point(51, 1) Me.BTT_STOP.Location = New System.Drawing.Point(51, 1)
@@ -135,24 +154,6 @@ Namespace DownloadObjects
Me.BTT_STOP.TabIndex = 2 Me.BTT_STOP.TabIndex = 2
Me.BTT_STOP.UseVisualStyleBackColor = True 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
'
'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
'
'FeedVideo 'FeedVideo
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -123,4 +123,18 @@
<metadata name="TP_BUTTONS.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="TP_BUTTONS.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </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> </root>

View File

@@ -10,6 +10,7 @@ Imports LibVLCSharp
Imports System.ComponentModel Imports System.ComponentModel
Imports PersonalUtilities.Tools Imports PersonalUtilities.Tools
Imports PersonalUtilities.Tools.WEB Imports PersonalUtilities.Tools.WEB
Imports VLCState = LibVLCSharp.Shared.VLCState
Namespace DownloadObjects Namespace DownloadObjects
<ToolboxItem(False), DesignTimeVisible(False)> <ToolboxItem(False), DesignTimeVisible(False)>
Public Class FeedVideo Public Class FeedVideo
@@ -21,11 +22,16 @@ Namespace DownloadObjects
Private ReadOnly TimeChangeLabel As Action = Sub() Private ReadOnly TimeChangeLabel As Action = Sub()
If MediaPlayer.Time >= 0 Then If MediaPlayer.Time >= 0 Then
Dim t As TimeSpan = TimeSpan.FromMilliseconds(MediaPlayer.Time) Dim t As TimeSpan = TimeSpan.FromMilliseconds(MediaPlayer.Time)
LBL_TIME.Text = $"{VideoLength}/{t}" 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 If
End Sub End Sub
Private ReadOnly MyImage As ImageRenderer Private ReadOnly MyImage As ImageRenderer
Friend ReadOnly VideoLength As TimeSpan Private VideoLength As TimeSpan?
Private VideoLengthStr As String
Public Sub New() Public Sub New()
InitializeComponent() InitializeComponent()
End Sub End Sub
@@ -38,7 +44,6 @@ Namespace DownloadObjects
MediaPlayer = New [Shared].MediaPlayer(New [Shared].Media(New [Shared].LibVLC(enableDebugLogs:=debugLogs), New Uri(File.ToString))) MediaPlayer = New [Shared].MediaPlayer(New [Shared].Media(New [Shared].LibVLC(enableDebugLogs:=debugLogs), New Uri(File.ToString)))
MyVideo.MediaPlayer = MediaPlayer MyVideo.MediaPlayer = MediaPlayer
TR_VOLUME.Value = MediaPlayer.Volume / 10 TR_VOLUME.Value = MediaPlayer.Volume / 10
If MediaPlayer.Length >= 0 Then VideoLength = TimeSpan.FromMilliseconds(MediaPlayer.Length)
If Settings.UseM3U8 Then If Settings.UseM3U8 Then
Dim f As SFile = $"{Settings.CachePath.PathWithSeparator}FeedSnapshots\{File.GetHashCode}.png" Dim f As SFile = $"{Settings.CachePath.PathWithSeparator}FeedSnapshots\{File.GetHashCode}.png"
If Not f.Exists Then f = FFMPEG.TakeSnapshot(File, f, Settings.FfmpegFile, TimeSpan.FromSeconds(1)) If Not f.Exists Then f = FFMPEG.TakeSnapshot(File, f, Settings.FfmpegFile, TimeSpan.FromSeconds(1))
@@ -50,19 +55,30 @@ Namespace DownloadObjects
End If End If
End If End If
End If End If
UpdateButtons()
End Sub End Sub
Private Sub FeedVideo_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed Private Sub FeedVideo_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
If Not MediaPlayer Is Nothing Then MediaPlayer.Dispose() If Not MediaPlayer Is Nothing Then MediaPlayer.Dispose()
If Not MyImage Is Nothing Then MyImage.Dispose() If Not MyImage Is Nothing Then MyImage.Dispose()
End Sub End Sub
Private Sub BTT_PLAY_Click(sender As Object, e As EventArgs) Handles BTT_PLAY.Click 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 End Sub
Private Sub BTT_PAUSE_Click(sender As Object, e As EventArgs) Handles BTT_PAUSE.Click Private Sub BTT_PAUSE_Click(sender As Object, e As EventArgs) Handles BTT_PAUSE.Click
Try : MediaPlayer.Pause() : Catch : End Try Try : MediaPlayer.Pause() : Catch : End Try
UpdateButtons()
End Sub End Sub
Private Sub BTT_STOP_Click(sender As Object, e As EventArgs) Handles BTT_STOP.Click Private Sub BTT_STOP_Click(sender As Object, e As EventArgs) Handles BTT_STOP.Click
Try : MediaPlayer.Stop() : Catch : End Try Try : MediaPlayer.Stop() : Catch : End Try
UpdateButtons()
End Sub End Sub
Private Sub MediaPlayer_TimeChanged(sender As Object, e As [Shared].MediaPlayerTimeChangedEventArgs) Handles MediaPlayer.TimeChanged 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 TR_POSITION.InvokeRequired Then TR_POSITION.Invoke(TimeChange) Else TimeChange.Invoke
@@ -77,6 +93,22 @@ Namespace DownloadObjects
Private Sub MediaPlayer_Stopped(sender As Object, e As EventArgs) Handles MediaPlayer.Stopped Private Sub MediaPlayer_Stopped(sender As Object, e As EventArgs) Handles MediaPlayer.Stopped
Dim a As Action = Sub() TR_POSITION.Value = TR_POSITION.Maximum Dim a As Action = Sub() TR_POSITION.Value = TR_POSITION.Maximum
If TR_POSITION.InvokeRequired Then TR_POSITION.Invoke(a) Else a.Invoke 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 Sub
End Class End Class
End Namespace End Namespace

View File

@@ -27,13 +27,21 @@ Namespace DownloadObjects
Friend ReadOnly User As IUserData Friend ReadOnly User As IUserData
Friend ReadOnly Data As UserMedia Friend ReadOnly Data As UserMedia
Friend ReadOnly [Date] As Date Friend ReadOnly [Date] As Date
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData) Private ReadOnly Session As Integer
Friend Sub New(ByVal Data As UserMedia, ByVal User As IUserData, ByVal Session As Integer)
Me.Data = Data Me.Data = Data
Me.User = User Me.User = User
[Date] = Now [Date] = Now
Me.Session = Session
End Sub End Sub
Private Function CompareTo(ByVal Other As UserMediaD) As Integer Implements IComparable(Of UserMediaD).CompareTo 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 End Function
Private Overloads Function Equals(ByVal Other As UserMediaD) As Boolean Implements IEquatable(Of UserMediaD).Equals Private Overloads Function Equals(ByVal Other As UserMediaD) As Boolean Implements IEquatable(Of UserMediaD).Equals
Return Data.File = Other.Data.File Return Data.File = Other.Data.File
@@ -214,12 +222,14 @@ Namespace DownloadObjects
#Region "Thread" #Region "Thread"
Private CheckerThread As Thread Private CheckerThread As Thread
Private MissingPostsDetected As Boolean = False Private MissingPostsDetected As Boolean = False
Private Session As Integer = 0
Private Sub [Start]() 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 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 If Not If(CheckerThread?.IsAlive, False) Then
MainProgress.Visible = True MainProgress.Visible = True
If Not AutoDownloaderWorking AndAlso InfoForm.ReadyToOpen Then InfoForm.Show() : MainFrameObj.Focus() If Not AutoDownloaderWorking AndAlso InfoForm.ReadyToOpen Then InfoForm.Show() : MainFrameObj.Focus()
MissingPostsDetected = False MissingPostsDetected = False
Session += 1
CheckerThread = New Thread(New ThreadStart(AddressOf JobsChecker)) CheckerThread = New Thread(New ThreadStart(AddressOf JobsChecker))
CheckerThread.SetApartmentState(ApartmentState.MTA) CheckerThread.SetApartmentState(ApartmentState.MTA)
CheckerThread.Start() CheckerThread.Start()
@@ -342,7 +352,7 @@ Namespace DownloadObjects
If Not .Disposed AndAlso Not .IsCollection AndAlso .DownloadedTotal(False) > 0 Then If Not .Disposed AndAlso Not .IsCollection AndAlso .DownloadedTotal(False) > 0 Then
If Not Downloaded.Contains(.Self) Then Downloaded.Add(Settings.GetUser(.Self)) If Not Downloaded.Contains(.Self) Then Downloaded.Add(Settings.GetUser(.Self))
With DirectCast(.Self, UserDataBase) 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 End With
dcc = True dcc = True
End If End If

View File

@@ -15,6 +15,7 @@
<System.Diagnostics.DebuggerStepThrough()> <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() 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 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 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() 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 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 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 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.TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
Me.TXT_PATH = New PersonalUtilities.Forms.Controls.TextBoxExtended() Me.TXT_PATH = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.TXT_COOKIES = 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.TXT_PATH_SAVED_POSTS = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.CH_GET_USER_MEDIA_ONLY = New System.Windows.Forms.CheckBox() Me.CH_GET_USER_MEDIA_ONLY = New System.Windows.Forms.CheckBox()
Me.TT_MAIN = New System.Windows.Forms.ToolTip(Me.components) 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 = New System.Windows.Forms.ToolStripContainer()
CONTAINER_MAIN.ContentPanel.SuspendLayout()
CONTAINER_MAIN.SuspendLayout()
Me.TP_MAIN.SuspendLayout() Me.TP_MAIN.SuspendLayout()
CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TXT_PATH_SAVED_POSTS, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TXT_PATH_SAVED_POSTS, System.ComponentModel.ISupportInitialize).BeginInit()
CONTAINER_MAIN.ContentPanel.SuspendLayout()
CONTAINER_MAIN.SuspendLayout()
Me.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 'TP_MAIN
' '
Me.TP_MAIN.ColumnCount = 1 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.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_PATH, 0, 0)
Me.TP_MAIN.Controls.Add(Me.TXT_COOKIES, 0, 2) 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.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.Dock = System.Windows.Forms.DockStyle.Fill
Me.TP_MAIN.Location = New System.Drawing.Point(0, 0) Me.TP_MAIN.Location = New System.Drawing.Point(0, 0)
Me.TP_MAIN.Name = "TP_MAIN" 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, 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.Absolute, 25.0!))
Me.TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.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 Me.TP_MAIN.TabIndex = 0
' '
'TXT_PATH 'TXT_PATH
@@ -101,15 +120,15 @@
Me.TP_SITE_PROPS.ColumnCount = 1 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.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.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.Name = "TP_SITE_PROPS"
Me.TP_SITE_PROPS.RowCount = 4 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.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.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.Size = New System.Drawing.Size(538, 78)
Me.TP_SITE_PROPS.TabIndex = 4 Me.TP_SITE_PROPS.TabIndex = 5
' '
'TXT_PATH_SAVED_POSTS 'TXT_PATH_SAVED_POSTS
' '
@@ -130,54 +149,52 @@
' '
Me.CH_GET_USER_MEDIA_ONLY.AutoSize = True 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.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.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.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.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.Text = "Get user media only"
Me.CH_GET_USER_MEDIA_ONLY.UseVisualStyleBackColor = True Me.CH_GET_USER_MEDIA_ONLY.UseVisualStyleBackColor = True
' '
'CONTAINER_MAIN 'CH_DOWNLOAD_SITE_DATA
' '
' Me.CH_DOWNLOAD_SITE_DATA.AutoSize = True
'CONTAINER_MAIN.ContentPanel Me.CH_DOWNLOAD_SITE_DATA.Dock = System.Windows.Forms.DockStyle.Fill
' Me.CH_DOWNLOAD_SITE_DATA.Location = New System.Drawing.Point(3, 87)
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.TP_MAIN) Me.CH_DOWNLOAD_SITE_DATA.Name = "CH_DOWNLOAD_SITE_DATA"
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(544, 219) Me.CH_DOWNLOAD_SITE_DATA.Padding = New System.Windows.Forms.Padding(100, 0, 0, 0)
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill Me.CH_DOWNLOAD_SITE_DATA.Size = New System.Drawing.Size(538, 19)
CONTAINER_MAIN.LeftToolStripPanelVisible = False Me.CH_DOWNLOAD_SITE_DATA.TabIndex = 3
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0) Me.CH_DOWNLOAD_SITE_DATA.Text = "Download site data"
CONTAINER_MAIN.Name = "CONTAINER_MAIN" 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" &
CONTAINER_MAIN.RightToolStripPanelVisible = False "g data from the site if you need it.")
CONTAINER_MAIN.Size = New System.Drawing.Size(544, 219) Me.CH_DOWNLOAD_SITE_DATA.UseVisualStyleBackColor = True
CONTAINER_MAIN.TabIndex = 0
CONTAINER_MAIN.TopToolStripPanelVisible = False
' '
'SiteEditorForm 'SiteEditorForm
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 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.Controls.Add(CONTAINER_MAIN)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.KeyPreview = True Me.KeyPreview = True
Me.MaximizeBox = False Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(560, 258) Me.MaximumSize = New System.Drawing.Size(560, 282)
Me.MinimizeBox = False Me.MinimizeBox = False
Me.MinimumSize = New System.Drawing.Size(560, 258) Me.MinimumSize = New System.Drawing.Size(560, 282)
Me.Name = "SiteEditorForm" Me.Name = "SiteEditorForm"
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
Me.Text = "Site" Me.Text = "Site"
CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
CONTAINER_MAIN.ResumeLayout(False)
CONTAINER_MAIN.PerformLayout()
Me.TP_MAIN.ResumeLayout(False) Me.TP_MAIN.ResumeLayout(False)
Me.TP_MAIN.PerformLayout() Me.TP_MAIN.PerformLayout()
CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TXT_PATH, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TXT_COOKIES, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TXT_PATH_SAVED_POSTS, 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) Me.ResumeLayout(False)
End Sub End Sub
@@ -188,5 +205,6 @@
Private WithEvents TP_SITE_PROPS As SiteDefaults Private WithEvents TP_SITE_PROPS As SiteDefaults
Private WithEvents CH_GET_USER_MEDIA_ONLY As CheckBox Private WithEvents CH_GET_USER_MEDIA_ONLY As CheckBox
Private WithEvents TT_MAIN As ToolTip Private WithEvents TT_MAIN As ToolTip
Private WithEvents CH_DOWNLOAD_SITE_DATA As CheckBox
End Class End Class
End Namespace End Namespace

View File

@@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </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" /> <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"> <data name="ActionButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
@@ -222,9 +225,6 @@
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
</value> </value>
</data> </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"> <metadata name="TT_MAIN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>

View File

@@ -11,6 +11,7 @@ Imports PersonalUtilities.Forms.Controls
Imports PersonalUtilities.Forms.Controls.Base Imports PersonalUtilities.Forms.Controls.Base
Imports PersonalUtilities.Tools.WEB Imports PersonalUtilities.Tools.WEB
Imports CookieControl = PersonalUtilities.Tools.WEB.CookieListForm.CookieControl Imports CookieControl = PersonalUtilities.Tools.WEB.CookieListForm.CookieControl
Imports ADB = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons
Imports SCrawler.Plugin Imports SCrawler.Plugin
Imports SCrawler.Plugin.Hosts Imports SCrawler.Plugin.Hosts
Namespace Editors Namespace Editors
@@ -63,7 +64,8 @@ Namespace Editors
TXT_PATH.Text = .Path(False) TXT_PATH.Text = .Path(False)
TXT_PATH_SAVED_POSTS.Text = .SavedPostsPath(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) SiteDefaultsFunctions.SetChecker(TP_SITE_PROPS, Host)
@@ -131,6 +133,7 @@ Namespace Editors
TXT_PATH.CaptionWidth = offset TXT_PATH.CaptionWidth = offset
TXT_PATH_SAVED_POSTS.CaptionWidth = offset TXT_PATH_SAVED_POSTS.CaptionWidth = offset
TXT_COOKIES.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} 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 If c > 0 Or Not Host.IsMyClass Then
Dim ss As New Size(Size.Width, Size.Height + h + c) Dim ss As New Size(Size.Width, Size.Height + h + c)
@@ -183,6 +186,7 @@ Namespace Editors
SiteDefaultsFunctions.SetPropByChecker(TP_SITE_PROPS, Host) SiteDefaultsFunctions.SetPropByChecker(TP_SITE_PROPS, Host)
If TXT_PATH.IsEmptyString Then .Path = Nothing Else .Path = TXT_PATH.Text If TXT_PATH.IsEmptyString Then .Path = Nothing Else .Path = TXT_PATH.Text
.SavedPostsPath = TXT_PATH_SAVED_POSTS.Text .SavedPostsPath = TXT_PATH_SAVED_POSTS.Text
.DownloadSiteData.Value = CH_DOWNLOAD_SITE_DATA.Checked
.GetUserMediaOnly.Value = CH_GET_USER_MEDIA_ONLY.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()) 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) ChangePath(Sender, Host.SavedPostsPath(False), TXT_PATH_SAVED_POSTS)
End Sub End Sub
Private Sub ChangePath(ByVal Sender As ActionButton, ByVal PathValue As SFile, ByRef CNT As TextBoxExtended) 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) Dim f As SFile = SFile.SelectPath(PathValue)
If Not f.IsEmptyString Then CNT.Text = f If Not f.IsEmptyString Then CNT.Text = f
End If End If
End Sub End Sub
Private Sub TXT_COOKIES_ActionOnButtonClick(ByVal Sender As ActionButton, ByVal e As EventArgs) Handles TXT_COOKIES.ActionOnButtonClick Private Sub TXT_COOKIES_ActionOnButtonClick(ByVal Sender As ActionButton, ByVal e As EventArgs) Handles TXT_COOKIES.ActionOnButtonClick
Select Case Sender.DefaultButton Select Case Sender.DefaultButton
Case ActionButton.DefaultButtons.Edit Case ADB.Edit
If Not Host.Responser Is Nothing Then If Not Host.Responser Is Nothing Then
Using f As New CookieListForm(Host.Responser) With { Using f As New CookieListForm(Host.Responser) With {
.MyDesignXML = Settings.Design, .MyDesignXML = Settings.Design,
@@ -220,7 +224,7 @@ Namespace Editors
End Using End Using
SetCookieText() SetCookieText()
End If End If
Case ActionButton.DefaultButtons.Clear Case ADB.Clear
If Not Host.Responser Is Nothing Then If Not Host.Responser Is Nothing Then
With Host.Responser With Host.Responser
If Not .Cookies Is Nothing Then .Cookies.Dispose() If Not .Cookies Is Nothing Then .Cookies.Dispose()

View File

@@ -22,10 +22,16 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
<System.Diagnostics.DebuggerStepThrough()> <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim CONTAINER_MAIN As System.Windows.Forms.ToolStripContainer 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() CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
CONTAINER_MAIN.ContentPanel.SuspendLayout() CONTAINER_MAIN.ContentPanel.SuspendLayout()
CONTAINER_MAIN.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() Me.SuspendLayout()
' '
'CONTAINER_MAIN 'CONTAINER_MAIN
@@ -33,38 +39,73 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
' '
'CONTAINER_MAIN.ContentPanel 'CONTAINER_MAIN.ContentPanel
' '
CONTAINER_MAIN.ContentPanel.Controls.Add(Me.DT) CONTAINER_MAIN.ContentPanel.Controls.Add(TP_MAIN)
CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(209, 47) CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(395, 28)
CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
CONTAINER_MAIN.LeftToolStripPanelVisible = False CONTAINER_MAIN.LeftToolStripPanelVisible = False
CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0) CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
CONTAINER_MAIN.Name = "CONTAINER_MAIN" CONTAINER_MAIN.Name = "CONTAINER_MAIN"
CONTAINER_MAIN.RightToolStripPanelVisible = False 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.TabIndex = 0
CONTAINER_MAIN.TopToolStripPanelVisible = False CONTAINER_MAIN.TopToolStripPanelVisible = False
' '
'DT 'TP_MAIN
' '
Me.DT.Dock = System.Windows.Forms.DockStyle.Fill TP_MAIN.ColumnCount = 2
Me.DT.Location = New System.Drawing.Point(0, 0) TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.DT.Name = "DT" TP_MAIN.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.DT.ShowCheckBox = True TP_MAIN.Controls.Add(Me.DT_FROM, 0, 0)
Me.DT.Size = New System.Drawing.Size(209, 20) TP_MAIN.Controls.Add(Me.DT_TO, 1, 0)
Me.DT.TabIndex = 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 'FDatePickerForm
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 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.Controls.Add(CONTAINER_MAIN)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.KeyPreview = True Me.KeyPreview = True
Me.MaximizeBox = False Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(225, 86) Me.MaximumSize = New System.Drawing.Size(411, 92)
Me.MinimizeBox = False Me.MinimizeBox = False
Me.MinimumSize = New System.Drawing.Size(225, 86) Me.MinimumSize = New System.Drawing.Size(411, 92)
Me.Name = "FDatePickerForm" Me.Name = "FDatePickerForm"
Me.ShowIcon = False Me.ShowIcon = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
@@ -73,8 +114,13 @@ Partial Friend Class FDatePickerForm : Inherits System.Windows.Forms.Form
CONTAINER_MAIN.ContentPanel.ResumeLayout(False) CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
CONTAINER_MAIN.ResumeLayout(False) CONTAINER_MAIN.ResumeLayout(False)
CONTAINER_MAIN.PerformLayout() 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) Me.ResumeLayout(False)
End Sub 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 End Class

View File

@@ -120,4 +120,7 @@
<metadata name="CONTAINER_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="CONTAINER_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="TP_MAIN.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root> </root>

View File

@@ -9,27 +9,28 @@
Imports PersonalUtilities.Forms Imports PersonalUtilities.Forms
Friend Class FDatePickerForm Friend Class FDatePickerForm
Private ReadOnly MyDefs As DefaultFormOptions Private ReadOnly MyDefs As DefaultFormOptions
Friend ReadOnly Property SelectedDate As Date? Friend ReadOnly Property DateFrom As Date?
Get 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 Get
End Property End Property
Private ReadOnly _InitialValue As Date? Friend ReadOnly Property DateTo As Date?
Friend Sub New(ByVal d 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() InitializeComponent()
_InitialValue = d
MyDefs = New DefaultFormOptions(Me, Settings.Design) 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 End Sub
Private Sub FDatePickerForm_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub FDatePickerForm_Load(sender As Object, e As EventArgs) Handles Me.Load
With MyDefs With MyDefs
.MyViewInitialize(True) .MyViewInitialize(True)
.AddOkCancelToolbar(True) .AddOkCancelToolbar(True)
If _InitialValue.HasValue Then
DT.Checked = True
DT.Value = _InitialValue.Value.Date
Else
DT.Checked = False
End If
.DelegateClosingChecker = False .DelegateClosingChecker = False
.EndLoaderOperations() .EndLoaderOperations()
MyDefs.MyOkCancel.EnableOK = True MyDefs.MyOkCancel.EnableOK = True

View File

@@ -72,7 +72,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
Me.BTT_SHOW_EXCLUDED_LABELS = New System.Windows.Forms.ToolStripMenuItem() Me.BTT_SHOW_EXCLUDED_LABELS = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_SHOW_EXCLUDED_LABELS_IGNORE = 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_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_LOG = New System.Windows.Forms.ToolStripButton() Me.BTT_LOG = New System.Windows.Forms.ToolStripButton()
Me.BTT_VERSION_INFO = New System.Windows.Forms.ToolStripButton() Me.BTT_VERSION_INFO = New System.Windows.Forms.ToolStripButton()
Me.BTT_DONATE = New System.Windows.Forms.ToolStripButton() Me.BTT_DONATE = New System.Windows.Forms.ToolStripButton()
@@ -106,6 +106,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem() Me.BTT_TRAY_SHOW_HIDE = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_TRAY_CLOSE = 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_TRAY_CLOSE_NO_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_SHOW_LIMIT_DATES_IN = New System.Windows.Forms.ToolStripMenuItem()
SEP_1 = New System.Windows.Forms.ToolStripSeparator() SEP_1 = New System.Windows.Forms.ToolStripSeparator()
SEP_2 = New System.Windows.Forms.ToolStripSeparator() SEP_2 = New System.Windows.Forms.ToolStripSeparator()
CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator() CONTEXT_SEP_1 = New System.Windows.Forms.ToolStripSeparator()
@@ -147,7 +148,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
'MENU_SETTINGS_SEP_1 'MENU_SETTINGS_SEP_1
' '
MENU_SETTINGS_SEP_1.Name = "MENU_SETTINGS_SEP_1" MENU_SETTINGS_SEP_1.Name = "MENU_SETTINGS_SEP_1"
MENU_SETTINGS_SEP_1.Size = New System.Drawing.Size(177, 6) MENU_SETTINGS_SEP_1.Size = New System.Drawing.Size(113, 6)
' '
'SEP_3 'SEP_3
' '
@@ -228,7 +229,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
' '
Me.BTT_SETTINGS.Image = Global.SCrawler.My.Resources.Resources.SettingsPic_16 Me.BTT_SETTINGS.Image = Global.SCrawler.My.Resources.Resources.SettingsPic_16
Me.BTT_SETTINGS.Name = "BTT_SETTINGS" Me.BTT_SETTINGS.Name = "BTT_SETTINGS"
Me.BTT_SETTINGS.Size = New System.Drawing.Size(180, 22) Me.BTT_SETTINGS.Size = New System.Drawing.Size(116, 22)
Me.BTT_SETTINGS.Text = "Settings" Me.BTT_SETTINGS.Text = "Settings"
' '
'Toolbar_TOP 'Toolbar_TOP
@@ -415,7 +416,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
' '
Me.MENU_VIEW.AutoToolTip = False Me.MENU_VIEW.AutoToolTip = False
Me.MENU_VIEW.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text 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.Image = CType(resources.GetObject("MENU_VIEW.Image"), System.Drawing.Image)
Me.MENU_VIEW.ImageTransparentColor = System.Drawing.Color.Magenta Me.MENU_VIEW.ImageTransparentColor = System.Drawing.Color.Magenta
Me.MENU_VIEW.Name = "MENU_VIEW" Me.MENU_VIEW.Name = "MENU_VIEW"
@@ -528,13 +529,13 @@ 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.Size = New System.Drawing.Size(231, 22)
Me.BTT_SHOW_SHOW_GROUPS.Text = "Show groups instead of labels" 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_NOT.AutoToolTip = True
Me.BTT_SHOW_LIMIT_DATES.Name = "BTT_SHOW_LIMIT_DATES" Me.BTT_SHOW_LIMIT_DATES_NOT.Name = "BTT_SHOW_LIMIT_DATES_NOT"
Me.BTT_SHOW_LIMIT_DATES.Size = New System.Drawing.Size(231, 22) Me.BTT_SHOW_LIMIT_DATES_NOT.Size = New System.Drawing.Size(231, 22)
Me.BTT_SHOW_LIMIT_DATES.Text = "Limit dates" Me.BTT_SHOW_LIMIT_DATES_NOT.Text = "Limit dates (not in range)"
Me.BTT_SHOW_LIMIT_DATES.ToolTipText = "Show profiles that haven't downloaded new data since date..." Me.BTT_SHOW_LIMIT_DATES_NOT.ToolTipText = "Filter users whose last download date is not in the selected date range"
' '
'BTT_LOG 'BTT_LOG
' '
@@ -785,6 +786,14 @@ 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.ToolTipText = "Close the program without executing the script"
Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False Me.BTT_TRAY_CLOSE_NO_SCRIPT.Visible = False
' '
'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"
'
'MainFrame 'MainFrame
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -860,7 +869,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
Private WithEvents BTT_DONATE As ToolStripButton Private WithEvents BTT_DONATE As ToolStripButton
Private WithEvents BTT_SHOW_DELETED As ToolStripMenuItem Private WithEvents BTT_SHOW_DELETED As ToolStripMenuItem
Private WithEvents BTT_SHOW_SUSPENDED 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 BTT_VIEW_DETAILS As ToolStripMenuItem
Private WithEvents COL_DEF As ColumnHeader Private WithEvents COL_DEF As ColumnHeader
Private WithEvents MENU_SETTINGS As ToolStripDropDownButton Private WithEvents MENU_SETTINGS As ToolStripDropDownButton
@@ -882,4 +891,5 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
Friend WithEvents BTT_LOG As ToolStripButton Friend WithEvents BTT_LOG As ToolStripButton
Friend WithEvents Toolbar_TOP As ToolStrip Friend WithEvents Toolbar_TOP As ToolStrip
Private WithEvents BTT_FEED As ToolStripButton Private WithEvents BTT_FEED As ToolStripButton
Private WithEvents BTT_SHOW_LIMIT_DATES_IN As ToolStripMenuItem
End Class End Class

View File

@@ -312,35 +312,6 @@
<metadata name="TRAY_CONTEXT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TRAY_CONTEXT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>623, 17</value> <value>623, 17</value>
</metadata> </metadata>
<data name="BTT_TRAY_CLOSE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAVoSURBVEhLhZVrTJNXGMdfrtNSQIoadKRz2o0CorU3
WkDIVBRaaGNbwAteh+AARRQlitEYTTRekiX7sH3YPmyZH9wtziybigLRCWTaCW5sCBWhlrb0Ci9zSxbo
2f+UliGX7SS/tO85z/k9T57zXhhCCPO7Wh3VIhB83JKQ0Nu4bNlHm5YseZ1hmHC69n+Y5HLFcz7/ft/S
pY+vr1hhwL4oEBJcZ0x793If5uZ+1VNfT/qvXCHP6+p8tzMymqRxcW8hMGKqbDo9MlmWddu2AfbiRTJ6
+TIZKC52fyAUVi2JiYkLJmGaBYIPnx4+TPrOnCH9p08TC4LNx46RWwrF/ZXR0W/PleRZZuY669atZvbS
JcJiL9vQQEZPnSKmwkLPjcTE97GPB8KZlvh4C5X31dWRgRMniAVBtvPnyWB9ve+2XP7jmtjYpOlJTOnp
G60lJRZaOZWPQs4ePUpGUZh3xw7SnJDQhT0KEM3c5fOv9paVkX4kMAPL8ePEig1D584RG9rVpFS2rY6J
EQaTmKTSjbbiYsvIhQuERTGjKIrFvtHaWjK8fz9plsudexYu/BLxKsBj9ALBGzel0vt9e/b4XiBoENhQ
zRDOxIWWOY4cIS0KRZs4Nja5QyLJtRoM1pGzZ/0tYVExi/ayNTVkBPJ76enuJA7nM4j3gVWAHjgTIYqL
E96SStvMu3YR64EDxF5dTYYOHSJOJPNA5Kiu9rUrlZ1mrdbCnjzpr5jFGotYtqpqQi6TuVM4nKvwlYHU
gDzU31OMSGl8fPJtsbjVsn27z15RQRzAVVlJ3BB4kcx78CAZQbUjVIxrFtd+OdrbmpHhEXG5VE4rTwHz
wMRdFDw4jEgFj5dyRyRqsxYVEcfu3cQFPPv2ES8qHEbCYRzgsFZLvO+8Q7xKJXGDVoXCK46Ovob95YBW
Ph/8+xwE/wSTyHi81OZVq9qsGs2Ye8sW4srPJy6JhDgTE4kzOpo4IyKIMyyMOLhcX9Py5R4lj0cPtAKs
BBwwKfc7p174J5BEhHY9FIk6bBDaIRuiQkDFfsLDSbdU+pdBKPwe8e+BNDBD7vdNn6BYd+6stK5da7bP
nz9TDujcoEAw1lJY+CyFz9dCHDubnDJjwltRccS5fr3TjurnlIMBYE5NJY8Nhq7SrCwREsz6xL9y4S4v
b3Bt2uSyR0XNkDvQe9ouKu8HvaGh5FfQIxL5OgyG30qUStqmGUkm/3jKy0+48vLcs1XuiI8nL/Ly/rYl
JfmovCcgN4JW+l8iGe8oKuoqzcyckSQob3CpVB47l+sXv9KWxYtJt0r1x9ns7HZjQYHNnJxMfoH0EXgA
7oFm0CmTjRsNhs6Na9bQF+Tkq57xlJXVu9Rqz9Bs8kWLSG9BwcsqieQONlXnpaaWdul0z7rR+6C8CTSC
m8Aol4+36/XGT7VaevCRIIRx6/WWoQULZq2cyveLxY0IrAT0IHm1OTmZT3Q6U2da2qT8B/Ad+BZ05OSM
GXW6p4hdBiIZZ1FRt5vPn6vyuwiqCsj9Xyq6qXbDBkWnXm/6OS3NN1X+dUgIeZSdPXZPoxlEXC6IY9pL
S7faNBqXC9Iplf95YBb5ZF+RpGbdunQcbO/D1avJ9YC8LT19/Iv8/BeqpKRPEDORAGNeY3HxSYtG43Eq
FL5etfpljUzWhPlZ5VOTlGVliR+hHUbs+0mpHP9GpRqM5XAuY20zmGgRRohYKIx9rNd/3qfTOa7l5uLu
C63BvARw6fp0eRCMyBslJe8+2bx58EFhoVMlFNJvgQ4kgggQEgykvV0ApEAd+J3z8Z8KxmuA3pr0zikA
b4LJZ2FqYBigFdOPNf0NC679Fxi0OPr+XxiAJgwURph/AJfOQQebMR8TAAAAAElFTkSuQmCC
</value>
</data>
<data name="TrayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="TrayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAACQAAMMOAADDDgAAAAAAAAAA AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAACQAAMMOAADDDgAAAAAAAAAA
@@ -505,6 +476,35 @@
AAAAAAAAH/8AAAAAAAA//wAAAAAAAH//AAAAAAAA//8AAAAAAAP//wAAAAAAB///AAAAAAAP//8AAAAA AAAAAAAAH/8AAAAAAAA//wAAAAAAAH//AAAAAAAA//8AAAAAAAP//wAAAAAAB///AAAAAAAP//8AAAAA
AB///wAAAAAAf///AAAAAAH///8AAAAAB////wAAAAAf////AAAAAP////8AAAAH/////wAAAH////// AB///wAAAAAAf///AAAAAAH///8AAAAAB////wAAAAAf////AAAAAP////8AAAAH/////wAAAH//////
AAA= AAA=
</value>
</data>
<data name="BTT_TRAY_CLOSE.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAVoSURBVEhLhZVrTJNXGMdfrtNSQIoadKRz2o0CorU3
WkDIVBRaaGNbwAteh+AARRQlitEYTTRekiX7sH3YPmyZH9wtziybigLRCWTaCW5sCBWhlrb0Ci9zSxbo
2f+UliGX7SS/tO85z/k9T57zXhhCCPO7Wh3VIhB83JKQ0Nu4bNlHm5YseZ1hmHC69n+Y5HLFcz7/ft/S
pY+vr1hhwL4oEBJcZ0x793If5uZ+1VNfT/qvXCHP6+p8tzMymqRxcW8hMGKqbDo9MlmWddu2AfbiRTJ6
+TIZKC52fyAUVi2JiYkLJmGaBYIPnx4+TPrOnCH9p08TC4LNx46RWwrF/ZXR0W/PleRZZuY669atZvbS
JcJiL9vQQEZPnSKmwkLPjcTE97GPB8KZlvh4C5X31dWRgRMniAVBtvPnyWB9ve+2XP7jmtjYpOlJTOnp
G60lJRZaOZWPQs4ePUpGUZh3xw7SnJDQhT0KEM3c5fOv9paVkX4kMAPL8ePEig1D584RG9rVpFS2rY6J
EQaTmKTSjbbiYsvIhQuERTGjKIrFvtHaWjK8fz9plsudexYu/BLxKsBj9ALBGzel0vt9e/b4XiBoENhQ
zRDOxIWWOY4cIS0KRZs4Nja5QyLJtRoM1pGzZ/0tYVExi/ayNTVkBPJ76enuJA7nM4j3gVWAHjgTIYqL
E96SStvMu3YR64EDxF5dTYYOHSJOJPNA5Kiu9rUrlZ1mrdbCnjzpr5jFGotYtqpqQi6TuVM4nKvwlYHU
gDzU31OMSGl8fPJtsbjVsn27z15RQRzAVVlJ3BB4kcx78CAZQbUjVIxrFtd+OdrbmpHhEXG5VE4rTwHz
wMRdFDw4jEgFj5dyRyRqsxYVEcfu3cQFPPv2ES8qHEbCYRzgsFZLvO+8Q7xKJXGDVoXCK46Ovob95YBW
Ph/8+xwE/wSTyHi81OZVq9qsGs2Ye8sW4srPJy6JhDgTE4kzOpo4IyKIMyyMOLhcX9Py5R4lj0cPtAKs
BBwwKfc7p174J5BEhHY9FIk6bBDaIRuiQkDFfsLDSbdU+pdBKPwe8e+BNDBD7vdNn6BYd+6stK5da7bP
nz9TDujcoEAw1lJY+CyFz9dCHDubnDJjwltRccS5fr3TjurnlIMBYE5NJY8Nhq7SrCwREsz6xL9y4S4v
b3Bt2uSyR0XNkDvQe9ouKu8HvaGh5FfQIxL5OgyG30qUStqmGUkm/3jKy0+48vLcs1XuiI8nL/Ly/rYl
JfmovCcgN4JW+l8iGe8oKuoqzcyckSQob3CpVB47l+sXv9KWxYtJt0r1x9ns7HZjQYHNnJxMfoH0EXgA
7oFm0CmTjRsNhs6Na9bQF+Tkq57xlJXVu9Rqz9Bs8kWLSG9BwcsqieQONlXnpaaWdul0z7rR+6C8CTSC
m8Aol4+36/XGT7VaevCRIIRx6/WWoQULZq2cyveLxY0IrAT0IHm1OTmZT3Q6U2da2qT8B/Ad+BZ05OSM
GXW6p4hdBiIZZ1FRt5vPn6vyuwiqCsj9Xyq6qXbDBkWnXm/6OS3NN1X+dUgIeZSdPXZPoxlEXC6IY9pL
S7faNBqXC9Iplf95YBb5ZF+RpGbdunQcbO/D1avJ9YC8LT19/Iv8/BeqpKRPEDORAGNeY3HxSYtG43Eq
FL5etfpljUzWhPlZ5VOTlGVliR+hHUbs+0mpHP9GpRqM5XAuY20zmGgRRohYKIx9rNd/3qfTOa7l5uLu
C63BvARw6fp0eRCMyBslJe8+2bx58EFhoVMlFNJvgQ4kgggQEgykvV0ApEAd+J3z8Z8KxmuA3pr0zikA
b4LJZ2FqYBigFdOPNf0NC679Fxi0OPr+XxiAJgwURph/AJfOQQebMR8TAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@@ -87,7 +87,10 @@ Public Class MainFrame
CheckVersion(False) CheckVersion(False)
BTT_SITE_ALL.Checked = Settings.SelectedSites.Count = 0 BTT_SITE_ALL.Checked = Settings.SelectedSites.Count = 0
BTT_SITE_SPECIFIC.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 With Settings.Groups
AddHandler .Added, AddressOf GROUPS_Added AddHandler .Added, AddressOf GROUPS_Added
AddHandler .Deleted, AddressOf GROUPS_Deleted AddHandler .Deleted, AddressOf GROUPS_Deleted
@@ -595,26 +598,40 @@ CloseResume:
End If End If
End Using End Using
End Function 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 r As Boolean = False
Dim snd As Action(Of Date?) = Sub(ByVal d As Date?) Dim UpSettings As Action(Of Date?, Date?, ShowingDates) = Sub(ByVal _from As Date?, ByVal _to As Date?, ByVal Mode As ShowingDates)
With Settings.LastUpdatedDate With Settings
If .HasValue And d.HasValue Then .BeginUpdate()
r = Not .Value.Date = d.Value.Date If Not .ViewDateMode.Value = CInt(Mode) Then r = True
Else .ViewDateMode.Value = CInt(Mode)
r = True If Not Mode = ShowingDates.Off Then
End If If .ViewDateFrom.HasValue And _from.HasValue Then
End With If Not .ViewDateFrom.Value.Date = _from.Value.Date Then r = True
Settings.LastUpdatedDate = d Else
End Sub r = True
Using f As New FDatePickerForm(Settings.LastUpdatedDate) 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() f.ShowDialog()
Select Case f.DialogResult Select Case f.DialogResult
Case DialogResult.Abort : snd(Nothing) Case DialogResult.Abort : UpSettings(f.DateFrom, f.DateTo, ShowingDates.Off)
Case DialogResult.OK : snd(f.SelectedDate) Case DialogResult.OK : UpSettings(f.DateFrom, f.DateTo, Sender.Tag)
End Select End Select
End Using 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() If r Then RefillList()
End Sub End Sub
#End Region #End Region
@@ -1090,22 +1107,25 @@ CloseResume:
End Sub End Sub
Private Enum DownUserLimits : None : Number : [Date] : End Enum Private Enum DownUserLimits : None : Number : [Date] : End Enum
Private Sub DownloadSelectedUser(ByVal UseLimits As DownUserLimits) Private Sub DownloadSelectedUser(ByVal UseLimits As DownUserLimits)
Const MsgTitle$ = "Download limit"
Dim users As List(Of IUserData) = GetSelectedUserArray() Dim users As List(Of IUserData) = GetSelectedUserArray()
If users.ListExists Then If users.ListExists Then
Dim l%? = Nothing Dim limit%? = Nothing
Dim d As Date? = Nothing Dim _from As Date? = Nothing
Dim _to As Date? = Nothing
Dim _fromStr$, _toStr$
If UseLimits = DownUserLimits.Number Then If UseLimits = DownUserLimits.Number Then
Do Do
l = AConvert(Of Integer)(InputBoxE("Enter top posts limit for downloading:", "Download limit", 10), AModes.Var, Nothing) limit = AConvert(Of Integer)(InputBoxE("Enter top posts limit for downloading:", MsgTitle, 10), AModes.Var, Nothing)
If l.HasValue Then If limit.HasValue Then
Select Case MsgBoxE(New MMessage($"You are set up downloading top [{l.Value}] posts", "Download limit", 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 {"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index
Case 0 : Exit Do Case 0 : Exit Do
Case 2 : l = Nothing : Exit Do Case 2 : limit = Nothing : Exit Do
Case 3 : GoTo CancelDownloadingOperation Case 3 : GoTo CancelDownloadingOperation
End Select End Select
Else 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 0 : Exit Do
Case 2 : GoTo CancelDownloadingOperation Case 2 : GoTo CancelDownloadingOperation
End Select End Select
@@ -1113,24 +1133,30 @@ CloseResume:
Loop Loop
ElseIf UseLimits = DownUserLimits.Date Then ElseIf UseLimits = DownUserLimits.Date Then
Do Do
Using fd As New FDatePickerForm(Nothing) Using fd As New FDatePickerForm(Nothing, Nothing)
fd.ShowDialog() fd.ShowDialog()
If fd.DialogResult = DialogResult.OK Then If fd.DialogResult = DialogResult.OK Then
d = fd.SelectedDate _from = fd.DateFrom
_to = fd.DateTo
ElseIf fd.DialogResult = DialogResult.Abort Then ElseIf fd.DialogResult = DialogResult.Abort Then
d = Nothing _from = Nothing
_to = Nothing
End If End If
End Using End Using
If d.HasValue Then If _from.HasValue Or _to.HasValue Then
Select Case MsgBoxE(New MMessage($"You are set up downloading posts until [{d.Value.Date.ToStringDate(ADateTime.Formats.BaseDate)}]", _fromStr = AConvert(Of String)(_from, ADateTime.Formats.BaseDate, String.Empty)
"Download limit", _toStr = AConvert(Of String)(_to, ADateTime.Formats.BaseDate, String.Empty)
{"Confirm", "Try again", "Disable limit", "Cancel"}) With {.ButtonsPerRow = 2}).Index 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 0 : Exit Do
Case 2 : d = Nothing : Exit Do Case 2 : _from = Nothing : _to = Nothing : Exit Do
Case 3 : GoTo CancelDownloadingOperation Case 3 : GoTo CancelDownloadingOperation
End Select End Select
Else 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 0 : Exit Do
Case 2 : GoTo CancelDownloadingOperation Case 2 : GoTo CancelDownloadingOperation
End Select End Select
@@ -1144,18 +1170,17 @@ CancelDownloadingOperation:
MsgBoxE("Operation canceled") MsgBoxE("Operation canceled")
Exit Sub Exit Sub
ResumeDownloadingOperation: ResumeDownloadingOperation:
If users.Count = 1 Then Dim uStr$ = If(users.Count = 1, String.Empty, users.Select(Function(u) u.ToString()).ListToString(vbNewLine))
users(0).DownloadTopCount = l If users.Count = 1 OrElse MsgBoxE({$"You have selected {users.Count} user profiles" & vbCr &
users(0).DownloadToDate = d $"Do you want to download them all?{vbNewLine.StringDup(2)}" &
Downloader.Add(users(0)) $"Selected users:{vbNewLine}{uStr}", "Multiple users selected"},
Else MsgBoxStyle.Question + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Dim uStr$ = users.Select(Function(u) u.ToString()).ListToString(vbNewLine) users.ForEach(Sub(u)
If MsgBoxE({$"You are select {users.Count} users' profiles{vbNewLine}Do you want to download all of them?{vbNewLine.StringDup(2)}" & u.DownloadTopCount = limit
$"Selected users:{vbNewLine}{uStr}", "A few users selected"}, u.DownloadDateFrom = _from
MsgBoxStyle.Question + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then u.DownloadDateTo = _to
users.ForEach(Sub(u) u.DownloadTopCount = l) End Sub)
Downloader.AddRange(users) Downloader.AddRange(users)
End If
End If End If
End If End If
End Sub End Sub

View File

@@ -83,6 +83,11 @@ Friend Module MainMod
Deleted = 10000 Deleted = 10000
Suspended = 12000 Suspended = 12000
End Enum End Enum
Friend Enum ShowingDates As Integer
[Off] = 0
[Not] = 1
[In] = 2
End Enum
Friend Enum FileNameReplaceMode As Integer Friend Enum FileNameReplaceMode As Integer
None = 0 None = 0
Replace = 1 Replace = 1
@@ -95,6 +100,7 @@ Friend Module MainMod
Friend MyProgressForm As ActiveDownloadingProgress Friend MyProgressForm As ActiveDownloadingProgress
Friend MainFrameObj As MainFrameObjects Friend MainFrameObj As MainFrameObjects
Friend ReadOnly ParsersDataDateProvider As New ADateTime(ADateTime.Formats.BaseDateTime) 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 Friend ReadOnly LogConnector As New LogHost
#Region "File name operations" #Region "File name operations"
Friend FileDateAppenderProvider As IFormatProvider Friend FileDateAppenderProvider As IFormatProvider

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2022.9.13.0")> <Assembly: AssemblyVersion("2022.9.17.0")>
<Assembly: AssemblyFileVersion("2022.9.13.0")> <Assembly: AssemblyFileVersion("2022.9.17.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -350,6 +350,16 @@ Namespace My.Resources
End Get End Get
End Property 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> '''<summary>
''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon). ''' Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
'''</summary> '''</summary>

View File

@@ -211,4 +211,7 @@
<data name="RSSPic" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Content\Pictures\RSSPic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </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>
</root> </root>

View File

@@ -93,6 +93,7 @@ Namespace Plugin.Hosts
End Property End Property
#End Region #End Region
#Region "Base properties compatibility" #Region "Base properties compatibility"
Friend ReadOnly Property DownloadSiteData As XMLValue(Of Boolean)
Friend ReadOnly Property Temporary As XMLValue(Of Boolean) Friend ReadOnly Property Temporary As XMLValue(Of Boolean)
Friend ReadOnly Property DownloadImages As XMLValue(Of Boolean) Friend ReadOnly Property DownloadImages As XMLValue(Of Boolean)
Friend ReadOnly Property DownloadVideos 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.SetExtended("DownloadVideos", True, _XML, n)
DownloadVideos.SetDefault(_Vids) DownloadVideos.SetDefault(_Vids)
DownloadSiteData = New XMLValue(Of Boolean)("DownloadSiteData", True, _XML, n)
GetUserMediaOnly = New XMLValue(Of Boolean)("GetUserMediaOnly", True, _XML, n) GetUserMediaOnly = New XMLValue(Of Boolean)("GetUserMediaOnly", True, _XML, n)
If PropList.Count > 0 Then If PropList.Count > 0 Then
Dim MaxOffset% = Math.Max(PropList.Max(Function(pp) pp.LeftOffset), PropertyValueHost.LeftOffsetDefault) 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 _AvailableAsked As Boolean = False
Private _ActiveTaskCount As Integer = 0 Private _ActiveTaskCount As Integer = 0
Friend Function Available(ByVal What As Download, ByVal Silent As Boolean) As Boolean Friend Function Available(ByVal What As Download, ByVal Silent As Boolean) As Boolean
If Not _AvailableAsked Then If DownloadSiteData Then
_AvailableValue = Source.Available(What, Silent) If Not _AvailableAsked Then
_AvailableAsked = True _AvailableValue = Source.Available(What, Silent)
_AvailableAsked = True
End If
Return _AvailableValue
Else
Return False
End If End If
Return _AvailableValue
End Function End Function
Friend Sub DownloadStarted(ByVal What As Download) Friend Sub DownloadStarted(ByVal What As Download)
_ActiveTaskCount += 1 _ActiveTaskCount += 1

View File

@@ -53,7 +53,8 @@ Namespace Plugin.Hosts
.SeparateVideoFolder = SeparateVideoFolderF .SeparateVideoFolder = SeparateVideoFolderF
.DataPath = MyFile.CutPath.PathNoSeparator .DataPath = MyFile.CutPath.PathNoSeparator
.PostsNumberLimit = DownloadTopCount .PostsNumberLimit = DownloadTopCount
.PostsDateLimit = DownloadToDate .DownloadDateFrom = DownloadDateFrom
.DownloadDateTo = DownloadDateTo
.ExistingContentList = New List(Of PluginUserMedia) .ExistingContentList = New List(Of PluginUserMedia)
.TempMediaList = New List(Of PluginUserMedia) .TempMediaList = New List(Of PluginUserMedia)

View File

@@ -491,6 +491,7 @@
<None Include="Content\Pictures\RSSPic.png" /> <None Include="Content\Pictures\RSSPic.png" />
<None Include="Content\Icons\RedGifsIcon.ico" /> <None Include="Content\Icons\RedGifsIcon.ico" />
<None Include="Content\Icons\RSSIcon.ico" /> <None Include="Content\Icons\RSSIcon.ico" />
<None Include="Content\Pictures\StopPic32.png" />
<Content Include="ffmpeg.exe"> <Content Include="ffmpeg.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>

View File

@@ -77,9 +77,7 @@ Friend Class SettingsCLS : Implements IDisposable
FastProfilesLoading = New XMLValue(Of Boolean)("FastProfilesLoading", False, MyXML) FastProfilesLoading = New XMLValue(Of Boolean)("FastProfilesLoading", False, MyXML)
MaxLargeImageHeight = New XMLValue(Of Integer)("MaxLargeImageHeight", 150, MyXML) MaxLargeImageHeight = New XMLValue(Of Integer)("MaxLargeImageHeight", 150, MyXML)
MaxLargeImageHeight.ReplaceByValue("MaxLargeImageHeigh",, MyXML)
MaxSmallImageHeight = New XMLValue(Of Integer)("MaxSmallImageHeight", 15, MyXML) MaxSmallImageHeight = New XMLValue(Of Integer)("MaxSmallImageHeight", 15, MyXML)
MaxSmallImageHeight.ReplaceByValue("MaxSmallImageHeigh",, MyXML)
DownloadOpenInfo = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenInfo", "OpenAgain", False, False, MyXML) DownloadOpenInfo = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenInfo", "OpenAgain", False, False, MyXML)
DownloadOpenProgress = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenProgress", "OpenAgain", False, False, MyXML) DownloadOpenProgress = New XMLValueAttribute(Of Boolean, Boolean)("DownloadOpenProgress", "OpenAgain", False, False, MyXML)
DownloadsCompleteCommand = New XMLValueAttribute(Of String, Boolean)("DownloadsCompleteCommand", "Use",,, MyXML) DownloadsCompleteCommand = New XMLValueAttribute(Of String, Boolean)("DownloadsCompleteCommand", "Use",,, MyXML)
@@ -97,8 +95,13 @@ Friend Class SettingsCLS : Implements IDisposable
LatestSavingPath = New XMLValue(Of SFile)("LatestSavingPath", Nothing, MyXML,, New XMLValueBase.ToFilePath) LatestSavingPath = New XMLValue(Of SFile)("LatestSavingPath", Nothing, MyXML,, New XMLValueBase.ToFilePath)
LatestSelectedChannel = New XMLValue(Of String)("LatestSelectedChannel",, MyXML) 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) LatestDownloadedSites = New XMLValuesCollection(Of String)(XMLValueBase.ListModes.String, "LatestDownloadedSites", MyXML)
SelectedSites = New XMLValuesCollection(Of String)(XMLValueBase.ListModes.String, "SelectedSites", MyXML, {Name_Node_Sites}) SelectedSites = New XMLValuesCollection(Of String)(XMLValueBase.ListModes.String, "SelectedSites", MyXML, {Name_Node_Sites})
@@ -344,46 +347,23 @@ Friend Class SettingsCLS : Implements IDisposable
End Try End Try
End Sub End Sub
Friend Overloads Function GetUser(ByVal User As IUserData, Optional ByVal GetCollection As Boolean = False) As IUserData Friend Overloads Function GetUser(ByVal User As IUserData, Optional ByVal GetCollection As Boolean = False) As IUserData
If Users.Count > 0 Then Return GetUser(If(User?.Key, String.Empty), GetCollection)
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 If(GetCollection, Users(i), .Collections(i))
End With
Else
Return Users(i)
End If
End If
End If
Return Nothing
End Function End Function
Friend Overloads Function GetUser(ByVal UserKey As String, Optional ByVal GetCollection As Boolean = False) As IUserData Friend Overloads Function GetUser(ByVal UserKey As String, Optional ByVal GetCollection As Boolean = False) As IUserData
If Users.Count > 0 Then If Users.Count > 0 And Not UserKey.IsEmptyString Then
Dim finder As Predicate(Of IUserData) = Function(u) u.Key = UserKey Dim finder As Predicate(Of IUserData) = Function(u) u.Key = UserKey
Dim i%, ii% Dim i%, ii%
For i = 0 To Users.Count - 1 For i = 0 To Users.Count - 1
With Users(i) With Users(i)
If .IsCollection Then If finder.Invoke(.Self) Then
Return .Self
ElseIf .IsCollection Then
With DirectCast(.Self, UserDataBind) With DirectCast(.Self, UserDataBind)
If .Count > 0 Then If .Count > 0 Then
ii = .Collections.FindIndex(finder) ii = .Collections.FindIndex(finder)
If ii >= 0 Then Return If(GetCollection, .Self, .Collections(ii)) If ii >= 0 Then Return If(GetCollection, .Self, .Collections(ii))
End If End If
End With End With
Else
If finder.Invoke(.Self) Then Return .Self
End If End If
End With End With
Next Next
@@ -498,15 +478,27 @@ Friend Class SettingsCLS : Implements IDisposable
Friend ReadOnly Property UseGrouping As XMLValue(Of Boolean) Friend ReadOnly Property UseGrouping As XMLValue(Of Boolean)
Friend ReadOnly Property ShowGroupsInsteadLabels As XMLValue(Of Boolean) Friend ReadOnly Property ShowGroupsInsteadLabels As XMLValue(Of Boolean)
Friend ReadOnly Property SelectedSites As XMLValuesCollection(Of String) Friend ReadOnly Property SelectedSites As XMLValuesCollection(Of String)
Private ReadOnly LastUpdatedLimit As XMLValue(Of Date) #Region "View dates"
Friend Property LastUpdatedDate As Date? Private ReadOnly _ViewDateFrom As XMLValue(Of Date)
Friend Property ViewDateFrom As Date?
Get 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 End Get
Set(ByVal NewDate As Date?) Set(ByVal d As Date?)
If Not NewDate.HasValue Then LastUpdatedLimit.ValueF = Nothing Else LastUpdatedLimit.Value = NewDate.Value If Not d.HasValue Then _ViewDateFrom.ValueF = Nothing Else _ViewDateFrom.Value = d.Value
End Set End Set
End Property 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 #End Region
#Region "Latest values" #Region "Latest values"
Friend ReadOnly Property LatestSavingPath As XMLValue(Of SFile) Friend ReadOnly Property LatestSavingPath As XMLValue(Of SFile)