Added script usage
Fixed  downloading of LPSG images
Fixed Instagram Stories
Fixed date/time file pattern
This commit is contained in:
Andy
2022-04-14 18:12:01 +03:00
parent c90dd5637e
commit a5fa935e76
28 changed files with 455 additions and 115 deletions

View File

@@ -1,3 +1,13 @@
# 3.0.0.7
- Added
- Ability to run a script after the user download if complete
- Hotkey ```F2``` for additional options in the user creation form
- Fixed
- (Issue #32) In some cases, Date and Time are still not added for Stories and Tagged Photos
- (Issue #33) Instagram Stories downloading error
- LPSG downloader does not download all content
# 3.0.0.6
- Added

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -9,10 +9,15 @@
Imports PersonalUtilities.Functions.RegularExpressions
Friend Module Declarations
Friend ReadOnly Property PhotoRegEx As RParams = RParams.DM("(https://www.lpsg.com/attachments)(.+?)(?="")", 0, RegexReturn.List)
Friend ReadOnly Property PhotoRegExExt As New RParams("img.data.src=""(/proxy[^""]+?)""", Nothing, 1, RegexReturn.List) With {
.Converter = Function(Input) $"https://www.lpsg.com/{SymbolsConverter.HTML.Decode(Input)}"}
Friend ReadOnly Property NextPageRegex As RParams = RParams.DMS("<link rel=""next"" href=""(.+?/page-(\d+))""", 2)
Private Const FileUrlRegexDefault As String = "(.+[^/]+?)(jpg|jpeg|gif|png)"
Private Const FileUrlRegexDefault As String = "([^/]+?)(jpg|jpeg|gif|png|webm)"
Private ReadOnly InputFReplacer As New ErrorsDescriber(EDP.ReturnValue)
Private ReadOnly InputForbidRemover As Func(Of String, String) = Function(Input) If(Input.IsEmptyString, Input, Input.StringRemoveWinForbiddenSymbols(, InputFReplacer))
Friend ReadOnly Property FileRegEx As New RParams(FileUrlRegexDefault, Nothing, 0) With {
.Converter = Function(ByVal Input As String) As String
Input = InputForbidRemover.Invoke(Input)
If Not Input.IsEmptyString Then
Dim lv$ = Input.Split("-").LastOrDefault
If Not lv.IsEmptyString Then
@@ -22,5 +27,22 @@ Friend Module Declarations
End If
Return Input
End Function}
Friend ReadOnly Property FileRegExExt As New RParams(FileUrlRegexDefault, 0, Nothing, InputForbidRemover)
Friend ReadOnly Property FileRegExExt2 As New RParams("([^/]+?)(?=(\Z|&))", 0, Nothing, InputForbidRemover)
Friend ReadOnly Property FileExistsRegEx As RParams = RParams.DMS(FileUrlRegexDefault, 2)
Private Class PUMComparer : Implements IEqualityComparer, IEqualityComparer(Of PluginUserMedia)
Private Overloads Function Equals(ByVal x As PluginUserMedia, ByVal y As PluginUserMedia) As Boolean Implements IEqualityComparer(Of PluginUserMedia).Equals
Return x.URL = y.URL
End Function
Private Function IEqualityComparer_Equals(ByVal x As Object, ByVal y As Object) As Boolean Implements IEqualityComparer.Equals
Return DirectCast(x, PluginUserMedia).URL = DirectCast(y, PluginUserMedia).URL
End Function
Private Overloads Function GetHashCode(ByVal Obj As Object) As Integer Implements IEqualityComparer.GetHashCode
Throw New NotImplementedException()
End Function
Private Overloads Function GetHashCode(ByVal Obj As PluginUserMedia) As Integer Implements IEqualityComparer(Of PluginUserMedia).GetHashCode
Throw New NotImplementedException()
End Function
End Class
Friend ReadOnly TempListAddParams As New ListAddParams(LAP.NotContainsOnly) With {.Comparer = New PUMComparer}
End Module

View File

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

View File

@@ -9,6 +9,7 @@
Imports PersonalUtilities.Functions.RegularExpressions
Imports UStates = SCrawler.Plugin.PluginUserMedia.States
Imports UTypes = SCrawler.Plugin.PluginUserMedia.Types
Imports Converters = PersonalUtilities.Functions.SymbolsConverter.Converters
Public Class UserData : Implements IPluginContentProvider
#Region "XML names"
Private Const Name_LatestPage As String = "LatestPage"
@@ -60,13 +61,13 @@ Public Class UserData : Implements IPluginContentProvider
#End Region
Private Property LatestPage As String = String.Empty
Private Property Responser As Response = Nothing
Private Enum Mode : Internal : External : End Enum
Public Sub GetMedia() Implements IPluginContentProvider.GetMedia
Try
If Not Responser Is Nothing Then Responser.Dispose()
Responser = New Response
With Responser : .Copy(Settings.Responser) : .Error = EDP.ThrowException : End With
Dim l As List(Of String) = Nothing
Dim NextPage$
Dim r$
Dim _LPage As Func(Of String) = Function() If(LatestPage.IsEmptyString, String.Empty, $"page-{LatestPage}")
@@ -78,35 +79,60 @@ Public Class UserData : Implements IPluginContentProvider
Thrower.ThrowAny()
If Not r.IsEmptyString Then
NextPage = RegexReplace(r, NextPageRegex)
l.ListAddList(RegexReplace(r, PhotoRegEx), LAP.NotContainsOnly)
UpdateMediaList(RegexReplace(r, PhotoRegEx), Mode.Internal)
UpdateMediaList(RegexReplace(r, PhotoRegExExt), Mode.External)
If NextPage = LatestPage Or NextPage.IsEmptyString Then Exit Do Else LatestPage = NextPage
Else
Exit Do
End If
Loop
If l.ListExists Then
Dim f As SFile
For Each u$ In l
If Not IsEmptyString(RegexReplace(u, FileExistsRegEx)) Then
f = CStr(RegexReplace(u, FileRegEx))
f.Path = DataPath.CSFilePSN
f.Separator = "\"
TempMediaList.Add(New PluginUserMedia With {.ContentType = UTypes.Picture, .URL = u, .File = f})
End If
Next
If TempMediaList.ListExists And ExistingContentList.ListExists Then _
TempMediaList.RemoveAll(Function(m) ExistingContentList.Exists(Function(mm) mm.URL = m.URL))
End If
Catch oex As OperationCanceledException
Catch dex As ObjectDisposedException
Catch ex As Exception
If Responser.StatusCode = Net.HttpStatusCode.ServiceUnavailable Then
LogProvider.Add("LPSG not available")
Else
LogProvider.Add(ex, "[LPSG.UserData.GetMedia]")
End If
End Try
End Sub
Private Sub UpdateMediaList(ByVal l As List(Of String), ByVal m As Mode)
If l.ListExists Then
Dim f As SFile
Dim u$
Dim exists As Boolean
Dim r As RParams
Dim ude As New ErrorsDescriber(EDP.ReturnValue)
For Each url$ In l
If Not url.IsEmptyString Then u = SymbolsConverter.Decode(url, {Converters.HTML, Converters.ASCII}, ude) Else u = String.Empty
If Not u.IsEmptyString Then
exists = Not IsEmptyString(RegexReplace(u, FileExistsRegEx))
If m = Mode.Internal Then
r = FileRegEx
Else
r = FileRegExExt
If Not exists Then
r = FileRegExExt2
exists = Not IsEmptyString(RegexReplace(u, FileRegExExt2))
End If
End If
If exists Then
f = CStr(RegexReplace(u, r))
f.Path = DataPath.CSFilePSN
f.Separator = "\"
If f.Extension.IsEmptyString Then f.Extension = "jpg"
TempMediaList.ListAddValue(New PluginUserMedia With {.ContentType = UTypes.Picture, .URL = url, .File = f}, TempListAddParams)
End If
End If
Next
End If
End Sub
Public Sub Download() Implements IPluginContentProvider.Download
Try
With Responser : .UseWebClient = True : .UseWebClientCookies = True : End With
With Responser : .UseWebClient = True : .UseWebClientCookies = True : .ResetError() : End With
If TempMediaList.ListExists Then
Dim m As PluginUserMedia
Dim eweb As ErrorsDescriber = EDP.ThrowException
@@ -122,8 +148,12 @@ Public Class UserData : Implements IPluginContentProvider
Else
m.DownloadState = UStates.Skipped
End If
Catch ex As Exception
Catch wex As Exception
If Responser.Client.StatusCode = Net.HttpStatusCode.ServiceUnavailable Then
LogProvider.Add("LPSG not available")
Else
m.DownloadState = UStates.Skipped
End If
End Try
RaiseEvent ProgressChanged(1)
TempMediaList(i) = m

View File

@@ -10,6 +10,7 @@ Imports PersonalUtilities.Functions.XML
Imports PersonalUtilities.Functions.RegularExpressions
Imports PersonalUtilities.Forms.Toolbars
Imports PersonalUtilities.Tools.WEB
Imports PersonalUtilities.Tools
Imports System.IO
Imports System.Net
Imports System.Threading
@@ -115,6 +116,9 @@ Namespace API.Base
Private Const Name_PicturesCount As String = "PicturesCount"
Private Const Name_LastUpdated As String = "LastUpdated"
Private Const Name_ScriptUse As String = "ScriptUse"
Private Const Name_ScriptFile As String = "ScriptFile"
Private Const Name_DataMerging As String = "DataMerging"
#Region "Downloaded data"
Private Const Name_MediaType As String = "Type"
@@ -405,6 +409,10 @@ BlockNullPicture:
End Get
End Property
#End Region
#Region "Script"
Friend Overridable Property ScriptUse As Boolean = False Implements IUserData.ScriptUse
Friend Overridable Property ScriptFile As SFile Implements IUserData.ScriptFile
#End Region
#End Region
#Region "Plugins Support"
Protected Event ProgressChanged As IPluginContentProvider.ProgressChangedEventHandler Implements IPluginContentProvider.ProgressChanged
@@ -576,6 +584,17 @@ BlockNullPicture:
DownloadedVideos(True) = x.Value(Name_VideoCount).FromXML(Of Integer)(0)
DownloadedPictures(True) = x.Value(Name_PicturesCount).FromXML(Of Integer)(0)
LastUpdated = AConvert(Of Date)(x.Value(Name_LastUpdated), ADateTime.Formats.BaseDateTime, Nothing)
ScriptUse = x.Value(Name_ScriptUse).FromXML(Of Boolean)(False)
Dim s$ = x.Value(Name_ScriptFile)
If Not s.IsEmptyString Then
If SFile.IsDirectory(s) Then
ScriptFile = s
Else
ScriptFile = New SFile(s) With {.Path = MyFile.Path}
End If
Else
ScriptFile = Nothing
End If
DataMerging = x.Value(Name_DataMerging).FromXML(Of Boolean)(False)
ChangeCollectionName(x.Value(Name_CollectionName), False)
Labels.ListAddList(x.Value(Name_LabelsName).StringToList(Of String, List(Of String))("|", EDP.ReturnValue), LAP.NotContainsOnly, LAP.ClearBeforeAdd)
@@ -615,6 +634,16 @@ BlockNullPicture:
x.Add(Name_VideoCount, DownloadedVideos(True))
x.Add(Name_PicturesCount, DownloadedPictures(True))
x.Add(Name_LastUpdated, AConvert(Of String)(LastUpdated, ADateTime.Formats.BaseDateTime, String.Empty))
x.Add(Name_ScriptUse, ScriptUse.BoolToInteger)
If Not ScriptFile.IsEmptyString Then
If ScriptFile.Path = MyFile.Path Then
x.Add(Name_ScriptFile, ScriptFile.File)
Else
x.Add(Name_ScriptFile, ScriptFile)
End If
Else
x.Add(Name_ScriptFile, String.Empty)
End If
x.Add(Name_CollectionName, CollectionName)
x.Add(Name_LabelsName, Labels.ListToString(, "|", EDP.ReturnValue))
x.Add(Name_DataMerging, DataMerging.BoolToInteger)
@@ -760,6 +789,7 @@ BlockNullPicture:
If DownloadedTotal(False) > 0 Or EnvirChanged.Invoke Then
If __SaveData Then
LastUpdated = Now
RunScript()
DownloadedPictures(True) = SFile.GetFiles(User.File.CutPath, "*.jpg|*.jpeg|*.png|*.gif|*.webm",, EDP.ReturnValue).Count
DownloadedVideos(True) = SFile.GetFiles(User.File.CutPath, "*.mp4|*.mkv|*.mov", SearchOption.AllDirectories, EDP.ReturnValue).Count
If Labels.Contains(LabelsKeeper.NoParsedUser) Then Labels.Remove(LabelsKeeper.NoParsedUser)
@@ -919,16 +949,10 @@ BlockNullPicture:
Dim ff As SFile = Nothing
Try
If Not f.IsEmptyString AndAlso f.Exists Then
Dim d As Date? = m.Post.Date
If Settings.FileReplaceNameByDate Then
Dim dd$ = AConvert(Of String)(If(d, Now), FileDateAppenderProvider, String.Empty)
ff = f
ff.Name = dd
ff.Name = String.Format(FileDateAppenderPattern, f.Name, CStr(AConvert(Of String)(If(m.Post.Date, Now), FileDateAppenderProvider, String.Empty)))
ff = SFile.Indexed_IndexFile(ff,, New NumberedFile(ff))
ElseIf d.HasValue AndAlso (Settings.FileAddDateToFileName Or Settings.FileAddTimeToFileName) AndAlso
(Not FileDateAppenderProvider Is Nothing And Not FileDateAppenderPattern.IsEmptyString) Then
ff = f
ff.Name = String.Format(FileDateAppenderPattern, f.Name, CStr(AConvert(Of String)(d.Value, FileDateAppenderProvider, String.Empty)))
End If
If Not ff.Name.IsEmptyString Then My.Computer.FileSystem.RenameFile(f, ff.File) : Return ff
End If
@@ -938,6 +962,27 @@ BlockNullPicture:
Return f
End Try
End Function
Private Sub RunScript()
Try
If ScriptUse Then
Dim ScriptPattern$
If Not ScriptFile.IsEmptyString Then
ScriptPattern = ScriptFile
Else
ScriptPattern = Settings.ScriptFile.Value
End If
If Not ScriptPattern.IsEmptyString Then
ScriptPattern &= " {0}"
Using b As New BatchExecutor With {.RedirectStandardError = True}
b.Execute({String.Format(ScriptPattern, MyFile.CutPath(1).ToString)}, EDP.SendInLog + EDP.ThrowException)
If b.HasError Or Not b.ErrorOutput.IsEmptyString Then Throw New Exception(b.ErrorOutput, b.ErrorException)
End Using
End If
End If
Catch ex As Exception
LogError(ex, "script execution error")
End Try
End Sub
#End Region
#Region "Delete, Move, Merge"
Friend Overridable Function Delete() As Integer Implements IUserData.Delete
@@ -990,6 +1035,11 @@ BlockNullPicture:
End If
f.CutPath.Exists(SFO.Path)
Directory.Move(UserBefore.File.CutPath(, EDP.ThrowException).Path, f.Path)
If Not ScriptFile.IsEmptyString AndAlso ScriptFile.Path = UserBefore.File.Path Then
Dim ff As SFile = ScriptFile
f.Path = MyFile.Path
ScriptFile = ff
End If
Settings.UsersList.Remove(UserBefore)
Settings.UpdateUsersList(User)
UpdateUserInformation()
@@ -1043,6 +1093,11 @@ BlockNullPicture:
New ErrorsDescriber(False, False, False, New List(Of SFile))).Count = 0 Then
UserBefore.File.CutPath.Delete(SFO.Path, Settings.DeleteMode, EDP.SendInLog)
End If
If Not ScriptFile.IsEmptyString AndAlso ScriptFile.Path = UserBefore.File.Path Then
Dim f As SFile = ScriptFile
f.Path = MyFile.Path
ScriptFile = f
End If
UpdateUserInformation()
End If
Catch ioex As InvalidOperationException When ioex.HelpLink = 1
@@ -1207,6 +1262,8 @@ BlockNullPicture:
ReadOnly Property Key As String
Property DownloadImages As Boolean
Property DownloadVideos As Boolean
Property ScriptUse As Boolean
Property ScriptFile As SFile
Function GetLVI(ByVal Destination As ListView) As ListViewItem
Function GetLVIGroup(ByVal Destination As ListView) As ListViewGroup
Sub LoadUserInformation()

View File

@@ -193,6 +193,7 @@ Namespace API.Instagram
Case Sections.Stories
If Not StoriesRequested Then
StoriesList = GetStoriesList()
StoriesRequested = True
MySiteSettings.TooManyRequests(False)
RequestsCount += 1
ThrowAny(Token)

View File

@@ -207,6 +207,18 @@ Namespace API
Return Count > 0 AndAlso Collections.Exists(Function(c) c.FitToAddParams)
End Get
End Property
Friend Overrides Property ScriptUse As Boolean
Get
Return Count > 0 AndAlso Collections.Exists(Function(c) c.ScriptUse)
End Get
Set(ByVal u As Boolean)
If Count > 0 Then Collections.ForEach(Sub(ByVal c As IUserData)
Dim b As Boolean = c.ScriptUse = u
c.ScriptUse = u
If Not b Then c.UpdateUserInformation()
End Sub)
End Set
End Property
#Region "Context buttons"
Friend ReadOnly Property ContextDown As ToolStripMenuItem()
Get
@@ -336,6 +348,7 @@ Namespace API
.Favorite = Favorite
.ReadyForDownload = ReadyForDownload
ConsolidateLabels()
ConsolidateScripts()
.UpdateUserInformation()
End If
ImageHandler(_Item, False)
@@ -381,6 +394,9 @@ Namespace API
Collections.ForEach(Sub(c) c.Labels.ListAddList(l, lp))
End If
End Sub
Private Sub ConsolidateScripts()
If Count > 1 AndAlso ScriptUse Then Collections.ForEach(Sub(c) c.ScriptUse = True)
End Sub
Friend Sub AddRange(ByVal _Items As IEnumerable(Of IUserData))
If Not _Items Is Nothing AndAlso _Items.Count > 0 Then
For i% = 0 To _Items.Count - 1 : Add(_Items(i)) : Next

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

View File

@@ -129,7 +129,7 @@ Namespace DownloadObjects
With Settings.LatestSavingPath
If Not .Value.IsEmptyString Then
If .Value.Exists(SFO.Path, False) Then
.Value.Open(SFO.Path, EDP.ShowMainMsg)
GlobalOpenPath(.Value, EDP.ShowMainMsg)
Else
MsgBoxE($"Path [{ .Value}] does not exists!", MsgBoxStyle.Exclamation)
End If

View File

@@ -28,6 +28,8 @@
Dim TP_FILE_PATTERNS As System.Windows.Forms.TableLayoutPanel
Dim LBL_DATE_POS As System.Windows.Forms.Label
Dim ActionButton7 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim ActionButton8 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim ActionButton9 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim TT_MAIN As System.Windows.Forms.ToolTip
Dim TP_CHANNELS_IMGS As System.Windows.Forms.TableLayoutPanel
Dim TAB_BASIS As System.Windows.Forms.TabPage
@@ -56,6 +58,7 @@
Me.CH_FAST_LOAD = New System.Windows.Forms.CheckBox()
Me.TXT_FOLDER_CMD = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.CH_RECYCLE_DEL = New System.Windows.Forms.CheckBox()
Me.TXT_SCRIPT = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.CH_COPY_CHANNEL_USER_IMAGE = New System.Windows.Forms.CheckBox()
Me.CH_DEF_TEMP = New System.Windows.Forms.CheckBox()
Me.CH_DOWN_IMAGES = New System.Windows.Forms.CheckBox()
@@ -93,6 +96,7 @@
TP_FILE_NAME.SuspendLayout()
TP_FILE_PATTERNS.SuspendLayout()
CType(Me.TXT_FOLDER_CMD, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TXT_SCRIPT, System.ComponentModel.ISupportInitialize).BeginInit()
TP_CHANNELS_IMGS.SuspendLayout()
CType(Me.TXT_CHANNELS_ROWS, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TXT_CHANNELS_COLUMNS, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -127,10 +131,11 @@
TP_BASIS.Controls.Add(Me.CH_FAST_LOAD, 0, 12)
TP_BASIS.Controls.Add(Me.TXT_FOLDER_CMD, 0, 13)
TP_BASIS.Controls.Add(Me.CH_RECYCLE_DEL, 0, 14)
TP_BASIS.Controls.Add(Me.TXT_SCRIPT, 0, 15)
TP_BASIS.Dock = System.Windows.Forms.DockStyle.Fill
TP_BASIS.Location = New System.Drawing.Point(3, 3)
TP_BASIS.Name = "TP_BASIS"
TP_BASIS.RowCount = 16
TP_BASIS.RowCount = 17
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
@@ -146,8 +151,9 @@
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_BASIS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_BASIS.Size = New System.Drawing.Size(570, 447)
TP_BASIS.Size = New System.Drawing.Size(570, 450)
TP_BASIS.TabIndex = 0
'
'TXT_GLOBAL_PATH
@@ -510,6 +516,30 @@
Me.CH_RECYCLE_DEL.Text = "Delete data to recycle bin"
Me.CH_RECYCLE_DEL.UseVisualStyleBackColor = True
'
'TXT_SCRIPT
'
ActionButton8.BackgroundImage = CType(resources.GetObject("ActionButton8.BackgroundImage"), System.Drawing.Image)
ActionButton8.Index = 0
ActionButton8.Name = "BTT_OPEN"
ActionButton9.BackgroundImage = CType(resources.GetObject("ActionButton9.BackgroundImage"), System.Drawing.Image)
ActionButton9.Index = 1
ActionButton9.Name = "BTT_CLEAR"
Me.TXT_SCRIPT.Buttons.Add(ActionButton8)
Me.TXT_SCRIPT.Buttons.Add(ActionButton9)
Me.TXT_SCRIPT.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
Me.TXT_SCRIPT.CaptionText = "Script"
Me.TXT_SCRIPT.CaptionToolTipEnabled = True
Me.TXT_SCRIPT.CaptionToolTipText = "Default script. If the checkbox is checked, newly created users will be created u" &
"sing the script option."
Me.TXT_SCRIPT.ChangeControlsEnableOnCheckedChange = False
Me.TXT_SCRIPT.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_SCRIPT.Location = New System.Drawing.Point(4, 425)
Me.TXT_SCRIPT.Name = "TXT_SCRIPT"
Me.TXT_SCRIPT.PlaceholderEnabled = True
Me.TXT_SCRIPT.PlaceholderText = "Enter script path here..."
Me.TXT_SCRIPT.Size = New System.Drawing.Size(562, 22)
Me.TXT_SCRIPT.TabIndex = 15
'
'CH_COPY_CHANNEL_USER_IMAGE
'
Me.CH_COPY_CHANNEL_USER_IMAGE.AutoSize = True
@@ -659,7 +689,7 @@
TAB_BASIS.Location = New System.Drawing.Point(4, 22)
TAB_BASIS.Name = "TAB_BASIS"
TAB_BASIS.Padding = New System.Windows.Forms.Padding(3)
TAB_BASIS.Size = New System.Drawing.Size(576, 453)
TAB_BASIS.Size = New System.Drawing.Size(576, 456)
TAB_BASIS.TabIndex = 0
TAB_BASIS.Text = "Basis"
'
@@ -669,7 +699,7 @@
TAB_DEFAULTS.Location = New System.Drawing.Point(4, 22)
TAB_DEFAULTS.Name = "TAB_DEFAULTS"
TAB_DEFAULTS.Padding = New System.Windows.Forms.Padding(3)
TAB_DEFAULTS.Size = New System.Drawing.Size(576, 453)
TAB_DEFAULTS.Size = New System.Drawing.Size(576, 481)
TAB_DEFAULTS.TabIndex = 1
TAB_DEFAULTS.Text = "Defaults"
'
@@ -693,7 +723,7 @@
TP_DEFS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
TP_DEFS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
TP_DEFS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_DEFS.Size = New System.Drawing.Size(570, 447)
TP_DEFS.Size = New System.Drawing.Size(570, 475)
TP_DEFS.TabIndex = 0
'
'TAB_DEFS_CHANNELS
@@ -702,7 +732,7 @@
TAB_DEFS_CHANNELS.Location = New System.Drawing.Point(4, 22)
TAB_DEFS_CHANNELS.Name = "TAB_DEFS_CHANNELS"
TAB_DEFS_CHANNELS.Padding = New System.Windows.Forms.Padding(3)
TAB_DEFS_CHANNELS.Size = New System.Drawing.Size(576, 453)
TAB_DEFS_CHANNELS.Size = New System.Drawing.Size(576, 481)
TAB_DEFS_CHANNELS.TabIndex = 4
TAB_DEFS_CHANNELS.Text = "Channels"
'
@@ -726,7 +756,7 @@
TP_CHANNELS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
TP_CHANNELS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
TP_CHANNELS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_CHANNELS.Size = New System.Drawing.Size(570, 447)
TP_CHANNELS.Size = New System.Drawing.Size(570, 475)
TP_CHANNELS.TabIndex = 0
'
'TXT_CHANNEL_USER_POST_LIMIT
@@ -758,7 +788,7 @@
Me.TAB_MAIN.Location = New System.Drawing.Point(0, 0)
Me.TAB_MAIN.Name = "TAB_MAIN"
Me.TAB_MAIN.SelectedIndex = 0
Me.TAB_MAIN.Size = New System.Drawing.Size(584, 479)
Me.TAB_MAIN.Size = New System.Drawing.Size(584, 482)
Me.TAB_MAIN.TabIndex = 1
'
'CONTAINER_MAIN
@@ -767,13 +797,13 @@
'CONTAINER_MAIN.ContentPanel
'
Me.CONTAINER_MAIN.ContentPanel.Controls.Add(Me.TAB_MAIN)
Me.CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(584, 479)
Me.CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(584, 482)
Me.CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
Me.CONTAINER_MAIN.LeftToolStripPanelVisible = False
Me.CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
Me.CONTAINER_MAIN.Name = "CONTAINER_MAIN"
Me.CONTAINER_MAIN.RightToolStripPanelVisible = False
Me.CONTAINER_MAIN.Size = New System.Drawing.Size(584, 479)
Me.CONTAINER_MAIN.Size = New System.Drawing.Size(584, 507)
Me.CONTAINER_MAIN.TabIndex = 0
Me.CONTAINER_MAIN.TopToolStripPanelVisible = False
'
@@ -781,15 +811,15 @@
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(584, 479)
Me.ClientSize = New System.Drawing.Size(584, 507)
Me.Controls.Add(Me.CONTAINER_MAIN)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.KeyPreview = True
Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(600, 518)
Me.MaximumSize = New System.Drawing.Size(600, 546)
Me.MinimizeBox = False
Me.MinimumSize = New System.Drawing.Size(600, 518)
Me.MinimumSize = New System.Drawing.Size(600, 546)
Me.Name = "GlobalSettingsForm"
Me.ShowInTaskbar = False
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
@@ -809,6 +839,7 @@
TP_FILE_PATTERNS.ResumeLayout(False)
TP_FILE_PATTERNS.PerformLayout()
CType(Me.TXT_FOLDER_CMD, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TXT_SCRIPT, System.ComponentModel.ISupportInitialize).EndInit()
TP_CHANNELS_IMGS.ResumeLayout(False)
CType(Me.TXT_CHANNELS_ROWS, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TXT_CHANNELS_COLUMNS, System.ComponentModel.ISupportInitialize).EndInit()
@@ -862,5 +893,6 @@
Private WithEvents CH_FAST_LOAD As CheckBox
Private WithEvents TXT_FOLDER_CMD As PersonalUtilities.Forms.Controls.TextBoxExtended
Private WithEvents CH_RECYCLE_DEL As CheckBox
Private WithEvents TXT_SCRIPT As PersonalUtilities.Forms.Controls.TextBoxExtended
End Class
End Namespace

View File

@@ -212,6 +212,25 @@
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
</value>
</data>
<data name="ActionButton8.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAR5JREFUOE+VkjFqwzAUhn2D9iShRyi+QhYbGujg3ZATZPKYdC6FQhPwlAMkg3dP
WQwhyWIyJIUW5NqyPb7oCVtIlhVTwYf8nv7/t2zJagel9KmqKsIACYL9RjI8UHz5zshougZr/AEvbxEP
aZCDBY3VslixaJvX3wzkkDiOwbZtDRGA5vdNAg+TL27qgmt5XkBG/gTdAG7Gt+3PP9oOaEGFCVEC6rp+
5g9MfM/c5e4OsEZMZkQEtGL5H2DdZ5JRArDwPA+iKII0TfkC9vroC9j5vq8JTWw3WzWgLMtZGIaa0MR8
vlAD8PYlSaIJTTiOowY0p0Bc19XEJo6HE59FAPuMzyAINKGJ1XLFZxHALtMrnkBXOIQIIIQ8YvF/KrgB
cMaRN0UdBBkAAAAASUVORK5CYII=
</value>
</data>
<data name="ActionButton9.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
</value>
</data>
<data name="CH_SEPARATE_VIDEO_FOLDER.ToolTip" xml:space="preserve">

View File

@@ -36,6 +36,8 @@ Namespace Editors
TXT_FOLDER_CMD.Text = .OpenFolderInOtherProgram
TXT_FOLDER_CMD.Checked = .OpenFolderInOtherProgram.Attribute
CH_RECYCLE_DEL.Checked = .DeleteToRecycleBin
TXT_SCRIPT.Checked = .ScriptFile.Attribute
TXT_SCRIPT.Text = .ScriptFile.Value
'Defaults
CH_SEPARATE_VIDEO_FOLDER.Checked = .SeparateVideoFolder.Value
CH_DEF_TEMP.Checked = .DefaultTemporary
@@ -123,6 +125,8 @@ Namespace Editors
.OpenFolderInOtherProgram.Value = TXT_FOLDER_CMD.Text
.OpenFolderInOtherProgram.Attribute.Value = TXT_FOLDER_CMD.Checked
.DeleteToRecycleBin.Value = CH_RECYCLE_DEL.Checked
.ScriptFile.Value = TXT_SCRIPT.Text
.ScriptFile.Attribute.Value = TXT_SCRIPT.Checked
'Defaults
.SeparateVideoFolder.Value = CH_SEPARATE_VIDEO_FOLDER.Checked
.DefaultTemporary.Value = CH_DEF_TEMP.Checked
@@ -195,6 +199,12 @@ Namespace Editors
CH_FILE_TIME.Enabled = b
ChangePositionControlsEnabling()
End Sub
Private Sub TXT_SCRIPT_ActionOnButtonClick(ByVal Sender As ActionButton) Handles TXT_SCRIPT.ActionOnButtonClick
If Sender.DefaultButton = ActionButton.DefaultButtons.Open Then
Dim f As SFile = SFile.SelectFiles(TXT_SCRIPT.Text, False, "Select script file",, EDP.None).FirstOrDefault
If Not f.IsEmptyString Then TXT_SCRIPT.Text = f
End If
End Sub
Private Sub CH_COPY_CHANNEL_USER_IMAGE_CheckedChanged(sender As Object, e As EventArgs) Handles CH_COPY_CHANNEL_USER_IMAGE.CheckedChanged
CH_COPY_CHANNEL_USER_IMAGE_ALL.Enabled = CH_COPY_CHANNEL_USER_IMAGE.Checked
End Sub

View File

@@ -29,6 +29,8 @@
Dim TP_DOWN_OPTIONS As System.Windows.Forms.TableLayoutPanel
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 ActionButton7 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim ActionButton8 As PersonalUtilities.Forms.Controls.Base.ActionButton = New PersonalUtilities.Forms.Controls.Base.ActionButton()
Dim TT_MAIN As System.Windows.Forms.ToolTip
Me.TXT_USER = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.CH_IS_CHANNEL = New System.Windows.Forms.CheckBox()
@@ -47,6 +49,7 @@
Me.CH_DOWN_IMAGES = New System.Windows.Forms.CheckBox()
Me.CH_DOWN_VIDEOS = New System.Windows.Forms.CheckBox()
Me.TXT_SPEC_FOLDER = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.TXT_SCRIPT = New PersonalUtilities.Forms.Controls.TextBoxExtended()
Me.CONTAINER_MAIN = New System.Windows.Forms.ToolStripContainer()
TP_MAIN = New System.Windows.Forms.TableLayoutPanel()
TP_SITE = New System.Windows.Forms.TableLayoutPanel()
@@ -66,6 +69,7 @@
CType(Me.TXT_LABELS, System.ComponentModel.ISupportInitialize).BeginInit()
TP_DOWN_OPTIONS.SuspendLayout()
CType(Me.TXT_SPEC_FOLDER, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TXT_SCRIPT, System.ComponentModel.ISupportInitialize).BeginInit()
Me.CONTAINER_MAIN.ContentPanel.SuspendLayout()
Me.CONTAINER_MAIN.SuspendLayout()
Me.SuspendLayout()
@@ -79,27 +83,29 @@
TP_MAIN.Controls.Add(TP_SITE, 0, 3)
TP_MAIN.Controls.Add(TP_PARAMS, 0, 4)
TP_MAIN.Controls.Add(TP_OTHER, 0, 6)
TP_MAIN.Controls.Add(Me.TXT_DESCR, 0, 9)
TP_MAIN.Controls.Add(Me.TXT_DESCR, 0, 10)
TP_MAIN.Controls.Add(Me.TXT_USER_FRIENDLY, 0, 1)
TP_MAIN.Controls.Add(Me.TP_ADD_BY_LIST, 0, 7)
TP_MAIN.Controls.Add(Me.TXT_LABELS, 0, 8)
TP_MAIN.Controls.Add(TP_DOWN_OPTIONS, 0, 5)
TP_MAIN.Controls.Add(Me.TXT_SPEC_FOLDER, 0, 2)
TP_MAIN.Controls.Add(Me.TXT_SCRIPT, 0, 9)
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 = 10
TP_MAIN.RowCount = 11
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66708!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66708!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66708!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66542!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 150.0!))
TP_MAIN.Size = New System.Drawing.Size(454, 431)
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26.0!))
TP_MAIN.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_MAIN.Size = New System.Drawing.Size(454, 461)
TP_MAIN.TabIndex = 0
'
'TXT_USER
@@ -119,7 +125,7 @@
TP_SITE.ColumnCount = 3
TP_SITE.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 79.0!))
TP_SITE.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_SITE.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 88.0!))
TP_SITE.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 92.0!))
TP_SITE.Controls.Add(Me.CH_IS_CHANNEL, 0, 0)
TP_SITE.Controls.Add(Me.CMB_SITE, 1, 0)
TP_SITE.Controls.Add(Me.BTT_OTHER_SETTINGS, 2, 0)
@@ -129,7 +135,7 @@
TP_SITE.Name = "TP_SITE"
TP_SITE.RowCount = 1
TP_SITE.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_SITE.Size = New System.Drawing.Size(452, 31)
TP_SITE.Size = New System.Drawing.Size(452, 28)
TP_SITE.TabIndex = 3
'
'CH_IS_CHANNEL
@@ -138,7 +144,7 @@
Me.CH_IS_CHANNEL.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_IS_CHANNEL.Location = New System.Drawing.Point(4, 4)
Me.CH_IS_CHANNEL.Name = "CH_IS_CHANNEL"
Me.CH_IS_CHANNEL.Size = New System.Drawing.Size(73, 23)
Me.CH_IS_CHANNEL.Size = New System.Drawing.Size(73, 20)
Me.CH_IS_CHANNEL.TabIndex = 0
Me.CH_IS_CHANNEL.Text = "Channel"
Me.CH_IS_CHANNEL.UseVisualStyleBackColor = True
@@ -160,22 +166,22 @@
Me.CMB_SITE.Columns.Add(ListColumn1)
Me.CMB_SITE.Columns.Add(ListColumn2)
Me.CMB_SITE.Dock = System.Windows.Forms.DockStyle.Fill
Me.CMB_SITE.Location = New System.Drawing.Point(84, 2)
Me.CMB_SITE.Margin = New System.Windows.Forms.Padding(3, 1, 3, 3)
Me.CMB_SITE.Location = New System.Drawing.Point(84, 3)
Me.CMB_SITE.Margin = New System.Windows.Forms.Padding(3, 2, 3, 3)
Me.CMB_SITE.Name = "CMB_SITE"
Me.CMB_SITE.Size = New System.Drawing.Size(275, 22)
Me.CMB_SITE.Size = New System.Drawing.Size(271, 22)
Me.CMB_SITE.TabIndex = 1
Me.CMB_SITE.TextBoxBorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
'
'BTT_OTHER_SETTINGS
'
Me.BTT_OTHER_SETTINGS.Dock = System.Windows.Forms.DockStyle.Fill
Me.BTT_OTHER_SETTINGS.Location = New System.Drawing.Point(364, 2)
Me.BTT_OTHER_SETTINGS.Location = New System.Drawing.Point(360, 2)
Me.BTT_OTHER_SETTINGS.Margin = New System.Windows.Forms.Padding(1)
Me.BTT_OTHER_SETTINGS.Name = "BTT_OTHER_SETTINGS"
Me.BTT_OTHER_SETTINGS.Size = New System.Drawing.Size(86, 27)
Me.BTT_OTHER_SETTINGS.Size = New System.Drawing.Size(90, 24)
Me.BTT_OTHER_SETTINGS.TabIndex = 2
Me.BTT_OTHER_SETTINGS.Text = "Options"
Me.BTT_OTHER_SETTINGS.Text = "Options (F2)"
TT_MAIN.SetToolTip(Me.BTT_OTHER_SETTINGS, "Other settings")
Me.BTT_OTHER_SETTINGS.UseVisualStyleBackColor = True
'
@@ -188,13 +194,13 @@
TP_PARAMS.Controls.Add(Me.CH_TEMP, 0, 0)
TP_PARAMS.Controls.Add(Me.CH_FAV, 1, 0)
TP_PARAMS.Dock = System.Windows.Forms.DockStyle.Fill
TP_PARAMS.Location = New System.Drawing.Point(1, 120)
TP_PARAMS.Location = New System.Drawing.Point(1, 117)
TP_PARAMS.Margin = New System.Windows.Forms.Padding(0)
TP_PARAMS.Name = "TP_PARAMS"
TP_PARAMS.RowCount = 1
TP_PARAMS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_PARAMS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
TP_PARAMS.Size = New System.Drawing.Size(452, 31)
TP_PARAMS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27.0!))
TP_PARAMS.Size = New System.Drawing.Size(452, 28)
TP_PARAMS.TabIndex = 4
'
'CH_TEMP
@@ -203,7 +209,7 @@
Me.CH_TEMP.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_TEMP.Location = New System.Drawing.Point(4, 4)
Me.CH_TEMP.Name = "CH_TEMP"
Me.CH_TEMP.Size = New System.Drawing.Size(218, 23)
Me.CH_TEMP.Size = New System.Drawing.Size(218, 20)
Me.CH_TEMP.TabIndex = 0
Me.CH_TEMP.Text = "Temporary"
Me.CH_TEMP.UseVisualStyleBackColor = True
@@ -214,7 +220,7 @@
Me.CH_FAV.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_FAV.Location = New System.Drawing.Point(229, 4)
Me.CH_FAV.Name = "CH_FAV"
Me.CH_FAV.Size = New System.Drawing.Size(219, 23)
Me.CH_FAV.Size = New System.Drawing.Size(219, 20)
Me.CH_FAV.TabIndex = 1
Me.CH_FAV.Text = "Favorite"
Me.CH_FAV.UseVisualStyleBackColor = True
@@ -228,13 +234,13 @@
TP_OTHER.Controls.Add(Me.CH_PARSE_USER_MEDIA, 1, 0)
TP_OTHER.Controls.Add(Me.CH_READY_FOR_DOWN, 0, 0)
TP_OTHER.Dock = System.Windows.Forms.DockStyle.Fill
TP_OTHER.Location = New System.Drawing.Point(1, 184)
TP_OTHER.Location = New System.Drawing.Point(1, 175)
TP_OTHER.Margin = New System.Windows.Forms.Padding(0)
TP_OTHER.Name = "TP_OTHER"
TP_OTHER.RowCount = 1
TP_OTHER.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_OTHER.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
TP_OTHER.Size = New System.Drawing.Size(452, 31)
TP_OTHER.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27.0!))
TP_OTHER.Size = New System.Drawing.Size(452, 28)
TP_OTHER.TabIndex = 6
'
'CH_PARSE_USER_MEDIA
@@ -243,7 +249,7 @@
Me.CH_PARSE_USER_MEDIA.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_PARSE_USER_MEDIA.Location = New System.Drawing.Point(229, 4)
Me.CH_PARSE_USER_MEDIA.Name = "CH_PARSE_USER_MEDIA"
Me.CH_PARSE_USER_MEDIA.Size = New System.Drawing.Size(219, 23)
Me.CH_PARSE_USER_MEDIA.Size = New System.Drawing.Size(219, 20)
Me.CH_PARSE_USER_MEDIA.TabIndex = 0
Me.CH_PARSE_USER_MEDIA.Text = "Get user media only"
TT_MAIN.SetToolTip(Me.CH_PARSE_USER_MEDIA, "For twitter only!" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "If checked then user media only will be downloaded." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Otherwise" &
@@ -256,7 +262,7 @@
Me.CH_READY_FOR_DOWN.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_READY_FOR_DOWN.Location = New System.Drawing.Point(4, 4)
Me.CH_READY_FOR_DOWN.Name = "CH_READY_FOR_DOWN"
Me.CH_READY_FOR_DOWN.Size = New System.Drawing.Size(218, 23)
Me.CH_READY_FOR_DOWN.Size = New System.Drawing.Size(218, 20)
Me.CH_READY_FOR_DOWN.TabIndex = 1
Me.CH_READY_FOR_DOWN.Text = "Ready for download"
TT_MAIN.SetToolTip(Me.CH_READY_FOR_DOWN, "Can be downloaded by [Download All]")
@@ -275,11 +281,11 @@
Me.TXT_DESCR.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_DESCR.GroupBoxed = True
Me.TXT_DESCR.GroupBoxText = "Description"
Me.TXT_DESCR.Location = New System.Drawing.Point(4, 282)
Me.TXT_DESCR.Location = New System.Drawing.Point(4, 290)
Me.TXT_DESCR.Multiline = True
Me.TXT_DESCR.Name = "TXT_DESCR"
Me.TXT_DESCR.Size = New System.Drawing.Size(446, 145)
Me.TXT_DESCR.TabIndex = 9
Me.TXT_DESCR.Size = New System.Drawing.Size(446, 167)
Me.TXT_DESCR.TabIndex = 10
'
'TXT_USER_FRIENDLY
'
@@ -300,12 +306,12 @@
Me.TP_ADD_BY_LIST.Controls.Add(Me.CH_ADD_BY_LIST, 0, 0)
Me.TP_ADD_BY_LIST.Controls.Add(Me.CH_AUTO_DETECT_SITE, 1, 0)
Me.TP_ADD_BY_LIST.Dock = System.Windows.Forms.DockStyle.Fill
Me.TP_ADD_BY_LIST.Location = New System.Drawing.Point(1, 216)
Me.TP_ADD_BY_LIST.Location = New System.Drawing.Point(1, 204)
Me.TP_ADD_BY_LIST.Margin = New System.Windows.Forms.Padding(0)
Me.TP_ADD_BY_LIST.Name = "TP_ADD_BY_LIST"
Me.TP_ADD_BY_LIST.RowCount = 1
Me.TP_ADD_BY_LIST.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TP_ADD_BY_LIST.Size = New System.Drawing.Size(452, 30)
Me.TP_ADD_BY_LIST.Size = New System.Drawing.Size(452, 28)
Me.TP_ADD_BY_LIST.TabIndex = 7
'
'CH_ADD_BY_LIST
@@ -314,7 +320,7 @@
Me.CH_ADD_BY_LIST.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_ADD_BY_LIST.Location = New System.Drawing.Point(4, 4)
Me.CH_ADD_BY_LIST.Name = "CH_ADD_BY_LIST"
Me.CH_ADD_BY_LIST.Size = New System.Drawing.Size(218, 22)
Me.CH_ADD_BY_LIST.Size = New System.Drawing.Size(218, 20)
Me.CH_ADD_BY_LIST.TabIndex = 0
Me.CH_ADD_BY_LIST.Text = "Add by list"
Me.CH_ADD_BY_LIST.UseVisualStyleBackColor = True
@@ -325,7 +331,7 @@
Me.CH_AUTO_DETECT_SITE.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_AUTO_DETECT_SITE.Location = New System.Drawing.Point(229, 4)
Me.CH_AUTO_DETECT_SITE.Name = "CH_AUTO_DETECT_SITE"
Me.CH_AUTO_DETECT_SITE.Size = New System.Drawing.Size(219, 22)
Me.CH_AUTO_DETECT_SITE.Size = New System.Drawing.Size(219, 20)
Me.CH_AUTO_DETECT_SITE.TabIndex = 1
Me.CH_AUTO_DETECT_SITE.Text = "Auto detect site"
Me.CH_AUTO_DETECT_SITE.UseVisualStyleBackColor = True
@@ -343,7 +349,8 @@
Me.TXT_LABELS.CaptionText = "Labels"
Me.TXT_LABELS.CaptionWidth = 50.0R
Me.TXT_LABELS.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_LABELS.Location = New System.Drawing.Point(4, 250)
Me.TXT_LABELS.Location = New System.Drawing.Point(4, 235)
Me.TXT_LABELS.Margin = New System.Windows.Forms.Padding(3, 2, 3, 3)
Me.TXT_LABELS.Name = "TXT_LABELS"
Me.TXT_LABELS.Size = New System.Drawing.Size(446, 22)
Me.TXT_LABELS.TabIndex = 8
@@ -358,13 +365,13 @@
TP_DOWN_OPTIONS.Controls.Add(Me.CH_DOWN_IMAGES, 0, 0)
TP_DOWN_OPTIONS.Controls.Add(Me.CH_DOWN_VIDEOS, 1, 0)
TP_DOWN_OPTIONS.Dock = System.Windows.Forms.DockStyle.Fill
TP_DOWN_OPTIONS.Location = New System.Drawing.Point(1, 152)
TP_DOWN_OPTIONS.Location = New System.Drawing.Point(1, 146)
TP_DOWN_OPTIONS.Margin = New System.Windows.Forms.Padding(0)
TP_DOWN_OPTIONS.Name = "TP_DOWN_OPTIONS"
TP_DOWN_OPTIONS.RowCount = 1
TP_DOWN_OPTIONS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
TP_DOWN_OPTIONS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
TP_DOWN_OPTIONS.Size = New System.Drawing.Size(452, 31)
TP_DOWN_OPTIONS.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27.0!))
TP_DOWN_OPTIONS.Size = New System.Drawing.Size(452, 28)
TP_DOWN_OPTIONS.TabIndex = 5
'
'CH_DOWN_IMAGES
@@ -373,7 +380,7 @@
Me.CH_DOWN_IMAGES.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_DOWN_IMAGES.Location = New System.Drawing.Point(4, 4)
Me.CH_DOWN_IMAGES.Name = "CH_DOWN_IMAGES"
Me.CH_DOWN_IMAGES.Size = New System.Drawing.Size(218, 23)
Me.CH_DOWN_IMAGES.Size = New System.Drawing.Size(218, 20)
Me.CH_DOWN_IMAGES.TabIndex = 0
Me.CH_DOWN_IMAGES.Text = "Download Images"
Me.CH_DOWN_IMAGES.UseVisualStyleBackColor = True
@@ -384,7 +391,7 @@
Me.CH_DOWN_VIDEOS.Dock = System.Windows.Forms.DockStyle.Fill
Me.CH_DOWN_VIDEOS.Location = New System.Drawing.Point(229, 4)
Me.CH_DOWN_VIDEOS.Name = "CH_DOWN_VIDEOS"
Me.CH_DOWN_VIDEOS.Size = New System.Drawing.Size(219, 23)
Me.CH_DOWN_VIDEOS.Size = New System.Drawing.Size(219, 20)
Me.CH_DOWN_VIDEOS.TabIndex = 1
Me.CH_DOWN_VIDEOS.Text = "Download videos"
Me.CH_DOWN_VIDEOS.UseVisualStyleBackColor = True
@@ -408,19 +415,45 @@
Me.TXT_SPEC_FOLDER.Size = New System.Drawing.Size(446, 22)
Me.TXT_SPEC_FOLDER.TabIndex = 2
'
'TXT_SCRIPT
'
ActionButton7.BackgroundImage = CType(resources.GetObject("ActionButton7.BackgroundImage"), System.Drawing.Image)
ActionButton7.Enabled = False
ActionButton7.Index = 0
ActionButton7.Name = "BTT_OPEN"
ActionButton8.BackgroundImage = CType(resources.GetObject("ActionButton8.BackgroundImage"), System.Drawing.Image)
ActionButton8.Enabled = False
ActionButton8.Index = 1
ActionButton8.Name = "BTT_CLEAR"
Me.TXT_SCRIPT.Buttons.Add(ActionButton7)
Me.TXT_SCRIPT.Buttons.Add(ActionButton8)
Me.TXT_SCRIPT.CaptionMode = PersonalUtilities.Forms.Controls.Base.ICaptionControl.Modes.CheckBox
Me.TXT_SCRIPT.CaptionText = "Script"
Me.TXT_SCRIPT.CaptionToolTipEnabled = True
Me.TXT_SCRIPT.CaptionToolTipText = "Execute script after downloading this user"
Me.TXT_SCRIPT.CaptionWidth = 65.0R
Me.TXT_SCRIPT.Dock = System.Windows.Forms.DockStyle.Fill
Me.TXT_SCRIPT.Location = New System.Drawing.Point(4, 262)
Me.TXT_SCRIPT.Margin = New System.Windows.Forms.Padding(3, 2, 3, 3)
Me.TXT_SCRIPT.Name = "TXT_SCRIPT"
Me.TXT_SCRIPT.PlaceholderEnabled = True
Me.TXT_SCRIPT.PlaceholderText = "Leave blank to use the default script..."
Me.TXT_SCRIPT.Size = New System.Drawing.Size(446, 22)
Me.TXT_SCRIPT.TabIndex = 9
'
'CONTAINER_MAIN
'
'
'CONTAINER_MAIN.ContentPanel
'
Me.CONTAINER_MAIN.ContentPanel.Controls.Add(TP_MAIN)
Me.CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(454, 431)
Me.CONTAINER_MAIN.ContentPanel.Size = New System.Drawing.Size(454, 461)
Me.CONTAINER_MAIN.Dock = System.Windows.Forms.DockStyle.Fill
Me.CONTAINER_MAIN.LeftToolStripPanelVisible = False
Me.CONTAINER_MAIN.Location = New System.Drawing.Point(0, 0)
Me.CONTAINER_MAIN.Name = "CONTAINER_MAIN"
Me.CONTAINER_MAIN.RightToolStripPanelVisible = False
Me.CONTAINER_MAIN.Size = New System.Drawing.Size(454, 431)
Me.CONTAINER_MAIN.Size = New System.Drawing.Size(454, 461)
Me.CONTAINER_MAIN.TabIndex = 0
Me.CONTAINER_MAIN.TopToolStripPanelVisible = False
'
@@ -428,15 +461,15 @@
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(454, 431)
Me.ClientSize = New System.Drawing.Size(454, 461)
Me.Controls.Add(Me.CONTAINER_MAIN)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.KeyPreview = True
Me.MaximizeBox = False
Me.MaximumSize = New System.Drawing.Size(470, 470)
Me.MaximumSize = New System.Drawing.Size(470, 500)
Me.MinimizeBox = False
Me.MinimumSize = New System.Drawing.Size(470, 470)
Me.MinimumSize = New System.Drawing.Size(470, 500)
Me.Name = "UserCreatorForm"
Me.ShowInTaskbar = False
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
@@ -458,6 +491,7 @@
TP_DOWN_OPTIONS.ResumeLayout(False)
TP_DOWN_OPTIONS.PerformLayout()
CType(Me.TXT_SPEC_FOLDER, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TXT_SCRIPT, System.ComponentModel.ISupportInitialize).EndInit()
Me.CONTAINER_MAIN.ContentPanel.ResumeLayout(False)
Me.CONTAINER_MAIN.ResumeLayout(False)
Me.CONTAINER_MAIN.PerformLayout()
@@ -483,5 +517,6 @@
Private WithEvents TXT_SPEC_FOLDER As PersonalUtilities.Forms.Controls.TextBoxExtended
Private WithEvents CMB_SITE As PersonalUtilities.Forms.Controls.ComboBoxExtended
Private WithEvents BTT_OTHER_SETTINGS As Button
Private WithEvents TXT_SCRIPT As PersonalUtilities.Forms.Controls.TextBoxExtended
End Class
End Namespace

