-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New features, improvements and fixes
- Loading branch information
Showing
62 changed files
with
4,971 additions
and
1,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
bin/ | ||
*.suo | ||
*.user | ||
.vs | ||
bin | ||
obj | ||
packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Imports System.Drawing | ||
Imports System.Drawing.Imaging | ||
|
||
Imports MColor = System.Windows.Media.Color | ||
Imports DColor = System.Drawing.Color | ||
|
||
Public Class ImageUtils | ||
|
||
Private Shared Function CalcColorSwap(_base As Byte, _new As Byte) As Single | ||
Return (_new - CInt(_base)) / 255.0! | ||
End Function | ||
|
||
Public Shared Function RecolorImage(inBMP As Bitmap, baseColor As MColor, newColor As MColor) As Bitmap | ||
Dim NewBitmap As New Bitmap(inBMP.Width, inBMP.Height) | ||
Dim ColorTransformation As New ColorMatrix(New Single()() { | ||
New Single() {1, 0, 0, 0, 0}, | ||
New Single() {0, 1, 0, 0, 0}, | ||
New Single() {0, 0, 1, 0, 0}, | ||
New Single() {0, 0, 0, 1, 0}, | ||
New Single() {CalcColorSwap(baseColor.R, newColor.R), CalcColorSwap(baseColor.G, newColor.G), CalcColorSwap(baseColor.B, newColor.B), 0, 1} | ||
}) | ||
|
||
Dim NewImageAttributes As New ImageAttributes() | ||
NewImageAttributes.SetColorMatrix(ColorTransformation) | ||
|
||
Using NewGraphics As Graphics = Graphics.FromImage(NewBitmap) | ||
NewGraphics.CompositingQuality = Drawing2D.CompositingQuality.HighQuality | ||
NewGraphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality | ||
NewGraphics.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic | ||
NewGraphics.DrawImage(inBMP, New Rectangle(0, 0, inBMP.Width, inBMP.Height), 0, 0, inBMP.Width, inBMP.Height, GraphicsUnit.Pixel, NewImageAttributes) | ||
End Using | ||
|
||
Return NewBitmap | ||
End Function | ||
|
||
'Converts System.Drawing.Color -> System.Windows.Media.Color | ||
Public Shared Function ToMediaColor(color As DColor) As MColor | ||
Return MColor.FromArgb(color.A, color.R, color.G, color.B) | ||
End Function | ||
|
||
End Class | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
Public Class PS1Game | ||
|
||
Private _GameTitle As String | ||
Private _GameID As String | ||
Private _GameSize As String | ||
Private _GameRegion As String | ||
Private _GameFilePath As String | ||
Private _GameFolderPath As String | ||
Private _GameCoverSource As ImageSource | ||
Private _GameGenre As String | ||
Private _GameDescription As String | ||
Private _GameReleaseDate As String | ||
Private _GamePublisher As String | ||
Private _GameDeveloper As String | ||
|
||
Public Property GameTitle As String | ||
Get | ||
Return _GameTitle | ||
End Get | ||
Set | ||
_GameTitle = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameID As String | ||
Get | ||
Return _GameID | ||
End Get | ||
Set | ||
_GameID = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameSize As String | ||
Get | ||
Return _GameSize | ||
End Get | ||
Set | ||
_GameSize = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameRegion As String | ||
Get | ||
Return _GameRegion | ||
End Get | ||
Set | ||
_GameRegion = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameFilePath As String | ||
Get | ||
Return _GameFilePath | ||
End Get | ||
Set | ||
_GameFilePath = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameFolderPath As String | ||
Get | ||
Return _GameFolderPath | ||
End Get | ||
Set | ||
_GameFolderPath = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameCoverSource As ImageSource | ||
Get | ||
Return _GameCoverSource | ||
End Get | ||
Set | ||
_GameCoverSource = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameGenre As String | ||
Get | ||
Return _GameGenre | ||
End Get | ||
Set | ||
_GameGenre = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameDeveloper As String | ||
Get | ||
Return _GameDeveloper | ||
End Get | ||
Set | ||
_GameDeveloper = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GamePublisher As String | ||
Get | ||
Return _GamePublisher | ||
End Get | ||
Set | ||
_GamePublisher = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameReleaseDate As String | ||
Get | ||
Return _GameReleaseDate | ||
End Get | ||
Set | ||
_GameReleaseDate = Value | ||
End Set | ||
End Property | ||
|
||
Public Property GameDescription As String | ||
Get | ||
Return _GameDescription | ||
End Get | ||
Set | ||
_GameDescription = Value | ||
End Set | ||
End Property | ||
|
||
Public Shared Function GetRegionChar(GameID As String) As String | ||
If GameID.StartsWith("SLES", StringComparison.OrdinalIgnoreCase) Then | ||
Return "P" | ||
ElseIf GameID.StartsWith("SCES", StringComparison.OrdinalIgnoreCase) Then | ||
Return "P" | ||
ElseIf GameID.StartsWith("SLUS", StringComparison.OrdinalIgnoreCase) Then | ||
Return "U" | ||
ElseIf GameID.StartsWith("SCUS", StringComparison.OrdinalIgnoreCase) Then | ||
Return "U" | ||
ElseIf GameID.StartsWith("SLPS", StringComparison.OrdinalIgnoreCase) Then | ||
Return "J" | ||
ElseIf GameID.StartsWith("SLPM", StringComparison.OrdinalIgnoreCase) Then | ||
Return "J" | ||
ElseIf GameID.StartsWith("SCCS", StringComparison.OrdinalIgnoreCase) Then | ||
Return "J" | ||
ElseIf GameID.StartsWith("SLKA", StringComparison.OrdinalIgnoreCase) Then | ||
Return "J" | ||
Else | ||
Return "" | ||
End If | ||
End Function | ||
|
||
End Class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
Public Class Translations | ||
|
||
Public Class TranslationRequest | ||
Private _q As String | ||
Private _source As String | ||
Private _target As String | ||
|
||
Public Property q As String | ||
Get | ||
Return _q | ||
End Get | ||
Set | ||
_q = Value | ||
End Set | ||
End Property | ||
|
||
Public Property source As String | ||
Get | ||
Return _source | ||
End Get | ||
Set | ||
_source = Value | ||
End Set | ||
End Property | ||
|
||
Public Property target As String | ||
Get | ||
Return _target | ||
End Get | ||
Set | ||
_target = Value | ||
End Set | ||
End Property | ||
End Class | ||
|
||
Public Class DetectedLanguage | ||
Private _confidence As Double | ||
Private _language As String | ||
|
||
Public Property confidence As Double | ||
Get | ||
Return _confidence | ||
End Get | ||
Set | ||
_confidence = Value | ||
End Set | ||
End Property | ||
|
||
Public Property language As String | ||
Get | ||
Return _language | ||
End Get | ||
Set | ||
_language = Value | ||
End Set | ||
End Property | ||
End Class | ||
|
||
Public Class ReceivedTranslation | ||
Private _translatedText As String | ||
Private _detectedLanguage As DetectedLanguage | ||
|
||
Public Property detectedLanguage As DetectedLanguage | ||
Get | ||
Return _detectedLanguage | ||
End Get | ||
Set | ||
_detectedLanguage = Value | ||
End Set | ||
End Property | ||
|
||
Public Property translatedText As String | ||
Get | ||
Return _translatedText | ||
End Get | ||
Set | ||
_translatedText = Value | ||
End Set | ||
End Property | ||
End Class | ||
|
||
End Class |
Oops, something went wrong.