diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..8abd12e
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+Metropolis_Launcher/moby.db filter=lfs diff=lfs merge=lfs -text
+Metropolis_Launcher/rombase.db filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d84595b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+.vs/**/*
+Metropolis_Launcher/bin/**/*
+Metropolis_Launcher/obj/**/*
+Metropolis_Launcher/Metropolis_Launcher.vbproj.user
\ No newline at end of file
diff --git a/COMPILING.md b/COMPILING.md
new file mode 100644
index 0000000..c67655e
--- /dev/null
+++ b/COMPILING.md
@@ -0,0 +1,9 @@
+# Compiling Metropolis Launcher
+
+You need Visual Studio 2015 or higher (VS14) as well as DevExpress 15.2 (both commercial products *duh*) in order to compile Metropolis Launcher from source.
+
+Anything else is provided in the project on this github.
+
+# Target CPU
+
+Currently, only x86 is supported, you should switch from "Any CPU" to the "x86" profile when compiling.
\ No newline at end of file
diff --git a/Metropolis_Launcher.sln b/Metropolis_Launcher.sln
new file mode 100644
index 0000000..475ed15
--- /dev/null
+++ b/Metropolis_Launcher.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25123.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Metropolis_Launcher", "Metropolis_Launcher\Metropolis_Launcher.vbproj", "{FAFBA71A-26CF-4A0D-B880-F467C92BF104}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ DebugTEST|Any CPU = DebugTEST|Any CPU
+ DebugTEST|x64 = DebugTEST|x64
+ DebugTEST|x86 = DebugTEST|x86
+ PreRelease|Any CPU = PreRelease|Any CPU
+ PreRelease|x64 = PreRelease|x64
+ PreRelease|x86 = PreRelease|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Debug|Any CPU.Build.0 = Debug|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Debug|x64.ActiveCfg = Debug|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Debug|x64.Build.0 = Debug|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Debug|x86.ActiveCfg = Debug|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Debug|x86.Build.0 = Debug|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.DebugTEST|Any CPU.ActiveCfg = DebugTEST|Any CPU
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.DebugTEST|Any CPU.Build.0 = DebugTEST|Any CPU
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.DebugTEST|x64.ActiveCfg = DebugTEST|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.DebugTEST|x64.Build.0 = DebugTEST|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.DebugTEST|x86.ActiveCfg = DebugTEST|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.DebugTEST|x86.Build.0 = DebugTEST|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.PreRelease|Any CPU.ActiveCfg = PreRelease|Any CPU
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.PreRelease|Any CPU.Build.0 = PreRelease|Any CPU
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.PreRelease|x64.ActiveCfg = PreRelease|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.PreRelease|x64.Build.0 = PreRelease|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.PreRelease|x86.ActiveCfg = PreRelease|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.PreRelease|x86.Build.0 = PreRelease|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Release|Any CPU.ActiveCfg = Release|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Release|x64.ActiveCfg = Release|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Release|x64.Build.0 = Release|x64
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Release|x86.ActiveCfg = Release|x86
+ {FAFBA71A-26CF-4A0D-B880-F467C92BF104}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Metropolis_Launcher/App.config b/Metropolis_Launcher/App.config
new file mode 100644
index 0000000..3d2e627
--- /dev/null
+++ b/Metropolis_Launcher/App.config
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Metropolis_Launcher/Classes/cls_3IntVec.vb b/Metropolis_Launcher/Classes/cls_3IntVec.vb
new file mode 100644
index 0000000..e824bfe
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_3IntVec.vb
@@ -0,0 +1,17 @@
+Public Class cls_3IntVec
+ Public _x As Integer
+ Public _y As Integer
+ Public _z As Integer
+
+ Public Sub New(Optional ByVal x As Integer = 0, Optional ByVal y As Integer = 0, Optional ByVal z As Integer = 0)
+ Me._x = x
+ Me._y = y
+ Me._z = z
+ End Sub
+
+ Public Sub Add(ByVal vec As cls_3IntVec)
+ Me._x += vec._x
+ Me._y += vec._y
+ Me._z += vec._z
+ End Sub
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_3ObjVec.vb b/Metropolis_Launcher/Classes/cls_3ObjVec.vb
new file mode 100644
index 0000000..b2c4384
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_3ObjVec.vb
@@ -0,0 +1,11 @@
+Public Class cls_3ObjVec
+ Public _x As Object
+ Public _y As Object
+ Public _z As Object
+
+ Public Sub New(Optional ByVal x As Object = Nothing, Optional ByVal y As Object = Nothing, Optional ByVal z As Object = Nothing)
+ Me._x = x
+ Me._y = y
+ Me._z = z
+ End Sub
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_AddGameStats.vb b/Metropolis_Launcher/Classes/cls_AddGameStats.vb
new file mode 100644
index 0000000..24095ba
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_AddGameStats.vb
@@ -0,0 +1,23 @@
+Public Class cls_AddGameStats
+ Public _new As Integer
+ Public _links As Integer
+ Public _duplicates_added As Integer
+ Public _duplicates_replaced As Integer
+ Public _duplicates_ignored As Integer
+
+ Public Sub New(Optional ByVal [new] As Integer = 0, Optional ByVal links As Integer = 0, Optional ByVal duplicates_added As Integer = 0, Optional ByVal duplicates_replaced As Integer = 0, Optional ByVal duplicates_ignored As Integer = 0)
+ Me._new = [new]
+ Me._links = [links]
+ Me._duplicates_added = duplicates_added
+ Me._duplicates_replaced = duplicates_replaced
+ Me._duplicates_ignored = duplicates_ignored
+ End Sub
+
+ Public Sub Add(ByVal addGameStats As cls_AddGameStats)
+ Me._new += addGameStats._new
+ Me._links += addGameStats._links
+ Me._duplicates_added += addGameStats._duplicates_added
+ Me._duplicates_replaced += addGameStats._duplicates_replaced
+ Me._duplicates_ignored += addGameStats._duplicates_ignored
+ End Sub
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_Extras.vb b/Metropolis_Launcher/Classes/cls_Extras.vb
new file mode 100644
index 0000000..233d673
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_Extras.vb
@@ -0,0 +1,215 @@
+Public Class cls_Extras
+ Public Class cls_Extras_Result
+ Public _Path As String = ""
+ Public _ExtraNum As Integer = 0
+ Public _NoExtraFound As Boolean = True
+ Public _ExtraType As Object = Nothing
+
+ Public Sub New(ByVal Path As String, ByVal ExtraNum As Integer, ByVal NoExtraFound As Boolean, ByVal ExtraType As Object)
+ _Path = Path
+ _ExtraNum = ExtraNum
+ _NoExtraFound = NoExtraFound
+ _ExtraType = ExtraType
+ End Sub
+ End Class
+
+ Public Shared _SupportedExtensions As String() = {".png", ".jpg", ".bmp"}
+ Public Shared _SupportedExtensions_Masks As String() = {"*.png", "*.jpg", "*.bmp"}
+
+ Public Shared Function FindNextExtraFromSupportedExtensions(ByVal PathWithoutExtension) As String
+ For Each ext As String In _SupportedExtensions
+ If Alphaleonis.Win32.Filesystem.File.Exists(PathWithoutExtension & ext) Then
+ Return PathWithoutExtension & ext
+ End If
+ Next
+
+ Return ""
+ End Function
+
+ Public Shared Function getExtraSuffix(ExtraNum) As String
+ If ExtraNum = 0 Then
+ Return ""
+ Else
+ Return "_" & ExtraNum.ToString.PadLeft(3, "0")
+ End If
+ End Function
+
+ Public Shared Function FindNextExtra(ByVal id_Emu_Games As Integer, ByVal ExtraNum As Integer, ByVal SkipToNextImmediately As Boolean, ByVal ExtraType As Object, Optional ByVal IgnoreHiddenExtraCategories As Boolean = False, Optional ByVal LimitToExtraType As Boolean = False) As cls_Extras_Result
+ Dim dt_Emu_Games As New DS_ML.src_ucr_Emulation_GamesDataTable
+
+ Using tran As SQLite.SQLiteTransaction = cls_Globals.Conn.BeginTransaction
+ DS_ML.Fill_src_ucr_Emulation_Games(tran, dt_Emu_Games, Nothing, Nothing, Nothing, id_Emu_Games)
+ End Using
+
+ If dt_Emu_Games.Rows.Count <> 1 Then Return New cls_Extras_Result("", 0, True, Nothing)
+ Dim row_Emu_Games As DataRow = dt_Emu_Games.Rows(0)
+
+ Dim Platform_Short As String = TC.NZ(row_Emu_Games("Platform_Short"), "")
+ Dim id_Moby_Platforms As Integer = row_Emu_Games("id_Moby_Platforms")
+ Dim Game As String = TC.NZ(row_Emu_Games("Game"), "")
+
+ Dim FileName As String = ""
+ If TC.NZ(row_Emu_Games("InnerFile"), "") <> "" Then
+ FileName = row_Emu_Games("InnerFile")
+ Else
+ FileName = row_Emu_Games("File")
+ End If
+
+ Return FindNextExtra(Platform_Short, id_Moby_Platforms, Game, FileName, ExtraNum, SkipToNextImmediately, ExtraType, IgnoreHiddenExtraCategories, LimitToExtraType)
+ End Function
+
+ Public Shared Function FindNextExtra(ByVal Platform_Short As String, ByVal id_Moby_Platforms As Integer, ByVal Game As String, ByVal FileName As String, ByVal ExtraNum As Integer, ByVal SkipToNextImmediately As Boolean, ByVal ExtraType As Object, Optional ByVal IgnoreHiddenExtraCategories As Boolean = False, Optional ByVal LimitToExtraType As Boolean = False) As cls_Extras_Result
+ If TC.NZ(ExtraType, "").Length = 0 Then Return New cls_Extras_Result("", 0, True, Nothing)
+
+ If SkipToNextImmediately Then
+ ExtraNum = ExtraNum + 1
+ End If
+
+ Dim bDone As Boolean = False
+ Dim iNext As Integer = 0
+
+ Dim sPlatform As String = Platform_Short
+ Dim sRom As String = ""
+
+ Dim NoExtraFound As Boolean = False
+
+ Select Case TC.NZ(id_Moby_Platforms, 0)
+ Case cls_Globals.enm_Moby_Platforms.win
+ sRom = GetExtraFilename(Game, FileName)
+ Case Else
+ sRom = Alphaleonis.Win32.Filesystem.Path.GetFileNameWithoutExtension(TC.NZ(FileName, ""))
+ End Select
+
+ Dim sNextExtra As String = ""
+
+ While Not bDone AndAlso iNext < 2
+ Dim sFileName As String = FindNextExtraFromSupportedExtensions(cls_Globals.Dir_Extras & "\emulation\" & sPlatform & "\" & ExtraType & "\" & sRom & getExtraSuffix(ExtraNum)) 'IIf(ExtraNum = 0, "", " [image" & (ExtraNum + 1) & "]")
+
+ If Alphaleonis.Win32.Filesystem.File.Exists(sFileName) Then
+ sNextExtra = sFileName
+ bDone = True
+ Else
+ If Not LimitToExtraType Then
+ ExtraType = DataAccess.FireProcedureReturnScalar(cls_Globals.Conn, 0, "SELECT Name FROM tbl_Emu_Extras WHERE Sort = (SELECT MIN(Sort) FROM tbl_Emu_Extras WHERE" & IIf(IgnoreHiddenExtraCategories, "", " IFNULL(Hide, 0) = 0 AND ") & " Sort > (SELECT Sort FROM tbl_Emu_Extras WHERE Name = '" & ExtraType & "')) LIMIT 1")
+ Else
+ iNext = iNext + 1
+ End If
+ ExtraNum = 0
+
+ If TC.NZ(ExtraType, "").Length = 0 Then
+ ExtraType = DataAccess.FireProcedureReturnScalar(cls_Globals.Conn, 0, "SELECT Name FROM tbl_Emu_Extras WHERE Sort = (SELECT MIN(Sort) from tbl_Emu_Extras " & IIf(IgnoreHiddenExtraCategories, "", "WHERE IFNULL(Hide, 0) = 0") & ") LIMIT 1")
+ iNext = iNext + 1
+ End If
+ End If
+ End While
+
+ If iNext = 2 Then
+ NoExtraFound = True
+ End If
+
+ Return New cls_Extras_Result(sNextExtra, ExtraNum, NoExtraFound, ExtraType)
+ End Function
+
+ '''
+ ''' Find all Extras according to FileName
+ '''
+ '''
+ '''
+ '''
+ '''
+ ''' ArrayList of cls_Extras_Result
+ Public Shared Function FindAllExtras(ByVal Platform_Short As String, ByVal id_Moby_Platforms As Integer, ByVal Game As String, ByVal FileName As String) As ArrayList
+ Dim Result As New ArrayList
+
+ Dim bDone As Boolean = False
+
+ Dim ExtraType As Object = DataAccess.FireProcedureReturnScalar(cls_Globals.Conn, 0, "SELECT Name FROM tbl_Emu_Extras WHERE Sort = (SELECT MIN(Sort) from tbl_Emu_Extras LIMIT 1)")
+
+ Dim ExtraNum As Integer = 0
+
+ Dim bFirst As Boolean = True
+
+ While Not bDone
+ Dim res As cls_Extras_Result = FindNextExtra(Platform_Short, id_Moby_Platforms, Game, FileName, ExtraNum, Not bFirst, ExtraType, True)
+
+ If bFirst Then bFirst = False
+
+ If res._NoExtraFound Then
+ bDone = True
+ Exit While
+ Else
+ If Not ExtrasListContains(Result, res) Then
+ Result.Add(res)
+ Else
+ bDone = True
+ Exit While
+ End If
+ End If
+
+ ExtraNum = res._ExtraNum
+ ExtraType = res._ExtraType
+ End While
+
+ Return Result
+ End Function
+
+ Public Shared Function ExtrasListContains(ByRef ExtrasList As ArrayList, ByRef Extra As cls_Extras_Result) As Boolean
+ For Each item As cls_Extras_Result In ExtrasList
+ If item._Path.ToLower = Extra._Path.ToLower Then
+ Return True
+ End If
+ Next
+
+ Return False
+ End Function
+
+ Public Shared Function ExtrasListsEqual(ByRef ExtrasList1 As ArrayList, ByRef ExtrasList2 As ArrayList) As Boolean
+ If ExtrasList1.Count <> ExtrasList2.Count Then Return False
+
+ For Each item As cls_Extras_Result In ExtrasList1
+ If Not ExtrasListContains(ExtrasList2, item) Then Return False
+ Next
+
+ Return True
+ End Function
+
+ '''
+ ''' Get the next free extra filename without extension (for later save)
+ '''
+ ''' The short name for the platform, e.g. snes, gen, win etc.
+ ''' The extra category
+ ''' The ROM filename without its extension
+ '''
+ '''
+ Public Shared Function FindNextFreeExtraFilename(ByVal Platform_Short As String, ByVal ExtraCategory As String, ByVal FileName As String) As String
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(cls_Globals.Dir_Extras & "\emulation\" & Platform_Short & "\" & ExtraCategory) Then
+ Try
+ Alphaleonis.Win32.Filesystem.Directory.CreateDirectory(cls_Globals.Dir_Extras & "\emulation\" & Platform_Short & "\" & ExtraCategory)
+ Catch ex As Exception
+ Return ""
+ End Try
+ End If
+
+ Dim ExtraNum As Integer = 0
+
+ Dim bDone As Boolean = False
+
+ While Not bDone
+ If Alphaleonis.Win32.Filesystem.File.Exists(FindNextExtraFromSupportedExtensions(cls_Globals.Dir_Extras & "\emulation\" & Platform_Short & "\" & ExtraCategory & "\" & FileName & getExtraSuffix(ExtraNum))) Then 'IIf(ExtraNum = 0, "", " [image" & (ExtraNum + 1) & "]")
+ ExtraNum += 1
+ Else
+ bDone = True
+ End If
+ End While
+
+ Return FileName & getExtraSuffix(ExtraNum) ' IIf(ExtraNum = 0, "", " [image" & (ExtraNum + 1) & "]")
+ End Function
+
+ Public Shared Function GetExtraFilename(ByVal Game As String, ByVal FileName As String) As String
+ If Game.ToLower = FileName.ToLower Then
+ Return Alphaleonis.Win32.Filesystem.Path.GetFileNameWithoutExtension(MKNetLib.cls_MKStringSupport.GetCleanFileName(TC.NZ(Game, "")))
+ Else
+ Return MKNetLib.cls_MKStringSupport.GetCleanFileName(TC.NZ(Game, ""))
+ End If
+ End Function
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_FilteringModel_Emulation_Games.vb b/Metropolis_Launcher/Classes/cls_FilteringModel_Emulation_Games.vb
new file mode 100644
index 0000000..e020538
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_FilteringModel_Emulation_Games.vb
@@ -0,0 +1,89 @@
+Imports DevExpress.Utils.Filtering
+Imports System.ComponentModel.DataAnnotations
+
+Public Class cls_FilteringModel_Emulation_Games
+
+ Public Property Rank As Int32
+
+
+ Public Property Score As Decimal
+
+
+ Public Property Year As String
+
+
+ Public Property Favourite As Boolean
+
+
+ Public Property Platform As String
+
+
+ Public Property Age_Pessimistic As Int32
+
+
+ Public Property Age_Optimistic As Int32
+
+
+ Public Property Basic_Genres As String
+
+
+ Public Property Perspectives As String
+
+
+ Public Property Sports_Themes As String
+
+
+ Public Property Educational_Categories As String
+
+
+ Public Property Visual_Presentation As String
+
+
+ Public Property Pacing As String
+
+
+ Public Property Gameplay As String
+
+
+ Public Property Interface_Control As String
+
+
+ Public Property Vehicular_Themes As String
+
+
+ Public Property Setting As String
+
+
+ Public Property Narrative_Theme_Topic As String
+
+
+ Public Property DLC_Addon As String
+
+
+ Public Property Special_Edition As String
+
+
+ Public Property Other_Attributes As String
+
+
+ Public Property MinPlayers As Int32
+
+
+ Public Property MaxPlayers As Int32
+
+
+ Public Property Rating As Int32
+
+
+ Public Property Regions As String
+
+
+ Public Property Languages As String
+
+
+ Public Property MP_GameModes As String
+
+
+ Public Property MP_Options As String
+
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_Globals.vb b/Metropolis_Launcher/Classes/cls_Globals.vb
new file mode 100644
index 0000000..5e52ec8
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_Globals.vb
@@ -0,0 +1,245 @@
+Public Class cls_Globals
+ Public Shared Suppress_MetroUINavigationBarsShowing As Boolean = False
+ Public Shared Conn As SQLite.SQLiteConnection
+ Public Shared ISO_8859_1_Replace As New MKNetLib.cls_MKISO_8859_1_Replace
+ 'Public Shared DataDir As String = "g:\Frontends\MetropolisLauncher\"
+ Public Shared Dir_Extras As String = Application.StartupPath & "\extras"
+ Public Shared Dir_Screenshot As String = ""
+
+ Public Shared MLSettingHandler As New cls_PDSettingHandler(Nothing)
+
+ Public Shared StartupTime As DateTime = DateTime.Now
+
+ Public Shared MultiUserMode As Boolean = False
+ Public Shared Admin As Boolean = True
+ Public Shared Restricted As Boolean = False
+ Public Shared id_Users As Integer = 0
+
+ Public Shared Logging As Boolean = False
+ Public Shared Logfile As String = ""
+
+ Public Shared Function GetLogfile() As String
+ If Alphaleonis.Win32.Filesystem.File.Exists(Logfile) Then
+ Return Logfile
+ Else
+ Logfile = System.Windows.Forms.Application.StartupPath & "\" & "ml.log"
+ Return Logfile
+ End If
+ End Function
+
+ Public Shared Sub AddLog(ByVal text As String, Optional ByVal Timestamp As Boolean = True, Optional ByVal Endline As Boolean = True)
+ If Not Logging Then Return
+
+ MKNetLib.cls_MKFileSupport.SaveTextToFile(IIf(Timestamp, DateTime.Now.ToString("yyyyMMdd HHmmss") & " ", "") & text & IIf(Endline, ControlChars.CrLf, ""), GetLogfile)
+ End Sub
+
+ Public Shared Function Encode_Password(ByVal Password As String) As String
+ If Password IsNot Nothing Then
+ Return MKNetLib.cls_MKCryptography.Get_MD5("ML4EVAR" & Password & "RAVE4LM")
+ Else
+ Return Nothing
+ End If
+ End Function
+
+ 'id_Moby_Platforms of tbl_Moby_Platforms
+ Public Enum enm_Moby_Platforms
+ mame = -2
+ ALL = -1
+ linux = 1
+ dos = 2
+ win = 3
+ pcboot = 4
+ win3x = 5
+ ps1 = 6
+ ps2 = 7
+ dc = 8
+ n64 = 9
+ gb = 10
+ gbc = 11
+ gba = 12
+ xbox = 13
+ gc = 14
+ snes = 15
+ gen = 16
+ jag = 17
+ lynx = 18
+ amiga = 19
+ scd = 20
+ _32x = 21
+ nes = 22
+ sat = 23
+ st = 24
+ gg = 25
+ sms = 26
+ c64 = 27
+ a26 = 28
+ cv = 29
+ iv = 30
+ aii = 31
+ ngage = 32
+ a52 = 33
+ a78 = 34
+ _3do = 35
+ ng = 36
+ vec = 37
+ vb = 38
+ a8bit = 39
+ tgfx = 40
+ zxspec = 41
+ vsmile = 42
+ vic20 = 43
+ nds = 44
+ tgfxcd = 45
+ psp = 46
+ ti994a = 47
+ ws = 48
+ wsc = 49
+ gamecom = 50
+ a2gs = 51
+ ngp = 52
+ ngpc = 53
+ ngcd = 54
+ giz = 55
+ cd32 = 56
+ msx = 57
+ trs80 = 58
+ pcfx = 59
+ cpc = 60
+ c128 = 61
+ coco = 62
+ brew = 63
+ j2me = 64
+ palm = 65
+ winmob = 66
+ symbian = 67
+ zod = 68
+ x360 = 69
+ exen = 70
+ mophun = 71
+ doja = 72
+ cdi = 73
+ mac = 74
+ ody = 75
+ chanf = 76
+ cbmpet = 77
+ ody2 = 78
+ dragon = 79
+ ipod = 80
+ ps3 = 81
+ wii = 82
+ cdtv = 83
+ browser = 84
+ spectravid = 85
+ iphone = 86
+ dsi = 87
+ zeebo = 88
+ ngage2 = 89
+ bb = 90
+ android = 91
+ bbc = 92
+ electron = 93
+ pc88 = 94
+ pc98 = 95
+ ipad = 96
+ mv = 97
+ winphone = 98
+ bada = 99
+ webos = 100
+ _3ds = 101
+ fmtowns = 102
+ pico = 103
+ gw = 104
+ vita = 105
+ x68k = 106
+ playdia = 107
+ gp32 = 108
+ sv = 109
+ superacan = 110
+ oric = 111
+ pippin = 112
+ rca = 113
+ sg1000 = 114
+ c16 = 115
+ nuon = 116
+ acorn = 117
+ zx80 = 118
+ zx81 = 119
+ samcoupe = 120
+ sharpx1 = 121
+ gp2x = 122
+ wiz = 123
+ loopy = 124
+ pv1000 = 125
+ fm7 = 126
+ sgfx = 127
+ g7400 = 128
+ atom = 129
+ _to = 130
+ ql = 131
+ wiiu = 132
+ End Enum
+
+ Public Enum enm_Rombase_DOSBox_Filetypes
+ zip = 1
+ cwd = 2
+ exe = 3
+ iso = 4
+ img = 5
+ img_boot = 6
+ int = 7
+ End Enum
+
+ Public Enum enm_Rombase_DOSBox_Exe_Types
+ inst = 1
+ main = 2
+ setup = 3
+ ignore = 4
+ End Enum
+
+ 'id_Moby_Genres_Categories of tbl_Moby_Genres_Categories
+ Public Enum enm_Moby_Genres_Categories
+ Basic_Genres = 1
+ Perspective = 2
+ Visual_Presentation = 3
+ Pacing = 4
+ Gameplay = 5
+ Interface_Control = 6
+ Sports_Themes = 7
+ Educational_Categories = 8
+ Vehicular_Themes = 9
+ Setting = 10
+ Narrative_Theme_Topic = 11
+ DLC_Addon = 12
+ Special_Edition = 13
+ Other_Attributes = 14
+ End Enum
+
+ Public Shared Function TempDir(tran As SQLite.SQLiteTransaction) As String
+ Dim sTempDir As String = TC.NZ(cls_Settings.GetSetting("Dir_Temp", tran:=tran), "")
+
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(sTempDir) Then
+ sTempDir = Application.StartupPath & "\temp"
+ End If
+
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(sTempDir) Then
+ sTempDir = Alphaleonis.Win32.Filesystem.Path.GetTempPath
+ End If
+
+ MKNetLib.cls_MKFileSupport.TempDirRoot = sTempDir
+ Return sTempDir
+ End Function
+
+ Public Shared Function BackupsDir(tran As SQLite.SQLiteTransaction) As String
+ Dim sBackupDir As String = TC.NZ(cls_Settings.GetSetting("Dir_Backup", tran:=tran), "")
+
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(sBackupDir) Then
+ sBackupDir = Application.StartupPath & "\backups"
+ End If
+
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(sBackupDir) Then
+ sBackupDir = ""
+ End If
+
+ Return sBackupDir
+ End Function
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_PDSettingHandler.vb b/Metropolis_Launcher/Classes/cls_PDSettingHandler.vb
new file mode 100644
index 0000000..6772300
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_PDSettingHandler.vb
@@ -0,0 +1,155 @@
+Public Class cls_PDSettingHandler
+ Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXGrid)
+ Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXSplitter)
+ Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXSplitPanel)
+
+ Private _cnn As SqlClient.SqlConnection
+
+ Public Shared MainScreen As Screen = Screen.PrimaryScreen 'Aktuell zu verwendender Hauptbildschirm (auf dem neue Fenster zentriert geöffnet werden sollen), wird von frm_Main festgesetzt bei LocationChanged
+
+#Region "MKDXGrid"
+ Private Function SaveSettingsDDDataGridView(ByVal grd As MKNetDXLib.ctl_MKDXGrid) As Boolean Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXGrid).SaveSettings
+ Try
+ If cls_Globals.Conn IsNot Nothing Then
+ Dim sIdent As String = grd.Ident
+ If grd.MainView IsNot Nothing Then
+ Dim sSetting As Object = MKNetDXLib.cls_MKDXGrid_Serializer.SaveLayoutBase64(grd.MainView, MKNetDXLib.enm_MKDXGrid_Serialize_Options.Columns)
+ If sSetting IsNot Nothing Then
+ Using tran As SQLite.SQLiteTransaction = cls_Globals.Conn.BeginTransaction
+ DS_ML.Upsert_tbl_ControlSettings(tran, sIdent, "GridLayout", sSetting)
+ tran.Commit()
+ End Using
+
+
+ Return True
+ End If
+ End If
+ End If
+ Catch ex As Exception
+
+ End Try
+
+ Return False
+ End Function
+
+ Private Function LoadSettingsDDDataGridView(ByVal grd As MKNetDXLib.ctl_MKDXGrid) As Boolean Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXGrid).LoadSettings
+ Try
+ If cls_Globals.Conn IsNot Nothing Then
+ Dim sIdent As String = grd.Ident
+ If grd.MainView IsNot Nothing Then
+ Dim sSetting As Object = MKNetLib.cls_MKSQLiteDataAccess.FireProcedureReturnScalar(cls_Globals.Conn, 0, "SELECT Setting FROM tbl_ControlSettings WHERE HostName = " & TC.getSQLFormat(System.Environment.MachineName) & " AND ControlID = " & TC.getSQLFormat(sIdent) & " AND " & " SettingID = " & TC.getSQLFormat("GridLayout") & IIf(cls_Globals.MultiUserMode AndAlso Not cls_Globals.Admin AndAlso cls_Globals.id_Users > 0, " AND id_Users = " & TC.getSQLFormat(cls_Globals.id_Users), " AND id_Users IS NULL"))
+
+ If sSetting IsNot Nothing AndAlso sSetting.Length > 0 Then
+ grd.MainView.RestoreLayoutFromStream(New System.IO.MemoryStream(Convert.FromBase64String(sSetting)))
+ Return True
+ End If
+ End If
+ End If
+ Catch ex As Exception
+
+ End Try
+
+ Return False
+ End Function
+
+#End Region
+
+#Region "MKDXColorSplitter"
+ Private Function LoadSettingsMKDXSplitter(ByVal obj As MKNetDXLib.ctl_MKDXSplitter) As Boolean Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXSplitter).LoadSettings
+ Dim i As Integer
+ Dim sIdent = obj.Ident
+
+ Try
+ i = TC.NZ(MKNetLib.cls_MKSQLiteDataAccess.FireProcedureReturnScalar(cls_Globals.Conn, 0, "SELECT Setting FROM tbl_ControlSettings WHERE HostName = " & TC.getSQLFormat(System.Environment.MachineName) & " AND ControlID = " & TC.getSQLFormat(sIdent) & " AND " & " SettingID = " & TC.getSQLFormat("SplitPosition") & IIf(cls_Globals.MultiUserMode AndAlso Not cls_Globals.Admin AndAlso cls_Globals.id_Users > 0, " AND id_Users = " & TC.getSQLFormat(cls_Globals.id_Users), "") & IIf(cls_Globals.MultiUserMode AndAlso Not cls_Globals.Admin AndAlso cls_Globals.id_Users > 0, " AND id_Users = " & TC.getSQLFormat(cls_Globals.id_Users), " AND id_Users IS NULL")), 0)
+ If i > 0 Then
+ obj.SplitPosition = i
+ End If
+ Return True
+ Catch
+ Return False
+ End Try
+ End Function
+
+ Private Function SaveSettingsMKDXSplitter(ByVal obj As MKNetDXLib.ctl_MKDXSplitter) As Boolean Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXSplitter).SaveSettings
+ Try
+ 'Return DataAccess.FireProcedure(cls_Globals.Conn, 0, "EXEC dbo.gp_SetControlProperties " & TC.getSQLParameter(obj.Ident, obj.SplitPosition))
+ Dim sIdent = obj.Ident
+ Dim sSetting As String = obj.SplitPosition
+
+ Using tran As SQLite.SQLiteTransaction = cls_Globals.Conn.BeginTransaction
+ DS_ML.Upsert_tbl_ControlSettings(tran, sIdent, "SplitPosition", sSetting)
+ tran.Commit()
+ End Using
+
+
+ Return True
+ Catch
+ Return False
+ End Try
+ End Function
+#End Region
+
+#Region "MKDXSplitPanel"
+ Private Function LoadSettingsMKDXSplitPanel(ByVal obj As MKNetDXLib.ctl_MKDXSplitPanel) As Boolean Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXSplitPanel).LoadSettings
+ Dim i As Integer
+ Dim sIdent = obj.Ident
+
+ Try
+ i = TC.NZ(MKNetLib.cls_MKSQLiteDataAccess.FireProcedureReturnScalar(cls_Globals.Conn, 0, "SELECT Setting FROM tbl_ControlSettings WHERE HostName = " & TC.getSQLFormat(System.Environment.MachineName) & " AND ControlID = " & TC.getSQLFormat(sIdent) & " AND " & " SettingID = " & TC.getSQLFormat("SplitterPosition") & IIf(cls_Globals.MultiUserMode AndAlso Not cls_Globals.Admin AndAlso cls_Globals.id_Users > 0, " AND id_Users = " & TC.getSQLFormat(cls_Globals.id_Users), " AND id_Users IS NULL")), 0)
+ If i > 0 Then
+ obj.SplitterPosition = i
+ End If
+
+ obj.Collapsed = TC.NZ(MKNetLib.cls_MKSQLiteDataAccess.FireProcedureReturnScalar(cls_Globals.Conn, 0, "SELECT Setting FROM tbl_ControlSettings WHERE HostName = " & TC.getSQLFormat(System.Environment.MachineName) & " AND ControlID = " & TC.getSQLFormat(sIdent) & " AND " & " SettingID = " & TC.getSQLFormat("Collapsed") & IIf(cls_Globals.MultiUserMode AndAlso Not cls_Globals.Admin AndAlso cls_Globals.id_Users > 0, " AND id_Users = " & TC.getSQLFormat(cls_Globals.id_Users), " AND id_Users IS NULL")), obj.Collapsed)
+
+ Return True
+ Catch
+ Return False
+ End Try
+ End Function
+
+ Private Function SaveSettingsMKDXSplitPanel(ByVal obj As MKNetDXLib.ctl_MKDXSplitPanel) As Boolean Implements MKNetDXLib.IDDSettings(Of MKNetDXLib.ctl_MKDXSplitPanel).SaveSettings
+ Try
+ Dim sIdent = obj.Ident
+ Dim sSetting As String = obj.SplitterPosition
+
+ Using tran As SQLite.SQLiteTransaction = cls_Globals.Conn.BeginTransaction
+ DS_ML.Upsert_tbl_ControlSettings(tran, sIdent, "SplitterPosition", sSetting)
+
+ sSetting = TC.getSQLFormat(obj.Collapsed)
+ DS_ML.Upsert_tbl_ControlSettings(tran, sIdent, "Collapsed", sSetting)
+
+ tran.Commit()
+ End Using
+
+ Return True
+ Catch
+ Return False
+ End Try
+ End Function
+#End Region
+
+ Public Sub New(ByVal cnn As SqlClient.SqlConnection)
+ _cnn = cnn
+ If _cnn IsNot Nothing AndAlso _cnn.State = ConnectionState.Closed Then
+ _cnn.Open()
+ End If
+ MKNetDXLib.cls_DDSettingHandlerDelegates(Of MKNetDXLib.ctl_MKDXGrid).SaveSettingsFunction = AddressOf SaveSettingsDDDataGridView
+ MKNetDXLib.cls_DDSettingHandlerDelegates(Of MKNetDXLib.ctl_MKDXGrid).LoadSettingsFunction = AddressOf LoadSettingsDDDataGridView
+ MKNetDXLib.cls_DDSettingHandlerDelegates(Of MKNetDXLib.ctl_MKDXSplitter).SaveSettingsFunction = AddressOf SaveSettingsMKDXSplitter
+ MKNetDXLib.cls_DDSettingHandlerDelegates(Of MKNetDXLib.ctl_MKDXSplitter).LoadSettingsFunction = AddressOf LoadSettingsMKDXSplitter
+ MKNetDXLib.cls_DDSettingHandlerDelegates(Of MKNetDXLib.ctl_MKDXSplitPanel).SaveSettingsFunction = AddressOf SaveSettingsMKDXSplitPanel
+ MKNetDXLib.cls_DDSettingHandlerDelegates(Of MKNetDXLib.ctl_MKDXSplitPanel).LoadSettingsFunction = AddressOf LoadSettingsMKDXSplitPanel
+ End Sub
+
+ Protected Overrides Sub Finalize()
+ MyBase.Finalize()
+ Try
+ _cnn.Close()
+ Catch
+ '
+ Finally
+ _cnn = Nothing
+ End Try
+ End Sub
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_PermDecision.vb b/Metropolis_Launcher/Classes/cls_PermDecision.vb
new file mode 100644
index 0000000..b1f8e45
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_PermDecision.vb
@@ -0,0 +1,70 @@
+Public Class cls_PermDecision
+
+ Public Class PermDecisionButton
+ Private _Text As String
+ Private _Result As DialogResult
+ Private _Tooltip As String
+
+ Public ReadOnly Property Text As String
+ Get
+ Return _Text
+ End Get
+ End Property
+
+ Public ReadOnly Property Result As DialogResult
+ Get
+ Return _Result
+ End Get
+ End Property
+
+ Public ReadOnly Property Tooltip As String
+ Get
+ Return _Tooltip
+ End Get
+ End Property
+
+ Public Sub New(ByVal Text As String, ByVal Result As DialogResult, Optional ByVal Tooltip As String = "")
+ _Text = Text
+ _Result = Result
+ _Tooltip = Tooltip
+ End Sub
+ End Class
+
+ Private _Buttons() As PermDecisionButton
+ Private _LastDecision As DialogResult
+ Private _Caption As String
+ Private _Prompt As String
+ Private _ApplyAll As Boolean = False
+ Private _ParentForm As Windows.Forms.Form = Nothing
+
+ Public Property ApplyAll As Boolean
+ Get
+ Return _ApplyAll
+ End Get
+ Set(ByVal value As Boolean)
+ Me._ApplyAll = value
+ End Set
+ End Property
+
+ Public Sub New(ByVal ParentForm As Windows.Forms.Form, ByVal Caption As String, ByVal Prompt As String, ByRef Buttons() As PermDecisionButton)
+ _Caption = Caption
+ _Prompt = Prompt
+ _Buttons = Buttons
+ _ParentForm = ParentForm
+ End Sub
+
+ Public Function Show(Optional ByVal Caption As String = "", Optional ByVal Prompt As String = "") As DialogResult
+ If _ApplyAll Then
+ Return _LastDecision
+ End If
+
+ If Caption.Length > 0 Then _Caption = Caption
+ If Prompt.Length > 0 Then _Prompt = Prompt
+ Using frm As New frm_PermDecision(_Caption, _Prompt, _Buttons)
+ Dim res = frm.ShowDialog(_ParentForm)
+ _LastDecision = res
+ _ApplyAll = frm.ApplyAll
+ Return res
+ End Using
+ End Function
+End Class
diff --git a/Metropolis_Launcher/Classes/cls_Settings.vb b/Metropolis_Launcher/Classes/cls_Settings.vb
new file mode 100644
index 0000000..2494b58
--- /dev/null
+++ b/Metropolis_Launcher/Classes/cls_Settings.vb
@@ -0,0 +1,166 @@
+Public Class cls_Settings
+ Public Enum enm_Settingmodes
+ Same_for_All = 0
+ Per_User = 1
+ End Enum
+
+ Public Shared Function GetSetting(ByVal SettingName As String, Optional ByVal Settingmode As enm_Settingmodes = enm_Settingmodes.Same_for_All, Optional ByRef tran As SQLite.SQLiteTransaction = Nothing) As Object
+ If Settingmode = enm_Settingmodes.Per_User AndAlso cls_Globals.MultiUserMode AndAlso Not cls_Globals.Admin AndAlso cls_Globals.id_Users > 0 Then
+ SettingName = SettingName & "_User_" & cls_Globals.id_Users.ToString
+ End If
+
+ Dim bCloseTran As Boolean = False
+
+ If tran Is Nothing Then
+ tran = cls_Globals.Conn.BeginTransaction
+ bCloseTran = True
+ End If
+
+ Dim oRes As Object = DataAccess.GetSetting(tran.Connection, 0, SettingName, tran)
+
+ If bCloseTran Then
+ Try
+ tran.Dispose()
+ Catch ex As Exception
+
+ End Try
+ End If
+ Return oRes
+ End Function
+
+ Public Shared Sub SetSetting(ByVal SettingName As String, ByVal SettingValue As Object, Optional ByVal Settingmode As enm_Settingmodes = enm_Settingmodes.Same_for_All, Optional ByRef tran As SQLite.SQLiteTransaction = Nothing)
+ If Settingmode = enm_Settingmodes.Per_User AndAlso cls_Globals.MultiUserMode AndAlso Not cls_Globals.Admin AndAlso cls_Globals.id_Users > 0 Then
+ SettingName = SettingName & "_User_" & cls_Globals.id_Users.ToString
+ End If
+
+ Dim bCloseTran As Boolean = False
+
+ If tran Is Nothing Then
+ tran = cls_Globals.Conn.BeginTransaction
+ bCloseTran = True
+ End If
+
+ DataAccess.SetSetting(tran.Connection, 0, SettingName, SettingValue, tran)
+
+ If bCloseTran Then
+ tran.Commit()
+ tran.Dispose()
+ End If
+ End Sub
+
+ '''
+ ''' Apply the Settings to the current runtime instance
+ '''
+ '''
+ Public Shared Sub Apply_Settings()
+ cls_Skins.LoadSkin(TC.NZ(cls_Settings.GetSetting("Skin", enm_Settingmodes.Per_User), 4))
+ cls_Fonts.ApplyFont(TC.NZ(cls_Settings.GetSetting("Font", enm_Settingmodes.Per_User), "Segoe UI"), TC.NZ(cls_Settings.GetSetting("FontSize", enm_Settingmodes.Per_User), 8))
+ cls_Globals.Dir_Extras = Get_Extras_Directory()
+
+ If Alphaleonis.Win32.Filesystem.Directory.Exists(TC.NZ(cls_Settings.GetSetting("Dir_Screenshot"), "")) Then
+ cls_Globals.Dir_Screenshot = TC.NZ(cls_Settings.GetSetting("Dir_Screenshot"), "")
+ End If
+
+ MKNetLib.cls_MKFileSupport.TempDirRoot = cls_Globals.TempDir(Nothing)
+ End Sub
+
+ Public Shared Function Get_Extras_Directory()
+ Dim dir_extras As String = TC.NZ(cls_Settings.GetSetting("Dir_Extras"), "")
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(dir_extras) Then
+ dir_extras = Application.StartupPath & "\extras"
+
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(dir_extras) Then
+ dir_extras = ""
+ End If
+ End If
+
+ Return dir_extras
+ End Function
+
+ Public Shared Function Get_DOSBox_CWD(Optional ByRef tran As SQLite.SQLiteTransaction = Nothing) As String
+ Dim dosbox_cwd As String = TC.NZ(cls_Settings.GetSetting("Dir_DOSBox_CWD", enm_Settingmodes.Same_for_All, tran), "")
+
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(dosbox_cwd) Then
+ dosbox_cwd = Application.StartupPath & "\dosbox"
+
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(dosbox_cwd) Then
+ dosbox_cwd = ""
+ End If
+ End If
+
+ Return dosbox_cwd
+ End Function
+
+ Public Shared Function Check_DOSBox_CWD(Optional ByRef tran As SQLite.SQLiteTransaction = Nothing) As Boolean
+ If Not Alphaleonis.Win32.Filesystem.Directory.Exists(Get_DOSBox_CWD(tran)) Then
+ DevExpress.XtraEditors.XtraMessageBox.Show("The DOSBox Working Directory cannot be found, please set one up in the Settings section!", "DOSBox Working Directory not found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
+ Return False
+ End If
+
+ Return True
+ End Function
+
+ Public Shared Sub Fill_J2K_DS(ByVal DS As DataSet, ByVal j2k_path As String)
+ If Alphaleonis.Win32.Filesystem.File.Exists(j2k_path) Then
+ If Alphaleonis.Win32.Filesystem.File.Exists(Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(j2k_path) & "\default.j2k") Then
+ 'DS.Tables.Clear()
+ 'DS.ReadXmlSchema(Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(j2k_path) & "\default.j2k")
+ DS.ReadXml(Alphaleonis.Win32.Filesystem.Path.GetDirectoryName(j2k_path) & "\default.j2k", XmlReadMode.InferSchema)
+ ElseIf Alphaleonis.Win32.Filesystem.File.Exists(MKNetLib.cls_MKFileSupport.Get_SpecialFolder(Environment.SpecialFolder.MyDocuments) & "\J2K\" & "default.j2k") Then
+ DS.ReadXml(MKNetLib.cls_MKFileSupport.Get_SpecialFolder(Environment.SpecialFolder.MyDocuments) & "\J2K\" & "default.j2k")
+ End If
+ End If
+ End Sub
+End Class
+
+Public Class cls_Skins
+ '''
+ ''' Internal Skin Array, Fields are: DevExpress Skin Name, Displayname, Seasonal Flag
+ '''
+ ''' When adding new skins, always add at the bottom!
+ Public Shared Skins(,) As String = {
+ {"Blueprint", "Draft - Blue", "0"},
+ {"Metropolis", "Metropolis", "0"},
+ {"Metropolis Dark", "Metropolis Dark", "0"},
+ {"Pumpkin", "Halloween", "1"},
+ {"Sharp Plus", "Sharp Plus", "0"},
+ {"Springtime", "Spring", "1"},
+ {"Summer 2008", "Summer", "1"},
+ {"Valentine", "Valentine's Day", "1"},
+ {"Whiteprint", "Draft - White", "0"},
+ {"Xmas 2008 Blue", "X-Mas", "1"},
+ {"DevExpress Style", "DX", "0"},
+ {"DevExpress Dark Style", "DX Dark", "0"},
+ {"Office 2013", "Flat", "0"},
+ {"Office 2013 Dark Gray", "Flat Gray", "0"},
+ {"Visual Studio 2013 Blue", "Metropolis Blue", "0"},
+ {"Visual Studio 2013 Light", "Metropolis Light Gray", "0"},
+ {"High Contrast", "High Contrast", "0"},
+ {"Sharp", "Sharp", "0"}
+ }
+
+ Public Shared Sub LoadSkin(ByVal index As Integer)
+ Try
+ MKNetDXLib.cls_MKDXSkin.LoadSkin(Skins(index, 0))
+ Catch ex As Exception
+
+ End Try
+ End Sub
+
+ Public Shared Function GetCurrentSkinname(ByVal tran As SQLite.SQLiteTransaction) As String
+ Return Skins(TC.NZ(cls_Settings.GetSetting("Skin", cls_Settings.enm_Settingmodes.Per_User, tran), 4), 0)
+ End Function
+End Class
+
+Public Class cls_Fonts
+ '''
+ ''' Apply a Standard Font for all Controls
+ '''
+ '''
+ '''
+ '''
+ Public Shared Sub ApplyFont(ByVal FontName As String, ByVal FontSize As Integer)
+ 'DevExpress.Utils.AppearanceObject.DefaultFont = New Font(FontName, FontSize)
+ MKNetDXLib.ctl_MKDXGrid.Default_GridFont = New Font(FontName, FontSize)
+ End Sub
+End Class
\ No newline at end of file
diff --git a/Metropolis_Launcher/DataSets/DS_IMDB.Designer.vb b/Metropolis_Launcher/DataSets/DS_IMDB.Designer.vb
new file mode 100644
index 0000000..52df9c2
--- /dev/null
+++ b/Metropolis_Launcher/DataSets/DS_IMDB.Designer.vb
@@ -0,0 +1,7094 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.34209
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict Off
+Option Explicit On
+
+
+
+'''
+'''Represents a strongly typed in-memory cache of data.
+'''
+ _
+Partial Public Class DS_IMDB
+ Inherits Global.System.Data.DataSet
+
+ Private tabletbl_Categories As tbl_CategoriesDataTable
+
+ Private tabletbl_ContentRating As tbl_ContentRatingDataTable
+
+ Private tabletbl_Episodes As tbl_EpisodesDataTable
+
+ Private tabletbl_Genres As tbl_GenresDataTable
+
+ Private tabletbl_Jobs As tbl_JobsDataTable
+
+ Private tabletbl_Movies As tbl_MoviesDataTable
+
+ Private tabletbl_Movies_Episodes_Genres As tbl_Movies_Episodes_GenresDataTable
+
+ Private tabletbl_Movies_Episodes_PlotKeywords As tbl_Movies_Episodes_PlotKeywordsDataTable
+
+ Private tabletbl_Persons As tbl_PersonsDataTable
+
+ Private tabletbl_Persons_Jobs As tbl_Persons_JobsDataTable
+
+ Private tabletbl_PlotKeywords As tbl_PlotKeywordsDataTable
+
+ Private tabletbl_Seasons As tbl_SeasonsDataTable
+
+ Private tabletbl_Series As tbl_SeriesDataTable
+
+ Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.BeginInit
+ Me.InitClass
+ Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
+ AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
+ AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
+ Me.EndInit
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context, false)
+ If (Me.IsBinarySerialized(info, context) = true) Then
+ Me.InitVars(false)
+ Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
+ AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
+ AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
+ Return
+ End If
+ Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
+ If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
+ Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
+ ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
+ If (Not (ds.Tables("tbl_Categories")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_CategoriesDataTable(ds.Tables("tbl_Categories")))
+ End If
+ If (Not (ds.Tables("tbl_ContentRating")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_ContentRatingDataTable(ds.Tables("tbl_ContentRating")))
+ End If
+ If (Not (ds.Tables("tbl_Episodes")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_EpisodesDataTable(ds.Tables("tbl_Episodes")))
+ End If
+ If (Not (ds.Tables("tbl_Genres")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_GenresDataTable(ds.Tables("tbl_Genres")))
+ End If
+ If (Not (ds.Tables("tbl_Jobs")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_JobsDataTable(ds.Tables("tbl_Jobs")))
+ End If
+ If (Not (ds.Tables("tbl_Movies")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_MoviesDataTable(ds.Tables("tbl_Movies")))
+ End If
+ If (Not (ds.Tables("tbl_Movies_Episodes_Genres")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_Movies_Episodes_GenresDataTable(ds.Tables("tbl_Movies_Episodes_Genres")))
+ End If
+ If (Not (ds.Tables("tbl_Movies_Episodes_PlotKeywords")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_Movies_Episodes_PlotKeywordsDataTable(ds.Tables("tbl_Movies_Episodes_PlotKeywords")))
+ End If
+ If (Not (ds.Tables("tbl_Persons")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_PersonsDataTable(ds.Tables("tbl_Persons")))
+ End If
+ If (Not (ds.Tables("tbl_Persons_Jobs")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_Persons_JobsDataTable(ds.Tables("tbl_Persons_Jobs")))
+ End If
+ If (Not (ds.Tables("tbl_PlotKeywords")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_PlotKeywordsDataTable(ds.Tables("tbl_PlotKeywords")))
+ End If
+ If (Not (ds.Tables("tbl_Seasons")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_SeasonsDataTable(ds.Tables("tbl_Seasons")))
+ End If
+ If (Not (ds.Tables("tbl_Series")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_SeriesDataTable(ds.Tables("tbl_Series")))
+ End If
+ Me.DataSetName = ds.DataSetName
+ Me.Prefix = ds.Prefix
+ Me.Namespace = ds.Namespace
+ Me.Locale = ds.Locale
+ Me.CaseSensitive = ds.CaseSensitive
+ Me.EnforceConstraints = ds.EnforceConstraints
+ Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
+ Me.InitVars
+ Else
+ Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
+ End If
+ Me.GetSerializationData(info, context)
+ Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
+ AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
+ AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
+ End Sub
+
+ _
+ Public ReadOnly Property tbl_Categories() As tbl_CategoriesDataTable
+ Get
+ Return Me.tabletbl_Categories
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_ContentRating() As tbl_ContentRatingDataTable
+ Get
+ Return Me.tabletbl_ContentRating
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Episodes() As tbl_EpisodesDataTable
+ Get
+ Return Me.tabletbl_Episodes
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Genres() As tbl_GenresDataTable
+ Get
+ Return Me.tabletbl_Genres
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Jobs() As tbl_JobsDataTable
+ Get
+ Return Me.tabletbl_Jobs
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Movies() As tbl_MoviesDataTable
+ Get
+ Return Me.tabletbl_Movies
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Movies_Episodes_Genres() As tbl_Movies_Episodes_GenresDataTable
+ Get
+ Return Me.tabletbl_Movies_Episodes_Genres
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Movies_Episodes_PlotKeywords() As tbl_Movies_Episodes_PlotKeywordsDataTable
+ Get
+ Return Me.tabletbl_Movies_Episodes_PlotKeywords
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Persons() As tbl_PersonsDataTable
+ Get
+ Return Me.tabletbl_Persons
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Persons_Jobs() As tbl_Persons_JobsDataTable
+ Get
+ Return Me.tabletbl_Persons_Jobs
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_PlotKeywords() As tbl_PlotKeywordsDataTable
+ Get
+ Return Me.tabletbl_PlotKeywords
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Seasons() As tbl_SeasonsDataTable
+ Get
+ Return Me.tabletbl_Seasons
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property tbl_Series() As tbl_SeriesDataTable
+ Get
+ Return Me.tabletbl_Series
+ End Get
+ End Property
+
+ _
+ Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
+ Get
+ Return Me._schemaSerializationMode
+ End Get
+ Set
+ Me._schemaSerializationMode = value
+ End Set
+ End Property
+
+ _
+ Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
+ Get
+ Return MyBase.Tables
+ End Get
+ End Property
+
+ _
+ Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
+ Get
+ Return MyBase.Relations
+ End Get
+ End Property
+
+ _
+ Protected Overrides Sub InitializeDerivedDataSet()
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataSet
+ Dim cln As DS_IMDB = CType(MyBase.Clone,DS_IMDB)
+ cln.InitVars
+ cln.SchemaSerializationMode = Me.SchemaSerializationMode
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function ShouldSerializeTables() As Boolean
+ Return false
+ End Function
+
+ _
+ Protected Overrides Function ShouldSerializeRelations() As Boolean
+ Return false
+ End Function
+
+ _
+ Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
+ If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
+ Me.Reset
+ Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
+ ds.ReadXml(reader)
+ If (Not (ds.Tables("tbl_Categories")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_CategoriesDataTable(ds.Tables("tbl_Categories")))
+ End If
+ If (Not (ds.Tables("tbl_ContentRating")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_ContentRatingDataTable(ds.Tables("tbl_ContentRating")))
+ End If
+ If (Not (ds.Tables("tbl_Episodes")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_EpisodesDataTable(ds.Tables("tbl_Episodes")))
+ End If
+ If (Not (ds.Tables("tbl_Genres")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_GenresDataTable(ds.Tables("tbl_Genres")))
+ End If
+ If (Not (ds.Tables("tbl_Jobs")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_JobsDataTable(ds.Tables("tbl_Jobs")))
+ End If
+ If (Not (ds.Tables("tbl_Movies")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_MoviesDataTable(ds.Tables("tbl_Movies")))
+ End If
+ If (Not (ds.Tables("tbl_Movies_Episodes_Genres")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_Movies_Episodes_GenresDataTable(ds.Tables("tbl_Movies_Episodes_Genres")))
+ End If
+ If (Not (ds.Tables("tbl_Movies_Episodes_PlotKeywords")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_Movies_Episodes_PlotKeywordsDataTable(ds.Tables("tbl_Movies_Episodes_PlotKeywords")))
+ End If
+ If (Not (ds.Tables("tbl_Persons")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_PersonsDataTable(ds.Tables("tbl_Persons")))
+ End If
+ If (Not (ds.Tables("tbl_Persons_Jobs")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_Persons_JobsDataTable(ds.Tables("tbl_Persons_Jobs")))
+ End If
+ If (Not (ds.Tables("tbl_PlotKeywords")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_PlotKeywordsDataTable(ds.Tables("tbl_PlotKeywords")))
+ End If
+ If (Not (ds.Tables("tbl_Seasons")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_SeasonsDataTable(ds.Tables("tbl_Seasons")))
+ End If
+ If (Not (ds.Tables("tbl_Series")) Is Nothing) Then
+ MyBase.Tables.Add(New tbl_SeriesDataTable(ds.Tables("tbl_Series")))
+ End If
+ Me.DataSetName = ds.DataSetName
+ Me.Prefix = ds.Prefix
+ Me.Namespace = ds.Namespace
+ Me.Locale = ds.Locale
+ Me.CaseSensitive = ds.CaseSensitive
+ Me.EnforceConstraints = ds.EnforceConstraints
+ Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
+ Me.InitVars
+ Else
+ Me.ReadXml(reader)
+ Me.InitVars
+ End If
+ End Sub
+
+ _
+ Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
+ Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
+ stream.Position = 0
+ Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
+ End Function
+
+ _
+ Friend Overloads Sub InitVars()
+ Me.InitVars(true)
+ End Sub
+
+ _
+ Friend Overloads Sub InitVars(ByVal initTable As Boolean)
+ Me.tabletbl_Categories = CType(MyBase.Tables("tbl_Categories"),tbl_CategoriesDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Categories) Is Nothing) Then
+ Me.tabletbl_Categories.InitVars
+ End If
+ End If
+ Me.tabletbl_ContentRating = CType(MyBase.Tables("tbl_ContentRating"),tbl_ContentRatingDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_ContentRating) Is Nothing) Then
+ Me.tabletbl_ContentRating.InitVars
+ End If
+ End If
+ Me.tabletbl_Episodes = CType(MyBase.Tables("tbl_Episodes"),tbl_EpisodesDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Episodes) Is Nothing) Then
+ Me.tabletbl_Episodes.InitVars
+ End If
+ End If
+ Me.tabletbl_Genres = CType(MyBase.Tables("tbl_Genres"),tbl_GenresDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Genres) Is Nothing) Then
+ Me.tabletbl_Genres.InitVars
+ End If
+ End If
+ Me.tabletbl_Jobs = CType(MyBase.Tables("tbl_Jobs"),tbl_JobsDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Jobs) Is Nothing) Then
+ Me.tabletbl_Jobs.InitVars
+ End If
+ End If
+ Me.tabletbl_Movies = CType(MyBase.Tables("tbl_Movies"),tbl_MoviesDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Movies) Is Nothing) Then
+ Me.tabletbl_Movies.InitVars
+ End If
+ End If
+ Me.tabletbl_Movies_Episodes_Genres = CType(MyBase.Tables("tbl_Movies_Episodes_Genres"),tbl_Movies_Episodes_GenresDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Movies_Episodes_Genres) Is Nothing) Then
+ Me.tabletbl_Movies_Episodes_Genres.InitVars
+ End If
+ End If
+ Me.tabletbl_Movies_Episodes_PlotKeywords = CType(MyBase.Tables("tbl_Movies_Episodes_PlotKeywords"),tbl_Movies_Episodes_PlotKeywordsDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Movies_Episodes_PlotKeywords) Is Nothing) Then
+ Me.tabletbl_Movies_Episodes_PlotKeywords.InitVars
+ End If
+ End If
+ Me.tabletbl_Persons = CType(MyBase.Tables("tbl_Persons"),tbl_PersonsDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Persons) Is Nothing) Then
+ Me.tabletbl_Persons.InitVars
+ End If
+ End If
+ Me.tabletbl_Persons_Jobs = CType(MyBase.Tables("tbl_Persons_Jobs"),tbl_Persons_JobsDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Persons_Jobs) Is Nothing) Then
+ Me.tabletbl_Persons_Jobs.InitVars
+ End If
+ End If
+ Me.tabletbl_PlotKeywords = CType(MyBase.Tables("tbl_PlotKeywords"),tbl_PlotKeywordsDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_PlotKeywords) Is Nothing) Then
+ Me.tabletbl_PlotKeywords.InitVars
+ End If
+ End If
+ Me.tabletbl_Seasons = CType(MyBase.Tables("tbl_Seasons"),tbl_SeasonsDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Seasons) Is Nothing) Then
+ Me.tabletbl_Seasons.InitVars
+ End If
+ End If
+ Me.tabletbl_Series = CType(MyBase.Tables("tbl_Series"),tbl_SeriesDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tabletbl_Series) Is Nothing) Then
+ Me.tabletbl_Series.InitVars
+ End If
+ End If
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.DataSetName = "DS_IMDB"
+ Me.Prefix = ""
+ Me.Namespace = "http://tempuri.org/DS_IMDB.xsd"
+ Me.EnforceConstraints = true
+ Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
+ Me.tabletbl_Categories = New tbl_CategoriesDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Categories)
+ Me.tabletbl_ContentRating = New tbl_ContentRatingDataTable()
+ MyBase.Tables.Add(Me.tabletbl_ContentRating)
+ Me.tabletbl_Episodes = New tbl_EpisodesDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Episodes)
+ Me.tabletbl_Genres = New tbl_GenresDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Genres)
+ Me.tabletbl_Jobs = New tbl_JobsDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Jobs)
+ Me.tabletbl_Movies = New tbl_MoviesDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Movies)
+ Me.tabletbl_Movies_Episodes_Genres = New tbl_Movies_Episodes_GenresDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Movies_Episodes_Genres)
+ Me.tabletbl_Movies_Episodes_PlotKeywords = New tbl_Movies_Episodes_PlotKeywordsDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Movies_Episodes_PlotKeywords)
+ Me.tabletbl_Persons = New tbl_PersonsDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Persons)
+ Me.tabletbl_Persons_Jobs = New tbl_Persons_JobsDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Persons_Jobs)
+ Me.tabletbl_PlotKeywords = New tbl_PlotKeywordsDataTable()
+ MyBase.Tables.Add(Me.tabletbl_PlotKeywords)
+ Me.tabletbl_Seasons = New tbl_SeasonsDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Seasons)
+ Me.tabletbl_Series = New tbl_SeriesDataTable()
+ MyBase.Tables.Add(Me.tabletbl_Series)
+ End Sub
+
+ _
+ Private Function ShouldSerializetbl_Categories() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_ContentRating() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Episodes() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Genres() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Jobs() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Movies() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Movies_Episodes_Genres() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Movies_Episodes_PlotKeywords() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Persons() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Persons_Jobs() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_PlotKeywords() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Seasons() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializetbl_Series() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
+ If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
+ Me.InitVars
+ End If
+ End Sub
+
+ _
+ Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim ds As DS_IMDB = New DS_IMDB()
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any.Namespace = ds.Namespace
+ sequence.Items.Add(any)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+
+ _
+ Public Delegate Sub tbl_CategoriesRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_CategoriesRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_ContentRatingRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_ContentRatingRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_EpisodesRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_EpisodesRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_GenresRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_GenresRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_JobsRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_JobsRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_MoviesRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_MoviesRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_Movies_Episodes_GenresRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_Movies_Episodes_GenresRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_Movies_Episodes_PlotKeywordsRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_Movies_Episodes_PlotKeywordsRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_PersonsRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_PersonsRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_Persons_JobsRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_Persons_JobsRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_PlotKeywordsRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_PlotKeywordsRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_SeasonsRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_SeasonsRowChangeEvent)
+
+ _
+ Public Delegate Sub tbl_SeriesRowChangeEventHandler(ByVal sender As Object, ByVal e As tbl_SeriesRowChangeEvent)
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class tbl_CategoriesDataTable
+ Inherits Global.System.Data.TypedTableBase(Of tbl_CategoriesRow)
+
+ Private columnid_Categories As Global.System.Data.DataColumn
+
+ Private columnCategoryName As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "tbl_Categories"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property id_CategoriesColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_Categories
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property CategoryNameColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnCategoryName
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As tbl_CategoriesRow
+ Get
+ Return CType(Me.Rows(index),tbl_CategoriesRow)
+ End Get
+ End Property
+
+ _
+ Public Event tbl_CategoriesRowChanging As tbl_CategoriesRowChangeEventHandler
+
+ _
+ Public Event tbl_CategoriesRowChanged As tbl_CategoriesRowChangeEventHandler
+
+ _
+ Public Event tbl_CategoriesRowDeleting As tbl_CategoriesRowChangeEventHandler
+
+ _
+ Public Event tbl_CategoriesRowDeleted As tbl_CategoriesRowChangeEventHandler
+
+ _
+ Public Overloads Sub Addtbl_CategoriesRow(ByVal row As tbl_CategoriesRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function Addtbl_CategoriesRow(ByVal CategoryName As String) As tbl_CategoriesRow
+ Dim rowtbl_CategoriesRow As tbl_CategoriesRow = CType(Me.NewRow,tbl_CategoriesRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, CategoryName}
+ rowtbl_CategoriesRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowtbl_CategoriesRow)
+ Return rowtbl_CategoriesRow
+ End Function
+
+ _
+ Public Function FindByid_Categories(ByVal id_Categories As Long) As tbl_CategoriesRow
+ Return CType(Me.Rows.Find(New Object() {id_Categories}),tbl_CategoriesRow)
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As tbl_CategoriesDataTable = CType(MyBase.Clone,tbl_CategoriesDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New tbl_CategoriesDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnid_Categories = MyBase.Columns("id_Categories")
+ Me.columnCategoryName = MyBase.Columns("CategoryName")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnid_Categories = New Global.System.Data.DataColumn("id_Categories", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnid_Categories)
+ Me.columnCategoryName = New Global.System.Data.DataColumn("CategoryName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnCategoryName)
+ Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnid_Categories}, true))
+ Me.columnid_Categories.AutoIncrement = true
+ Me.columnid_Categories.AutoIncrementSeed = -1
+ Me.columnid_Categories.AutoIncrementStep = -1
+ Me.columnid_Categories.AllowDBNull = false
+ Me.columnid_Categories.Unique = true
+ Me.columnCategoryName.MaxLength = 2147483647
+ End Sub
+
+ _
+ Public Function Newtbl_CategoriesRow() As tbl_CategoriesRow
+ Return CType(Me.NewRow,tbl_CategoriesRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New tbl_CategoriesRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(tbl_CategoriesRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.tbl_CategoriesRowChangedEvent) Is Nothing) Then
+ RaiseEvent tbl_CategoriesRowChanged(Me, New tbl_CategoriesRowChangeEvent(CType(e.Row,tbl_CategoriesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.tbl_CategoriesRowChangingEvent) Is Nothing) Then
+ RaiseEvent tbl_CategoriesRowChanging(Me, New tbl_CategoriesRowChangeEvent(CType(e.Row,tbl_CategoriesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.tbl_CategoriesRowDeletedEvent) Is Nothing) Then
+ RaiseEvent tbl_CategoriesRowDeleted(Me, New tbl_CategoriesRowChangeEvent(CType(e.Row,tbl_CategoriesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.tbl_CategoriesRowDeletingEvent) Is Nothing) Then
+ RaiseEvent tbl_CategoriesRowDeleting(Me, New tbl_CategoriesRowChangeEvent(CType(e.Row,tbl_CategoriesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub Removetbl_CategoriesRow(ByVal row As tbl_CategoriesRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As DS_IMDB = New DS_IMDB()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "tbl_CategoriesDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class tbl_ContentRatingDataTable
+ Inherits Global.System.Data.TypedTableBase(Of tbl_ContentRatingRow)
+
+ Private columnid_ContentRating As Global.System.Data.DataColumn
+
+ Private columnTitle As Global.System.Data.DataColumn
+
+ Private columnAge As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "tbl_ContentRating"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property id_ContentRatingColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_ContentRating
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnTitle
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property AgeColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnAge
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As tbl_ContentRatingRow
+ Get
+ Return CType(Me.Rows(index),tbl_ContentRatingRow)
+ End Get
+ End Property
+
+ _
+ Public Event tbl_ContentRatingRowChanging As tbl_ContentRatingRowChangeEventHandler
+
+ _
+ Public Event tbl_ContentRatingRowChanged As tbl_ContentRatingRowChangeEventHandler
+
+ _
+ Public Event tbl_ContentRatingRowDeleting As tbl_ContentRatingRowChangeEventHandler
+
+ _
+ Public Event tbl_ContentRatingRowDeleted As tbl_ContentRatingRowChangeEventHandler
+
+ _
+ Public Overloads Sub Addtbl_ContentRatingRow(ByVal row As tbl_ContentRatingRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function Addtbl_ContentRatingRow(ByVal Title As String, ByVal Age As Long) As tbl_ContentRatingRow
+ Dim rowtbl_ContentRatingRow As tbl_ContentRatingRow = CType(Me.NewRow,tbl_ContentRatingRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, Title, Age}
+ rowtbl_ContentRatingRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowtbl_ContentRatingRow)
+ Return rowtbl_ContentRatingRow
+ End Function
+
+ _
+ Public Function FindByid_ContentRating(ByVal id_ContentRating As Long) As tbl_ContentRatingRow
+ Return CType(Me.Rows.Find(New Object() {id_ContentRating}),tbl_ContentRatingRow)
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As tbl_ContentRatingDataTable = CType(MyBase.Clone,tbl_ContentRatingDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New tbl_ContentRatingDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnid_ContentRating = MyBase.Columns("id_ContentRating")
+ Me.columnTitle = MyBase.Columns("Title")
+ Me.columnAge = MyBase.Columns("Age")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnid_ContentRating = New Global.System.Data.DataColumn("id_ContentRating", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnid_ContentRating)
+ Me.columnTitle = New Global.System.Data.DataColumn("Title", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnTitle)
+ Me.columnAge = New Global.System.Data.DataColumn("Age", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnAge)
+ Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnid_ContentRating}, true))
+ Me.columnid_ContentRating.AutoIncrement = true
+ Me.columnid_ContentRating.AutoIncrementSeed = -1
+ Me.columnid_ContentRating.AutoIncrementStep = -1
+ Me.columnid_ContentRating.AllowDBNull = false
+ Me.columnid_ContentRating.Unique = true
+ Me.columnTitle.MaxLength = 2147483647
+ End Sub
+
+ _
+ Public Function Newtbl_ContentRatingRow() As tbl_ContentRatingRow
+ Return CType(Me.NewRow,tbl_ContentRatingRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New tbl_ContentRatingRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(tbl_ContentRatingRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.tbl_ContentRatingRowChangedEvent) Is Nothing) Then
+ RaiseEvent tbl_ContentRatingRowChanged(Me, New tbl_ContentRatingRowChangeEvent(CType(e.Row,tbl_ContentRatingRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.tbl_ContentRatingRowChangingEvent) Is Nothing) Then
+ RaiseEvent tbl_ContentRatingRowChanging(Me, New tbl_ContentRatingRowChangeEvent(CType(e.Row,tbl_ContentRatingRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.tbl_ContentRatingRowDeletedEvent) Is Nothing) Then
+ RaiseEvent tbl_ContentRatingRowDeleted(Me, New tbl_ContentRatingRowChangeEvent(CType(e.Row,tbl_ContentRatingRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.tbl_ContentRatingRowDeletingEvent) Is Nothing) Then
+ RaiseEvent tbl_ContentRatingRowDeleting(Me, New tbl_ContentRatingRowChangeEvent(CType(e.Row,tbl_ContentRatingRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub Removetbl_ContentRatingRow(ByVal row As tbl_ContentRatingRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As DS_IMDB = New DS_IMDB()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "tbl_ContentRatingDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class tbl_EpisodesDataTable
+ Inherits Global.System.Data.TypedTableBase(Of tbl_EpisodesRow)
+
+ Private columnid_Episodes As Global.System.Data.DataColumn
+
+ Private columnid_Seasons As Global.System.Data.DataColumn
+
+ Private columnIMDBid As Global.System.Data.DataColumn
+
+ Private columnTitle As Global.System.Data.DataColumn
+
+ Private columnYear As Global.System.Data.DataColumn
+
+ Private columnRating As Global.System.Data.DataColumn
+
+ Private columnRatingUsers As Global.System.Data.DataColumn
+
+ Private columnMetaScore As Global.System.Data.DataColumn
+
+ Private columnDescription As Global.System.Data.DataColumn
+
+ Private columnLength As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "tbl_Episodes"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property id_EpisodesColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_Episodes
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property id_SeasonsColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_Seasons
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property IMDBidColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnIMDBid
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnTitle
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property YearColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnYear
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property RatingColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnRating
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property RatingUsersColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnRatingUsers
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property MetaScoreColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnMetaScore
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DescriptionColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnDescription
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property LengthColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnLength
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As tbl_EpisodesRow
+ Get
+ Return CType(Me.Rows(index),tbl_EpisodesRow)
+ End Get
+ End Property
+
+ _
+ Public Event tbl_EpisodesRowChanging As tbl_EpisodesRowChangeEventHandler
+
+ _
+ Public Event tbl_EpisodesRowChanged As tbl_EpisodesRowChangeEventHandler
+
+ _
+ Public Event tbl_EpisodesRowDeleting As tbl_EpisodesRowChangeEventHandler
+
+ _
+ Public Event tbl_EpisodesRowDeleted As tbl_EpisodesRowChangeEventHandler
+
+ _
+ Public Overloads Sub Addtbl_EpisodesRow(ByVal row As tbl_EpisodesRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function Addtbl_EpisodesRow(ByVal id_Seasons As Long, ByVal IMDBid As String, ByVal Title As String, ByVal Year As Long, ByVal Rating As Single, ByVal RatingUsers As Long, ByVal MetaScore As Long, ByVal Description As String, ByVal Length As Long) As tbl_EpisodesRow
+ Dim rowtbl_EpisodesRow As tbl_EpisodesRow = CType(Me.NewRow,tbl_EpisodesRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, id_Seasons, IMDBid, Title, Year, Rating, RatingUsers, MetaScore, Description, Length}
+ rowtbl_EpisodesRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowtbl_EpisodesRow)
+ Return rowtbl_EpisodesRow
+ End Function
+
+ _
+ Public Function FindByid_Episodes(ByVal id_Episodes As Long) As tbl_EpisodesRow
+ Return CType(Me.Rows.Find(New Object() {id_Episodes}),tbl_EpisodesRow)
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As tbl_EpisodesDataTable = CType(MyBase.Clone,tbl_EpisodesDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New tbl_EpisodesDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnid_Episodes = MyBase.Columns("id_Episodes")
+ Me.columnid_Seasons = MyBase.Columns("id_Seasons")
+ Me.columnIMDBid = MyBase.Columns("IMDBid")
+ Me.columnTitle = MyBase.Columns("Title")
+ Me.columnYear = MyBase.Columns("Year")
+ Me.columnRating = MyBase.Columns("Rating")
+ Me.columnRatingUsers = MyBase.Columns("RatingUsers")
+ Me.columnMetaScore = MyBase.Columns("MetaScore")
+ Me.columnDescription = MyBase.Columns("Description")
+ Me.columnLength = MyBase.Columns("Length")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnid_Episodes = New Global.System.Data.DataColumn("id_Episodes", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnid_Episodes)
+ Me.columnid_Seasons = New Global.System.Data.DataColumn("id_Seasons", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnid_Seasons)
+ Me.columnIMDBid = New Global.System.Data.DataColumn("IMDBid", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnIMDBid)
+ Me.columnTitle = New Global.System.Data.DataColumn("Title", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnTitle)
+ Me.columnYear = New Global.System.Data.DataColumn("Year", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnYear)
+ Me.columnRating = New Global.System.Data.DataColumn("Rating", GetType(Single), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnRating)
+ Me.columnRatingUsers = New Global.System.Data.DataColumn("RatingUsers", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnRatingUsers)
+ Me.columnMetaScore = New Global.System.Data.DataColumn("MetaScore", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnMetaScore)
+ Me.columnDescription = New Global.System.Data.DataColumn("Description", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnDescription)
+ Me.columnLength = New Global.System.Data.DataColumn("Length", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnLength)
+ Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnid_Episodes}, true))
+ Me.columnid_Episodes.AutoIncrement = true
+ Me.columnid_Episodes.AutoIncrementSeed = -1
+ Me.columnid_Episodes.AutoIncrementStep = -1
+ Me.columnid_Episodes.AllowDBNull = false
+ Me.columnid_Episodes.Unique = true
+ Me.columnIMDBid.MaxLength = 2147483647
+ Me.columnTitle.MaxLength = 2147483647
+ Me.columnDescription.MaxLength = 2147483647
+ End Sub
+
+ _
+ Public Function Newtbl_EpisodesRow() As tbl_EpisodesRow
+ Return CType(Me.NewRow,tbl_EpisodesRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New tbl_EpisodesRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(tbl_EpisodesRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.tbl_EpisodesRowChangedEvent) Is Nothing) Then
+ RaiseEvent tbl_EpisodesRowChanged(Me, New tbl_EpisodesRowChangeEvent(CType(e.Row,tbl_EpisodesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.tbl_EpisodesRowChangingEvent) Is Nothing) Then
+ RaiseEvent tbl_EpisodesRowChanging(Me, New tbl_EpisodesRowChangeEvent(CType(e.Row,tbl_EpisodesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.tbl_EpisodesRowDeletedEvent) Is Nothing) Then
+ RaiseEvent tbl_EpisodesRowDeleted(Me, New tbl_EpisodesRowChangeEvent(CType(e.Row,tbl_EpisodesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.tbl_EpisodesRowDeletingEvent) Is Nothing) Then
+ RaiseEvent tbl_EpisodesRowDeleting(Me, New tbl_EpisodesRowChangeEvent(CType(e.Row,tbl_EpisodesRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub Removetbl_EpisodesRow(ByVal row As tbl_EpisodesRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As DS_IMDB = New DS_IMDB()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "tbl_EpisodesDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class tbl_GenresDataTable
+ Inherits Global.System.Data.TypedTableBase(Of tbl_GenresRow)
+
+ Private columnid_Genres As Global.System.Data.DataColumn
+
+ Private columnGenreName As Global.System.Data.DataColumn
+
+ Private columnURLPart As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "tbl_Genres"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property id_GenresColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_Genres
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property GenreNameColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnGenreName
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property URLPartColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnURLPart
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As tbl_GenresRow
+ Get
+ Return CType(Me.Rows(index),tbl_GenresRow)
+ End Get
+ End Property
+
+ _
+ Public Event tbl_GenresRowChanging As tbl_GenresRowChangeEventHandler
+
+ _
+ Public Event tbl_GenresRowChanged As tbl_GenresRowChangeEventHandler
+
+ _
+ Public Event tbl_GenresRowDeleting As tbl_GenresRowChangeEventHandler
+
+ _
+ Public Event tbl_GenresRowDeleted As tbl_GenresRowChangeEventHandler
+
+ _
+ Public Overloads Sub Addtbl_GenresRow(ByVal row As tbl_GenresRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function Addtbl_GenresRow(ByVal GenreName As String, ByVal URLPart As String) As tbl_GenresRow
+ Dim rowtbl_GenresRow As tbl_GenresRow = CType(Me.NewRow,tbl_GenresRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, GenreName, URLPart}
+ rowtbl_GenresRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowtbl_GenresRow)
+ Return rowtbl_GenresRow
+ End Function
+
+ _
+ Public Function FindByid_Genres(ByVal id_Genres As Long) As tbl_GenresRow
+ Return CType(Me.Rows.Find(New Object() {id_Genres}),tbl_GenresRow)
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As tbl_GenresDataTable = CType(MyBase.Clone,tbl_GenresDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New tbl_GenresDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnid_Genres = MyBase.Columns("id_Genres")
+ Me.columnGenreName = MyBase.Columns("GenreName")
+ Me.columnURLPart = MyBase.Columns("URLPart")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnid_Genres = New Global.System.Data.DataColumn("id_Genres", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnid_Genres)
+ Me.columnGenreName = New Global.System.Data.DataColumn("GenreName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnGenreName)
+ Me.columnURLPart = New Global.System.Data.DataColumn("URLPart", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnURLPart)
+ Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnid_Genres}, true))
+ Me.columnid_Genres.AutoIncrement = true
+ Me.columnid_Genres.AutoIncrementSeed = -1
+ Me.columnid_Genres.AutoIncrementStep = -1
+ Me.columnid_Genres.AllowDBNull = false
+ Me.columnid_Genres.Unique = true
+ Me.columnGenreName.MaxLength = 2147483647
+ Me.columnURLPart.MaxLength = 2147483647
+ End Sub
+
+ _
+ Public Function Newtbl_GenresRow() As tbl_GenresRow
+ Return CType(Me.NewRow,tbl_GenresRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New tbl_GenresRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(tbl_GenresRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.tbl_GenresRowChangedEvent) Is Nothing) Then
+ RaiseEvent tbl_GenresRowChanged(Me, New tbl_GenresRowChangeEvent(CType(e.Row,tbl_GenresRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.tbl_GenresRowChangingEvent) Is Nothing) Then
+ RaiseEvent tbl_GenresRowChanging(Me, New tbl_GenresRowChangeEvent(CType(e.Row,tbl_GenresRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.tbl_GenresRowDeletedEvent) Is Nothing) Then
+ RaiseEvent tbl_GenresRowDeleted(Me, New tbl_GenresRowChangeEvent(CType(e.Row,tbl_GenresRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.tbl_GenresRowDeletingEvent) Is Nothing) Then
+ RaiseEvent tbl_GenresRowDeleting(Me, New tbl_GenresRowChangeEvent(CType(e.Row,tbl_GenresRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub Removetbl_GenresRow(ByVal row As tbl_GenresRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As DS_IMDB = New DS_IMDB()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "tbl_GenresDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class tbl_JobsDataTable
+ Inherits Global.System.Data.TypedTableBase(Of tbl_JobsRow)
+
+ Private columnid_Jobs As Global.System.Data.DataColumn
+
+ Private columnJobTitle As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "tbl_Jobs"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property id_JobsColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_Jobs
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property JobTitleColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnJobTitle
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As tbl_JobsRow
+ Get
+ Return CType(Me.Rows(index),tbl_JobsRow)
+ End Get
+ End Property
+
+ _
+ Public Event tbl_JobsRowChanging As tbl_JobsRowChangeEventHandler
+
+ _
+ Public Event tbl_JobsRowChanged As tbl_JobsRowChangeEventHandler
+
+ _
+ Public Event tbl_JobsRowDeleting As tbl_JobsRowChangeEventHandler
+
+ _
+ Public Event tbl_JobsRowDeleted As tbl_JobsRowChangeEventHandler
+
+ _
+ Public Overloads Sub Addtbl_JobsRow(ByVal row As tbl_JobsRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function Addtbl_JobsRow(ByVal JobTitle As String) As tbl_JobsRow
+ Dim rowtbl_JobsRow As tbl_JobsRow = CType(Me.NewRow,tbl_JobsRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, JobTitle}
+ rowtbl_JobsRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowtbl_JobsRow)
+ Return rowtbl_JobsRow
+ End Function
+
+ _
+ Public Function FindByid_Jobs(ByVal id_Jobs As Long) As tbl_JobsRow
+ Return CType(Me.Rows.Find(New Object() {id_Jobs}),tbl_JobsRow)
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As tbl_JobsDataTable = CType(MyBase.Clone,tbl_JobsDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New tbl_JobsDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnid_Jobs = MyBase.Columns("id_Jobs")
+ Me.columnJobTitle = MyBase.Columns("JobTitle")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnid_Jobs = New Global.System.Data.DataColumn("id_Jobs", GetType(Long), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnid_Jobs)
+ Me.columnJobTitle = New Global.System.Data.DataColumn("JobTitle", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnJobTitle)
+ Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnid_Jobs}, true))
+ Me.columnid_Jobs.AutoIncrement = true
+ Me.columnid_Jobs.AutoIncrementSeed = -1
+ Me.columnid_Jobs.AutoIncrementStep = -1
+ Me.columnid_Jobs.AllowDBNull = false
+ Me.columnid_Jobs.Unique = true
+ Me.columnJobTitle.MaxLength = 2147483647
+ End Sub
+
+ _
+ Public Function Newtbl_JobsRow() As tbl_JobsRow
+ Return CType(Me.NewRow,tbl_JobsRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New tbl_JobsRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(tbl_JobsRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.tbl_JobsRowChangedEvent) Is Nothing) Then
+ RaiseEvent tbl_JobsRowChanged(Me, New tbl_JobsRowChangeEvent(CType(e.Row,tbl_JobsRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.tbl_JobsRowChangingEvent) Is Nothing) Then
+ RaiseEvent tbl_JobsRowChanging(Me, New tbl_JobsRowChangeEvent(CType(e.Row,tbl_JobsRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.tbl_JobsRowDeletedEvent) Is Nothing) Then
+ RaiseEvent tbl_JobsRowDeleted(Me, New tbl_JobsRowChangeEvent(CType(e.Row,tbl_JobsRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.tbl_JobsRowDeletingEvent) Is Nothing) Then
+ RaiseEvent tbl_JobsRowDeleting(Me, New tbl_JobsRowChangeEvent(CType(e.Row,tbl_JobsRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub Removetbl_JobsRow(ByVal row As tbl_JobsRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As DS_IMDB = New DS_IMDB()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "tbl_JobsDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class tbl_MoviesDataTable
+ Inherits Global.System.Data.TypedTableBase(Of tbl_MoviesRow)
+
+ Private columnid_Movies As Global.System.Data.DataColumn
+
+ Private columnid_Categories As Global.System.Data.DataColumn
+
+ Private columnIMDBid As Global.System.Data.DataColumn
+
+ Private columnTitle As Global.System.Data.DataColumn
+
+ Private columnYear As Global.System.Data.DataColumn
+
+ Private columnRating As Global.System.Data.DataColumn
+
+ Private columnRatingUsers As Global.System.Data.DataColumn
+
+ Private columnMetaScore As Global.System.Data.DataColumn
+
+ Private columnDescription As Global.System.Data.DataColumn
+
+ Private columnLength As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "tbl_Movies"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property id_MoviesColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_Movies
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property id_CategoriesColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnid_Categories
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property IMDBidColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnIMDBid
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnTitle
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property YearColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnYear
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property RatingColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnRating
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property RatingUsersColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnRatingUsers
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property MetaScoreColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnMetaScore
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DescriptionColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnDescription
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property LengthColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnLength
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As tbl_MoviesRow
+ Get
+ Return CType(Me.Rows(index),tbl_MoviesRow)
+ End Get
+ End Property
+
+ _
+ Public Event tbl_MoviesRowChanging As tbl_MoviesRowChangeEventHandler
+
+ _
+ Public Event tbl_MoviesRowChanged As tbl_MoviesRowChangeEventHandler
+
+ _
+ Public Event tbl_MoviesRowDeleting As tbl_MoviesRowChangeEventHandler
+
+ _
+ Public Event tbl_MoviesRowDeleted As tbl_MoviesRowChangeEventHandler
+
+