View File

@@ -273,6 +273,25 @@
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
</value>
</data>
<data name="ActionButton7.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAR5JREFUOE+VkjFqwzAUhn2D9iShRyi+QhYbGujg3ZATZPKYdC6FQhPwlAMkg3dP
WQwhyWIyJIUW5NqyPb7oCVtIlhVTwYf8nv7/t2zJagel9KmqKsIACYL9RjI8UHz5zshougZr/AEvbxEP
aZCDBY3VslixaJvX3wzkkDiOwbZtDRGA5vdNAg+TL27qgmt5XkBG/gTdAG7Gt+3PP9oOaEGFCVEC6rp+
5g9MfM/c5e4OsEZMZkQEtGL5H2DdZ5JRArDwPA+iKII0TfkC9vroC9j5vq8JTWw3WzWgLMtZGIaa0MR8
vlAD8PYlSaIJTTiOowY0p0Bc19XEJo6HE59FAPuMzyAINKGJ1XLFZxHALtMrnkBXOIQIIIQ8YvF/KrgB
cMaRN0UdBBkAAAAASUVORK5CYII=
</value>
</data>
<data name="ActionButton8.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAIZJREFUOE+1j10KwCAMgz2b755xl/IsvnaL2K20UfbDAmEako+ZROSTafjE12Go
tbbB43rK5xSAQq1VYFtmeQBoqZTSreVZvgTknM8yyyjA/qodsDF9gspD2Bj6B+DH+NqzhQQAG+POMnSX
AFuc5QFgn6ClHh5iOQVAKNixyucB8NY0vG9JOzzyhrdq5IRgAAAAAElFTkSuQmCC
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@@ -15,6 +15,7 @@ Imports PersonalUtilities.Functions.RegularExpressions
Imports SCrawler.API.Base
Imports SCrawler.Plugin
Imports SCrawler.Plugin.Hosts
Imports ADB = PersonalUtilities.Forms.Controls.Base.ActionButton.DefaultButtons
Namespace Editors
Friend Class UserCreatorForm : Implements IOkCancelToolbar
Private ReadOnly MyDef As DefaultFormProps(Of FieldsChecker)
@@ -65,6 +66,16 @@ Namespace Editors
Return TXT_USER_FRIENDLY.Text
End Get
End Property
Friend ReadOnly Property ScriptUse As Boolean
Get
Return TXT_SCRIPT.Checked
End Get
End Property
Friend ReadOnly Property ScriptFile As SFile
Get
Return TXT_SCRIPT.Text
End Get
End Property
Friend Property MyExchangeOptions As Object = Nothing
Private ReadOnly _SpecPathPattern As RParams = RParams.DM("\w:\\.*", 0, EDP.ReturnValue)
Private ReadOnly Property SpecialPath(ByVal s As SettingsHost) As SFile
@@ -111,6 +122,7 @@ Namespace Editors
CH_TEMP.Checked = Settings.DefaultTemporary
CH_DOWN_IMAGES.Checked = Settings.DefaultDownloadImages
CH_DOWN_VIDEOS.Checked = Settings.DefaultDownloadVideos
TXT_SCRIPT.Checked = Settings.ScriptFile.Attribute
SetParamsBySite()
Else
TP_ADD_BY_LIST.Enabled = False
@@ -135,6 +147,8 @@ Namespace Editors
CH_READY_FOR_DOWN.Checked = .ReadyForDownload
CH_DOWN_IMAGES.Checked = .DownloadImages
CH_DOWN_VIDEOS.Checked = .DownloadVideos
TXT_SCRIPT.Checked = .ScriptUse
TXT_SCRIPT.Text = .ScriptFile
TXT_DESCR.Text = .Description
UserLabels.ListAddList(.Labels)
If UserLabels.ListExists Then TXT_LABELS.Text = UserLabels.ListToString
@@ -158,7 +172,13 @@ Namespace Editors
End Try
End Sub
Private Sub UserCreatorForm_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.F4 Then ChangeLabels() : e.Handled = True
Dim b As Boolean = True
Select Case e.KeyCode
Case Keys.F4 : ChangeLabels()
Case Keys.F2 : If BTT_OTHER_SETTINGS.Enabled Then BTT_OTHER_SETTINGS.PerformClick()
Case Else : b = False
End Select
If b Then e.Handled = True
End Sub
Private Sub UserCreatorForm_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
If Not BeforeCloseChecker(MyDef.ChangesDetected) Then
@@ -188,6 +208,14 @@ Namespace Editors
.UpdateUserFile()
End With
User = tmpUser
Dim ScriptText$ = TXT_SCRIPT.Text
If Not ScriptText.IsEmptyString Then
Dim f As SFile = ScriptText
If Not SFile.IsDirectory(ScriptText) And Not UserInstance Is Nothing Then
With DirectCast(UserInstance, UserDataBase) : f.Path = .MyFile.Path : End With
End If
TXT_SCRIPT.Text = f
End If
If Not UserInstance Is Nothing Then
With DirectCast(UserInstance, UserDataBase)
.User = User
@@ -208,12 +236,14 @@ Namespace Editors
.Labels.ListAddList(UserLabels, LAP.NotContainsOnly, LAP.ClearBeforeAdd)
End If
.ParseUserMediaOnly = CH_PARSE_USER_MEDIA.Checked
.ScriptUse = TXT_SCRIPT.Checked
.ScriptFile = TXT_SCRIPT.Text
.UpdateUserInformation()
End With
End If
GoTo CloseForm
Else
MsgBoxE("User site does not selected", MsgBoxStyle.Exclamation)
MsgBoxE("User site not selected", MsgBoxStyle.Exclamation)
End If
End If
Else
@@ -397,6 +427,7 @@ CloseForm:
.ReadyForDownload = CH_READY_FOR_DOWN.Checked
.DownloadImages = CH_DOWN_IMAGES.Checked
.DownloadVideos = CH_DOWN_VIDEOS.Checked
.ScriptUse = TXT_SCRIPT.Checked
.Labels.ListAddList(UserLabels)
.ParseUserMediaOnly = CH_PARSE_USER_MEDIA.Checked
If Not CH_AUTO_DETECT_SITE.Checked Then _
@@ -439,8 +470,8 @@ CloseForm:
End Function
Private Sub TXT_LABELS_ActionOnButtonClick(ByVal Sender As ActionButton) Handles TXT_LABELS.ActionOnButtonClick
Select Case Sender.DefaultButton
Case ActionButton.DefaultButtons.Open : ChangeLabels()
Case ActionButton.DefaultButtons.Clear : UserLabels.Clear()
Case ADB.Open : ChangeLabels()
Case ADB.Clear : UserLabels.Clear()
End Select
End Sub
Private Sub ChangeLabels()
@@ -456,5 +487,11 @@ CloseForm:
End If
End Using
End Sub
Private Sub TXT_SCRIPT_ActionOnButtonClick(ByVal Sender As ActionButton) Handles TXT_SCRIPT.ActionOnButtonClick
If Sender.DefaultButton = ADB.Open Then
Dim f As SFile = SFile.SelectFiles(TXT_SCRIPT.Text, False, "Select script file").FirstOrDefault
If Not f.IsEmptyString Then TXT_SCRIPT.Text = f
End If
End Sub
End Class
End Namespace

