'Public Class Trash
'    Win32Defs.SendMessage(tbLog.Handle, WM.SETREDRAW, 1, 0)
'    Win32Defs.SendMessage(tbLog.Handle, WM.SETREDRAW, 0, 0) 'wParam false means not to redraw
'End Class

'Public Function GetGroupBoxTextColor() As Color
'    Const BP_GROUPBOX As Integer = 4
'    Const PBS_NORMAL As Integer = 1
'    Const TMT_TEXTCOLOR As Integer = 3803

'    Return GetThemeColorHelp(Handle, "BUTTON", BP_GROUPBOX, PBS_NORMAL, TMT_TEXTCOLOR, SystemColors.ControlText)
'End Function

'Public MustInherit Class DirectorySetting
'    Public MustOverride Property PathValue() As String

'    Public Sub New(ByVal name As String, ByVal DefaultValue As String)
'        NameValue = name
'        DefaultValueValue = DefaultValue
'    End Sub

'    Private NameValue As String

'    Public ReadOnly Property Name() As String
'        Get
'            Return NameValue
'        End Get
'    End Property

'    Private DefaultValueValue As String

'    Public ReadOnly Property DefaultValue() As String
'        Get
'            Return DefaultValueValue
'        End Get
'    End Property

'    Public Property Path() As String
'        Get
'            Dim value As String = PathValue

'        End Get
'        Set(ByVal Value As String)

'        End Set
'    End Property

'    Private Function GetSolvedPathValue() As String
'        Dim ret As String = PathValue
'        Dim d As Dictionary(Of String, String) = GetMacros()

'        For Each i As String In d.Keys
'            If ret Then
'        Next
'    End Function

'    Private Function GetMacros() As Dictionary(Of String, String)
'        Dim ret As New Dictionary(Of String, String)

'        ret("%startup_dir%") = CommonDirs.Startup
'        ret("%app_data_dir%") = CommonDirs.ApplicationData

'        Return ret
'    End Function
'End Class

'Public Class RegistryDirectorySetting
'    Inherits DirectorySetting

'    Private RegKey As RegKey
'    Private valueName As String

'    Public Sub New(ByVal name As String, ByVal DefaultValue As String, ByVal regKey As RegKey, ByVal valueName As String)
'        MyBase.New(name, DefaultValue)
'        Me.RegKey = regKey
'    End Sub

'    Public Overrides Property PathValue() As String
'        Get
'            Dim ret As String = RegKey.GetString(valueName)

'            If ret Is Nothing Then

'            End If
'            Return
'        End Get
'        Set(ByVal value As String)
'            RegKey.SetValue(valueName, value)
'        End Set
'    End Property
'End Class

'        If StringHelp.ContainsValue(s.ProxyDomain.Value, s.ProxyPort.Value.ToString) Then
'            WebClient.Proxy = New WebProxy("http://" + s.ProxyDomain.Value + ":" + s.ProxyPort.Value.ToString + "/", True)
'        End If

'        If StringHelp.ContainsValue(s.ProxyUsername.Value, s.ProxyPassword.Value, s.ProxyDomain.Value) Then
'Dim nn As NetworkCredential = New NetworkCredential(s.ProxyUsername.Value, s.ProxyPassword.Value, s.ProxyDomain.Value)
'Dim cc As CredentialCache = New CredentialCache
'            cc.Add(New Uri(package.DownLoadURL), "Basic", nn)
'            WebClient.Credentials = cc
'        End If

'Public Class MenuUtil
'    Public Shared Function GetIndexOfCheckedRadioSubItem(ByVal m As Menu) As Integer
'        For Each i As MenuItem In m.MenuItems
'            If i.Checked AndAlso i.RadioCheck Then
'                Return i.Index
'            End If
'        Next
'    End Function

'    Public Shared Function GetItems(ByVal m As Menu) As ArrayList
'        Dim items As New ArrayList

'        AddItemsRecursive(m, items)

'        Return items
'    End Function

'    Private Shared Sub AddItemsRecursive(ByVal m As Menu, ByVal items As ArrayList)
'        For Each i As MenuItem In m.MenuItems
'            items.Add(i)
'            AddItemsRecursive(i, items)
'        Next
'    End Sub
'End Class

'f.Document.WriteRawElement("p", "&nbsp;")
'f.Document.WriteRawElement("h2", "Related Topics")
'f.Document.WriteRawElement("p", "<a href=""projects.htm"">Projects</a>")

'Private Sub bWhatsThis_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bWhatsThis.Click
'    NativeFunctions.PostMessage(Handle, WM.SYSCOMMAND, New IntPtr(SC.CONTEXTHELP), IntPtr.Zero)
'End Sub

'Public Sub ExtractSubtitles()
'    If Not p.AutoExtractSubtitles Then Exit Sub
'    Dim ifoPath As String = StringHelp.DeleteRight(p.SourceFile, 5) + "0.ifo"
'    If Not File.Exists(ifoPath) Then Exit Sub

'    If p.SourceFile.Contains("_PGC_") Then
'        Dim args As New StringBuilder
'        args.Append(ifoPath)
'        args.Append(Filepath.GetDir(ifoPath))
'        args.Append(Regex.Match(p.SourceFile, "_PGC_(\d\d)").Groups(1).Value)
'    Else

'    End If
'End Sub

'Public Enum PARMode
'    <PAR("00:00"), Name("Not Signaled")> NotSignaled
'    <PAR("12:11"), Name("4:3 PAL")> PAL4_3
'    <PAR("64:60"), Name("4:3 PAL (no ITU)")> PAL4_3NoITU
'    <PAR("10:11"), Name("4:3 NTSC")> NTSC4_3
'    <PAR("64:72"), Name("4:3 NTSC (no ITU)")> NTSC4_3NoITU
'    <PAR("16:11"), Name("16:9 PAL")> PAL16_9
'    <PAR("64:45"), Name("16:9 PAL (no ITU)")> PAL16_9NoITU
'    <PAR("40:33"), Name("16:9 NTSC")> NTSC16_9
'    <PAR("64:54"), Name("16:9 NTSC (no ITU)")> NTSC16_9NoITU
'End Enum

'Public Class PARAttribute
'    Inherits NameAttribute

'    Public Sub New(ByVal value As String)
'        MyBase.New(value)
'    End Sub
'End Class