diff --git a/PSXRF.sln b/PSXRF.sln new file mode 100644 index 0000000..0745eb2 --- /dev/null +++ b/PSXRF.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34031.279 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PSXRFD", "PSXRFD\PSXRFD.vbproj", "{398074AB-7871-4AD9-872F-BE56DD2E6D49}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PSXRF", "PSXRF\PSXRF.vbproj", "{9457B5FC-914B-4854-94EA-733D06FBD972}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "rftest", "rftest\rftest.vbproj", "{A006C977-5441-4943-A72B-CFAC1AEEE87F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {398074AB-7871-4AD9-872F-BE56DD2E6D49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {398074AB-7871-4AD9-872F-BE56DD2E6D49}.Debug|Any CPU.Build.0 = Debug|Any CPU + {398074AB-7871-4AD9-872F-BE56DD2E6D49}.Release|Any CPU.ActiveCfg = Release|Any CPU + {398074AB-7871-4AD9-872F-BE56DD2E6D49}.Release|Any CPU.Build.0 = Release|Any CPU + {9457B5FC-914B-4854-94EA-733D06FBD972}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9457B5FC-914B-4854-94EA-733D06FBD972}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9457B5FC-914B-4854-94EA-733D06FBD972}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9457B5FC-914B-4854-94EA-733D06FBD972}.Release|Any CPU.Build.0 = Release|Any CPU + {A006C977-5441-4943-A72B-CFAC1AEEE87F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A006C977-5441-4943-A72B-CFAC1AEEE87F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A006C977-5441-4943-A72B-CFAC1AEEE87F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A006C977-5441-4943-A72B-CFAC1AEEE87F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ED036679-2D53-4D63-BACE-F9447AEEB2CA} + EndGlobalSection +EndGlobal diff --git a/PSXRF/App.config b/PSXRF/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/PSXRF/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/PSXRF/Module1.vb b/PSXRF/Module1.vb new file mode 100644 index 0000000..60f749f --- /dev/null +++ b/PSXRF/Module1.vb @@ -0,0 +1,69 @@ +Imports System.IO +Imports System.Text.RegularExpressions + +Module Module1 + Sub Main() + If My.Application.CommandLineArgs.Count < 1 Then + Console.WriteLine("Usage: PSXRF ") + Return + End If + + Dim filePath As String = My.Application.CommandLineArgs(0) + + Dim matchingString As String = IDFinder(filePath) + + ' Check if the console is empty + If Console.CursorLeft = 0 AndAlso Console.CursorTop = 0 Then + Console.WriteLine("No matching string found in the binary file.") + End If + End Sub + + Function IDFinder(filePath As String) As String + Dim result As String = Nothing + + Try + Dim pattern As String = "(SCUS|SLES|SLUS|SCPS|SCKA|SCED|SCEL|SCAS|SCAA|SCAJ|SLPS)-\d{5}" + Dim regex As New Regex(pattern) + + Using fs As New FileStream(filePath, FileMode.Open, FileAccess.Read) + Dim buffer(4096) As Byte + Dim bytesRead As Integer + Dim totalBytesRead As Long = 0 + Dim fileLength As Long = fs.Length + Dim remainingText As String = String.Empty + + Do + bytesRead = fs.Read(buffer, 0, buffer.Length) + totalBytesRead += bytesRead + + Dim text As String = remainingText & System.Text.Encoding.UTF8.GetString(buffer, 0, bytesRead) + remainingText = String.Empty + + Dim matches As MatchCollection = regex.Matches(text) + If matches.Count > 0 Then + Dim lastIndex As Integer = matches(matches.Count - 1).Index + matches(matches.Count - 1).Length + remainingText = text.Substring(lastIndex) + + For Each match As Match In matches + Dim matchValue As String = match.Value + If result Is Nothing Then + result = matchValue + Console.WriteLine($"Found: {result}") + End If + Next + End If + + If result IsNot Nothing Then + Exit Do + End If + + Loop While bytesRead > 0 + End Using + + Catch ex As Exception + Console.WriteLine("Error: " & ex.Message) + End Try + + Return result + End Function +End Module diff --git a/PSXRF/My Project/Application.Designer.vb b/PSXRF/My Project/Application.Designer.vb new file mode 100644 index 0000000..91e3aa4 --- /dev/null +++ b/PSXRF/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' Ce code a été généré par un outil. +' Version du runtime :4.0.30319.42000 +' +' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +' le code est régénéré. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/PSXRF/My Project/Application.myapp b/PSXRF/My Project/Application.myapp new file mode 100644 index 0000000..e62f1a5 --- /dev/null +++ b/PSXRF/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 2 + true + diff --git a/PSXRF/My Project/AssemblyInfo.vb b/PSXRF/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..3c5c76c --- /dev/null +++ b/PSXRF/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Les informations générales relatives à un assembly dépendent de +' l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +' associées à un assembly. + +' Vérifiez les valeurs des attributs de l'assembly + + + + + + + + + + +'Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM + + +' Les informations de version pour un assembly se composent des quatre valeurs suivantes : +' +' Version principale +' Version secondaire +' Numéro de build +' Révision +' +' Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +' en utilisant '*', comme indiqué ci-dessous : +' + + + diff --git a/PSXRF/My Project/Resources.Designer.vb b/PSXRF/My Project/Resources.Designer.vb new file mode 100644 index 0000000..393cc4d --- /dev/null +++ b/PSXRF/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' Ce code a été généré par un outil. +' Version du runtime :4.0.30319.42000 +' +' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +' le code est régénéré. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder + 'à l'aide d'un outil, tel que ResGen ou Visual Studio. + 'Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen + 'avec l'option /str ou régénérez votre projet VS. + ''' + ''' Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Retourne l'instance ResourceManager mise en cache utilisée par cette classe. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("PSXRF.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Remplace la propriété CurrentUICulture du thread actuel pour toutes + ''' les recherches de ressources à l'aide de cette classe de ressource fortement typée. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/PSXRF/My Project/Resources.resx b/PSXRF/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/PSXRF/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PSXRF/My Project/Settings.Designer.vb b/PSXRF/My Project/Settings.Designer.vb new file mode 100644 index 0000000..e766f00 --- /dev/null +++ b/PSXRF/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' Ce code a été généré par un outil. +' Version du runtime :4.0.30319.42000 +' +' Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +' le code est régénéré. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Fonctionnalité Enregistrement automatique My.Settings" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.PSXRF.My.MySettings + Get + Return Global.PSXRF.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/PSXRF/My Project/Settings.settings b/PSXRF/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/PSXRF/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/PSXRF/PSXRF.vbproj b/PSXRF/PSXRF.vbproj new file mode 100644 index 0000000..cca01ac --- /dev/null +++ b/PSXRF/PSXRF.vbproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {9457B5FC-914B-4854-94EA-733D06FBD972} + Exe + + + PSXRF + PSXRF + 512 + Console + v4.7.2 + true + true + + + AnyCPU + true + full + true + true + bin\Debug\ + PSXRF.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + PSXRF.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + True + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file diff --git a/PSXRFD/Class1.vb b/PSXRFD/Class1.vb new file mode 100644 index 0000000..6f4bd4e --- /dev/null +++ b/PSXRFD/Class1.vb @@ -0,0 +1,65 @@ +Public Class PSXRFD + Public Shared Sub Main() + If Environment.GetCommandLineArgs().Length < 2 Then + Console.WriteLine("Usage: PSXRF ") + Return + End If + + Dim filePath As String = Environment.GetCommandLineArgs()(1) + + Dim matchingString As String = IDFinder(filePath) + + If Console.CursorLeft = 0 AndAlso Console.CursorTop = 0 Then + Console.WriteLine("No matching string found in the binary file.") + End If + End Sub + + Public Shared Function IDFinder(filePath As String) As String + Dim result As String = Nothing + + Try + Dim pattern As String = "(SCUS|SLES|SLUS|SCPS|SCKA|SCED|SCEL|SCAS|SCAA|SCAJ|SLPS)-\d{5}" + Dim regex As New System.Text.RegularExpressions.Regex(pattern) + + Using fs As New IO.FileStream(filePath, IO.FileMode.Open, IO.FileAccess.Read) + Dim buffer(4096) As Byte + Dim bytesRead As Integer + Dim totalBytesRead As Long = 0 + Dim fileLength As Long = fs.Length + Dim remainingText As String = String.Empty + + Do + bytesRead = fs.Read(buffer, 0, buffer.Length) + totalBytesRead += bytesRead + + Dim text As String = remainingText & System.Text.Encoding.UTF8.GetString(buffer, 0, bytesRead) + remainingText = String.Empty + + Dim matches As System.Text.RegularExpressions.MatchCollection = regex.Matches(text) + If matches.Count > 0 Then + Dim lastIndex As Integer = matches(matches.Count - 1).Index + matches(matches.Count - 1).Length + remainingText = text.Substring(lastIndex) + + For Each match As System.Text.RegularExpressions.Match In matches + Dim matchValue As String = match.Value + If result Is Nothing Then + result = matchValue + Console.WriteLine($"Found: {result}") + End If + Next + End If + + If result IsNot Nothing Then + Exit Do + End If + + Loop While bytesRead > 0 + End Using + + Catch ex As Exception + Console.WriteLine("Error: " & ex.Message) + End Try + + Return result + End Function +End Class diff --git a/PSXRFD/My Project/Application.Designer.vb b/PSXRFD/My Project/Application.Designer.vb new file mode 100644 index 0000000..88dd01c --- /dev/null +++ b/PSXRFD/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/PSXRFD/My Project/Application.myapp b/PSXRFD/My Project/Application.myapp new file mode 100644 index 0000000..758895d --- /dev/null +++ b/PSXRFD/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/PSXRFD/My Project/AssemblyInfo.vb b/PSXRFD/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..417ce34 --- /dev/null +++ b/PSXRFD/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Les informations générales relatives à un assembly dépendent de +' l'ensemble d'attributs suivant. Pour modifier les informations +' associées à un assembly. + +' Vérifiez les valeurs des attributs de l'assembly + + + + + + + + + + +'Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM + + +' Les informations de version pour un assembly se composent des quatre valeurs suivantes : +' +' Version principale +' Version secondaire +' Numéro de build +' Révision +' +' Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +' en utilisant '*', comme indiqué ci-dessous : +' + + + diff --git a/PSXRFD/My Project/Resources.Designer.vb b/PSXRFD/My Project/Resources.Designer.vb new file mode 100644 index 0000000..fbdd4f6 --- /dev/null +++ b/PSXRFD/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("PSXRFD.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/PSXRFD/My Project/Resources.resx b/PSXRFD/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/PSXRFD/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PSXRFD/My Project/Settings.Designer.vb b/PSXRFD/My Project/Settings.Designer.vb new file mode 100644 index 0000000..7adc086 --- /dev/null +++ b/PSXRFD/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.PSXRFD.My.MySettings + Get + Return Global.PSXRFD.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/PSXRFD/My Project/Settings.settings b/PSXRFD/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/PSXRFD/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/PSXRFD/PSXRFD.vbproj b/PSXRFD/PSXRFD.vbproj new file mode 100644 index 0000000..6c3ad73 --- /dev/null +++ b/PSXRFD/PSXRFD.vbproj @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {398074AB-7871-4AD9-872F-BE56DD2E6D49} + Library + PSXRFD + PSXRFD + 512 + Windows + v4.7.2 + true + + + true + full + true + true + bin\Debug\ + PSXRFD.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + pdbonly + false + true + true + bin\Release\ + PSXRFD.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + \ No newline at end of file diff --git a/rftest/App.config b/rftest/App.config new file mode 100644 index 0000000..ffaf540 --- /dev/null +++ b/rftest/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/rftest/Form1.Designer.vb b/rftest/Form1.Designer.vb new file mode 100644 index 0000000..81aa49a --- /dev/null +++ b/rftest/Form1.Designer.vb @@ -0,0 +1,64 @@ + +Partial Class Form1 + Inherits System.Windows.Forms.Form + + 'Form remplace la méthode Dispose pour nettoyer la liste des composants. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Requise par le Concepteur Windows Form + Private components As System.ComponentModel.IContainer + + 'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form + 'Elle peut être modifiée à l'aide du Concepteur Windows Form. + 'Ne la modifiez pas à l'aide de l'éditeur de code. + + Private Sub InitializeComponent() + Me.RichTextBox1 = New System.Windows.Forms.RichTextBox() + Me.Button1 = New System.Windows.Forms.Button() + Me.SuspendLayout() + ' + 'RichTextBox1 + ' + Me.RichTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None + Me.RichTextBox1.Location = New System.Drawing.Point(12, 41) + Me.RichTextBox1.Name = "RichTextBox1" + Me.RichTextBox1.Size = New System.Drawing.Size(318, 96) + Me.RichTextBox1.TabIndex = 0 + Me.RichTextBox1.Text = "" + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(134, 12) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 1 + Me.Button1.Text = "Choose BIN" + Me.Button1.UseVisualStyleBackColor = True + ' + 'Form1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(342, 142) + Me.Controls.Add(Me.Button1) + Me.Controls.Add(Me.RichTextBox1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle + Me.MinimizeBox = False + Me.Name = "Form1" + Me.Text = "PSXRF-Test" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents RichTextBox1 As RichTextBox + Friend WithEvents Button1 As Button +End Class diff --git a/rftest/Form1.resx b/rftest/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/rftest/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/rftest/Form1.vb b/rftest/Form1.vb new file mode 100644 index 0000000..6011e35 --- /dev/null +++ b/rftest/Form1.vb @@ -0,0 +1,15 @@ +Imports PSXRFD +Public Class Form1 + Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Dim ob As New OpenFileDialog + ob.Filter = "BIN File (*.bin)|*.bin" + ob.Title = "Choose a BIN file" + If ob.ShowDialog = DialogResult.OK Then + RichTextBox1.AppendText($"{PSXRFD.PSXRFD.IDFinder(ob.FileName)}{Environment.NewLine}") + End If + End Sub +End Class diff --git a/rftest/My Project/Application.Designer.vb b/rftest/My Project/Application.Designer.vb new file mode 100644 index 0000000..407c562 --- /dev/null +++ b/rftest/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.rftest.Form1 + End Sub + End Class +End Namespace diff --git a/rftest/My Project/Application.myapp b/rftest/My Project/Application.myapp new file mode 100644 index 0000000..1243847 --- /dev/null +++ b/rftest/My Project/Application.myapp @@ -0,0 +1,11 @@ + + + true + Form1 + false + 0 + true + 0 + 0 + true + diff --git a/rftest/My Project/AssemblyInfo.vb b/rftest/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..76f23ae --- /dev/null +++ b/rftest/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Les informations générales relatives à un assembly dépendent de +' l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +' associées à un assembly. + +' Vérifiez les valeurs des attributs de l'assembly + + + + + + + + + + +'Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM + + +' Les informations de version pour un assembly se composent des quatre valeurs suivantes : +' +' Version principale +' Version secondaire +' Numéro de build +' Révision +' +' Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +' en utilisant '*', comme indiqué ci-dessous : +' + + + diff --git a/rftest/My Project/Resources.Designer.vb b/rftest/My Project/Resources.Designer.vb new file mode 100644 index 0000000..bdd4e0a --- /dev/null +++ b/rftest/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("rftest.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/rftest/My Project/Resources.resx b/rftest/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/rftest/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/rftest/My Project/Settings.Designer.vb b/rftest/My Project/Settings.Designer.vb new file mode 100644 index 0000000..8910d9e --- /dev/null +++ b/rftest/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.rftest.My.MySettings + Get + Return Global.rftest.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/rftest/My Project/Settings.settings b/rftest/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/rftest/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/rftest/rftest.vbproj b/rftest/rftest.vbproj new file mode 100644 index 0000000..8e84a4c --- /dev/null +++ b/rftest/rftest.vbproj @@ -0,0 +1,126 @@ + + + + + Debug + AnyCPU + {A006C977-5441-4943-A72B-CFAC1AEEE87F} + WinExe + rftest.My.MyApplication + rftest + rftest + 512 + WindowsForms + v4.7.2 + true + true + + + AnyCPU + true + full + true + true + bin\Debug\ + rftest.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + rftest.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + ..\..\PSXRF\PSXRFD\bin\Release\PSXRFD.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.vb + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + Form1.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file