View File

@@ -86,6 +86,7 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
Me.BTT_CONTEXT_TEMP = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_CONTEXT_READY = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_CONTEXT_GROUPS = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_CONTEXT_SCRIPT = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_CONTEXT_ADD_TO_COL = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_CONTEXT_COL_MERGE = New System.Windows.Forms.ToolStripMenuItem()
Me.BTT_CONTEXT_CHANGE_FOLDER = New System.Windows.Forms.ToolStripMenuItem()
@@ -562,9 +563,9 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
'
'USER_CONTEXT
'
Me.USER_CONTEXT.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_CONTEXT_DOWN, Me.BTT_CONTEXT_DOWN_LIMITED, Me.BTT_CONTEXT_DOWN_DATE_LIMIT, Me.BTT_CONTEXT_EDIT, Me.BTT_CONTEXT_DELETE, CONTEXT_SEP_1, Me.BTT_CONTEXT_FAV, Me.BTT_CONTEXT_TEMP, Me.BTT_CONTEXT_READY, Me.BTT_CONTEXT_GROUPS, Me.BTT_CONTEXT_ADD_TO_COL, Me.BTT_CONTEXT_COL_MERGE, Me.BTT_CONTEXT_CHANGE_FOLDER, CONTEXT_SEP_2, Me.BTT_CHANGE_IMAGE, CONTEXT_SEP_3, Me.BTT_CONTEXT_OPEN_PATH, CONTEXT_SEP_4, Me.BTT_CONTEXT_OPEN_SITE, CONTEXT_SEP_5, Me.BTT_CONTEXT_INFO})
Me.USER_CONTEXT.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BTT_CONTEXT_DOWN, Me.BTT_CONTEXT_DOWN_LIMITED, Me.BTT_CONTEXT_DOWN_DATE_LIMIT, Me.BTT_CONTEXT_EDIT, Me.BTT_CONTEXT_DELETE, CONTEXT_SEP_1, Me.BTT_CONTEXT_FAV, Me.BTT_CONTEXT_TEMP, Me.BTT_CONTEXT_READY, Me.BTT_CONTEXT_GROUPS, Me.BTT_CONTEXT_SCRIPT, Me.BTT_CONTEXT_ADD_TO_COL, Me.BTT_CONTEXT_COL_MERGE, Me.BTT_CONTEXT_CHANGE_FOLDER, CONTEXT_SEP_2, Me.BTT_CHANGE_IMAGE, CONTEXT_SEP_3, Me.BTT_CONTEXT_OPEN_PATH, CONTEXT_SEP_4, Me.BTT_CONTEXT_OPEN_SITE, CONTEXT_SEP_5, Me.BTT_CONTEXT_INFO})
Me.USER_CONTEXT.Name = "USER_CONTEXT"
Me.USER_CONTEXT.Size = New System.Drawing.Size(222, 386)
Me.USER_CONTEXT.Size = New System.Drawing.Size(222, 430)
'
'BTT_CONTEXT_DOWN
'
@@ -629,6 +630,13 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
Me.BTT_CONTEXT_GROUPS.Size = New System.Drawing.Size(221, 22)
Me.BTT_CONTEXT_GROUPS.Text = "Change labels"
'
'BTT_CONTEXT_SCRIPT
'
Me.BTT_CONTEXT_SCRIPT.Image = Global.SCrawler.My.Resources.Resources.ScriptPic32
Me.BTT_CONTEXT_SCRIPT.Name = "BTT_CONTEXT_SCRIPT"
Me.BTT_CONTEXT_SCRIPT.Size = New System.Drawing.Size(221, 22)
Me.BTT_CONTEXT_SCRIPT.Text = "Change script usage"
'
'BTT_CONTEXT_ADD_TO_COL
'
Me.BTT_CONTEXT_ADD_TO_COL.Image = Global.SCrawler.My.Resources.Resources.DBPic_32
@@ -796,4 +804,5 @@ Partial Public Class MainFrame : Inherits System.Windows.Forms.Form
Private WithEvents BTT_DOWN_SITE As ToolStripMenuItem
Private WithEvents BTT_DOWN_ALL_FULL As ToolStripMenuItem
Private WithEvents BTT_DOWN_SITE_FULL As ToolStripMenuItem
Private WithEvents BTT_CONTEXT_SCRIPT As ToolStripMenuItem
End Class

View File

@@ -249,6 +249,8 @@ CloseResume:
.DownloadVideos = f.DownloadVideos
.FriendlyName = f.UserFriendly
.Description = f.UserDescr
.ScriptUse = f.ScriptUse
.ScriptFile = f.ScriptFile
If Not f.MyExchangeOptions Is Nothing Then DirectCast(.Self, UserDataBase).ExchangeOptionsSet(f.MyExchangeOptions)
.Self.Labels.ListAddList(f.UserLabels, LAP.ClearBeforeAdd, LAP.NotContainsOnly)
.UpdateUserInformation()
@@ -617,6 +619,31 @@ CloseResume:
ErrorsDescriber.Execute(EDP.ShowAllMsg, ex, "[ChangeUserGroups]")
End Try
End Sub
Private Sub BTT_CONTEXT_SCRIPT_Click(sender As Object, e As EventArgs) Handles BTT_CONTEXT_SCRIPT.Click
Try
Dim users As List(Of IUserData) = GetSelectedUserArray()
If users.ListExists Then
Dim ans% = MsgBoxE({"You want to change the script usage for selected users." & vbCr &
"Which script usage mode do you want to set?",
"Change script usage"}, vbExclamation,,, {"Use", "Do not use", "Cancel"})
If ans < 2 Then
Dim s As Boolean = IIf(ans = 0, True, False)
users.ForEach(Sub(ByVal u As IUserData)
Dim b As Boolean = u.ScriptUse = s
u.ScriptUse = s
If Not b Then u.UpdateUserInformation()
End Sub)
MsgBoxE($"Script mode was set to [{IIf(s, "Use", "Do not use")}] for all selected users")
Else
MsgBoxE("Operation canceled")
End If
Else
MsgBoxE("Users not selected", vbExclamation)
End If
Catch ex As Exception
ErrorsDescriber.Execute(EDP.LogMessageValue, ex, "Change script usage")
End Try
End Sub
Private Function AskForMassReplace(ByVal users As List(Of IUserData), ByVal param As String) As Boolean
Dim u$ = users.ListIfNothing.Take(20).Select(Function(uu) uu.Name).ListToString(, vbCr)
If Not u.IsEmptyString And users.ListExists(21) Then u &= vbCr & "..."

View File

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

View File

@@ -250,6 +250,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized resource of type System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property ScriptPic32() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("ScriptPic32", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Looks up a localized resource of type System.Drawing.Bitmap.
'''</summary>

View File

@@ -118,29 +118,29 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="DBPic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\DBPic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="StarPic_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\StarPic_24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PrevPIC2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\PrevPIC2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="StartPic_01_Green_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\StartPic_01_Green_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="TwitterPic400" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\TwitterPic400.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PencilPic_01_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\PencilPic_01_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="PicturePic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\PicturePic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NextPIC2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\NextPIC2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BookmarkBlack_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\BookmarkBlack_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Folder_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\Folder_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TwitterPic400" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\TwitterPic400.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="PencilPic_01_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\PencilPic_01_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PlusPIC" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\PlusPIC.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -148,6 +148,9 @@
<data name="TwitterIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Icons\TwitterIcon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SettingsPic_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\SettingsPic_16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\Delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -166,8 +169,8 @@
<data name="Refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\Refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PicturePic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\PicturePic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="HeartPic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\HeartPic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="RedditIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Icons\RedditIcon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -181,13 +184,13 @@
<data name="RedditPic512" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\RedditPic512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DBPic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\DBPic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="BookmarkBlack_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\BookmarkBlack_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SettingsPic_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\SettingsPic_16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="StartPic_01_Green_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\StartPic_01_Green_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="HeartPic_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\HeartPic_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ScriptPic32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Content\Pictures\ScriptPic32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -379,6 +379,7 @@
<None Include="Content\Pictures\InstagramPic76.png" />
<None Include="Content\Pictures\BookmarkBlack_16.png" />
<None Include="Content\Pictures\HeartPic_32.png" />
<None Include="Content\Pictures\ScriptPic32.png" />
<Content Include="ffmpeg.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@@ -97,6 +97,7 @@ Friend Class SettingsCLS : Implements IDisposable
FromChannelDownloadTopUse = New XMLValue(Of Boolean)("FromChannelDownloadTopUse", False, MyXML, n)
FromChannelCopyImageToUser = New XMLValue(Of Boolean)("FromChannelCopyImageToUser", True, MyXML, n)
UpdateUserDescriptionEveryTime = New XMLValue(Of Boolean)("UpdateUserDescriptionEveryTime", True, MyXML, n)
ScriptFile = New XMLValueAttribute(Of SFile, Boolean)("ScriptFile", "Use",,, MyXML, n)
n = {"Users", "FileName"}
MaxUsersJobsCount = New XMLValue(Of Integer)("MaxJobsCount", DefaultMaxDownloadingTasks, MyXML, n)
@@ -359,6 +360,7 @@ Friend Class SettingsCLS : Implements IDisposable
End Property
Friend ReadOnly Property MaxUsersJobsCount As XMLValue(Of Integer)
Friend ReadOnly Property ImgurClientID As XMLValue(Of String)
Friend ReadOnly Property ScriptFile As XMLValueAttribute(Of SFile, Boolean)
#Region "Defaults"
Friend ReadOnly Property DefaultTemporary As XMLValue(Of Boolean)
Friend ReadOnly Property DefaultDownloadImages As XMLValue(Of Boolean)