added Portuguese (Portugal), Error dialog is set to foreground

added Portuguese (Portugal) #737
Error dialog is set to foreground #736
This commit is contained in:
hama3254 2023-05-04 18:48:37 +02:00
parent 412555184c
commit ffcce61e1d
10 changed files with 49 additions and 13 deletions

Binary file not shown.

View File

@ -20,6 +20,7 @@ Public Class Browser
Private Sub WebView2_CoreWebView2InitializationCompleted(sender As Object, e As CoreWebView2InitializationCompletedEventArgs) Handles WebView2.CoreWebView2InitializationCompleted
WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.crunchyroll.com/*", CoreWebView2WebResourceContext.All)
WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.funimation.com/*", CoreWebView2WebResourceContext.All)
'WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.crunchyroll.com/*", CoreWebView2WebResourceContext.All)
'WebView2.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All)

View File

@ -22,11 +22,13 @@ Partial Class ErrorDialog
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.ComboBox1 = New MetroFramework.Controls.MetroComboBox()
Me.pictureBox3 = New System.Windows.Forms.PictureBox()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.PictureBox9 = New System.Windows.Forms.PictureBox()
Me.StatusLabel = New MetroFramework.Controls.MetroLabel()
Me.Delay = New System.Windows.Forms.Timer(Me.components)
CType(Me.pictureBox3, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox3.SuspendLayout()
CType(Me.PictureBox9, System.ComponentModel.ISupportInitialize).BeginInit()
@ -50,7 +52,7 @@ Partial Class ErrorDialog
Me.pictureBox3.BackColor = System.Drawing.Color.Transparent
Me.pictureBox3.Cursor = System.Windows.Forms.Cursors.Hand
Me.pictureBox3.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_close
Me.pictureBox3.Location = New System.Drawing.Point(329, 1)
Me.pictureBox3.Location = New System.Drawing.Point(333, -3)
Me.pictureBox3.Name = "pictureBox3"
Me.pictureBox3.Size = New System.Drawing.Size(50, 40)
Me.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
@ -63,7 +65,7 @@ Partial Class ErrorDialog
Me.GroupBox3.Controls.Add(Me.PictureBox9)
Me.GroupBox3.Controls.Add(Me.StatusLabel)
Me.GroupBox3.Controls.Add(Me.ComboBox1)
Me.GroupBox3.Location = New System.Drawing.Point(13, 43)
Me.GroupBox3.Location = New System.Drawing.Point(13, 60)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(354, 203)
Me.GroupBox3.TabIndex = 38
@ -98,6 +100,10 @@ Partial Class ErrorDialog
Me.StatusLabel.Text = "Status: idle"
Me.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Delay
'
Me.Delay.Interval = 2000
'
'ErrorDialog
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -106,6 +112,7 @@ Partial Class ErrorDialog
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.pictureBox3)
Me.Name = "ErrorDialog"
Me.Text = "CRD-Dialog-Box"
CType(Me.pictureBox3, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox3.PerformLayout()
@ -119,4 +126,5 @@ Partial Class ErrorDialog
Private WithEvents PictureBox9 As PictureBox
Friend WithEvents ComboBox1 As MetroFramework.Controls.MetroComboBox
Public WithEvents StatusLabel As MetroFramework.Controls.MetroLabel
Friend WithEvents Delay As Timer
End Class

View File

@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Delay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -7,8 +7,10 @@ Public Class ErrorDialog
Private Sub Reso_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'Me.TopMost = True
Manager.Owner = Me
Me.StyleManager = Manager
pictureBox3.Image = Main.CloseImg
ComboBox1.Text = Nothing
@ -97,7 +99,7 @@ Public Class ErrorDialog
End Try
End If
Delay.Enabled = True
End Sub
Private Sub SurroundingSub()
@ -208,4 +210,16 @@ Public Class ErrorDialog
PictureBox9.Cursor = Cursors.Hand
End Sub
Private Sub Delay_Tick(sender As Object, e As EventArgs) Handles Delay.Tick
Try
Dim hwnd As IntPtr = FindWindow(Nothing, Me.Text)
SetForegroundWindow(hwnd)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
'MsgBox(Me.Text)
Delay.Enabled = False
End Sub
End Class

View File

@ -189,6 +189,7 @@ Module GetData
Loop Until Proc.HasExited Or Microsoft.VisualBasic.DateAndTime.Timer < finish
If CurlOutput = Nothing Or CBool(InStr(CurlOutput, "curl")) Then
Throw New System.Exception("Error - Getting ObjectJson data" + vbNewLine + CurlOutput)
Return Nothing

View File

@ -1485,8 +1485,10 @@ Public Class Main
ChaptersJson = Nothing
Debug.WriteLine("no Chapter data... ignoring")
End If
If ChaptersJson IsNot Nothing Then
If ChaptersJson IsNot Nothing Then
'MsgBox(ChaptersJson)
Dim StartTime As String() = ChaptersJson.Split(New String() {Chr(34) + "startTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime2 As String() = StartTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime3 As String() = StartTime2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
@ -1497,7 +1499,8 @@ Public Class Main
Next
Dim StartTime_ms As String = StartTime3(0) + StartTime4
'
Dim StartTime_int As Integer = CInt(StartTime_ms)
Dim EndTime As String() = ChaptersJson.Split(New String() {Chr(34) + "endTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EndTime2 As String() = EndTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
@ -1517,15 +1520,20 @@ Public Class Main
Dim AfterTime_ms As String = EndTime3(0) + AfterTime
Dim Metadata As String = Nothing
If CInt(CR_episode_duration_ms) < CInt(StartTime_ms) Then
'Totaly invalid...
ElseIf CInt(CR_episode_duration_ms) < CInt(EndTime_ms) And StartTime_int = 0 Then
'the answer is 42...
Debug.WriteLine("Skip Chapters, the answer is 42...")
'this is pointless
ElseIf CInt(CR_episode_duration_ms) < CInt(EndTime_ms) Then
'it's not an Intro it's an outro
Dim DeCh As Integer = CInt(StartTime_ms) - 1
Metadata = My.Resources.ffmpeg_metadata_out.Replace("[Titel]", CR_FilenName).Replace("[Start-1]", DeCh.ToString).Replace("[Start]", StartTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
Dim DeCh As Integer = StartTime_int - 1
Metadata = My.Resources.ffmpeg_metadata_out.Replace("[Start-1]", DeCh.ToString).Replace("[Start]", StartTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
Else
Metadata = My.Resources.ffmpeg_metadata.Replace("[Titel]", CR_FilenName).Replace("[Start]", StartTime_ms).Replace("[END]", EndTime_ms).Replace("[after]", AfterTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
Metadata = My.Resources.ffmpeg_metadata.Replace("[Start]", StartTime_ms).Replace("[END]", EndTime_ms).Replace("[after]", AfterTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
End If
@ -4235,9 +4243,10 @@ Public Class Main
Sub FillArray() '
LangValueEnum.Add(New NameValuePair("[ null ]", "", Nothing))
LangValueEnum.Add(New NameValuePair("Deutsch", "de-DE", Nothing))
LangValueEnum.Add(New NameValuePair("Deutsch", "de-DE", Nothing)) '
LangValueEnum.Add(New NameValuePair("English", "en-US", "en"))
LangValueEnum.Add(New NameValuePair("Português (Brasil)", "pt-BR", "pt"))
LangValueEnum.Add(New NameValuePair("Português (Portugal)", "pt-PT", Nothing))
LangValueEnum.Add(New NameValuePair("Español (LA)", "es-419", "es"))
LangValueEnum.Add(New NameValuePair("Français (France)", "fr-FR", Nothing))
LangValueEnum.Add(New NameValuePair("العربية (Arabic)", "ar-SA", Nothing))
@ -4488,6 +4497,7 @@ Public Class Main
ObjectJson = CurlAuthNew(ObjectsUrl, Loc_CR_Cookies, Auth2)
Catch ex As Exception
If CBool(InStr(ex.ToString, "Error - Getting")) Then
MsgBox("Error invalid CR respone")
Exit Sub

View File

@ -338,7 +338,6 @@ Namespace My.Resources
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die ;FFMETADATA1
'''title=[Titel]
'''
'''[CHAPTER]
'''TIMEBASE=1/1000
@ -359,7 +358,6 @@ Namespace My.Resources
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die ;FFMETADATA1
'''title=[Titel]
'''
'''[CHAPTER]
'''TIMEBASE=1/1000

View File

@ -531,7 +531,6 @@ Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how tem
</data>
<data name="ffmpeg_metadata" xml:space="preserve">
<value>;FFMETADATA1
title=[Titel]
[CHAPTER]
TIMEBASE=1/1000
@ -546,7 +545,6 @@ END=[duration_ms]</value>
</data>
<data name="ffmpeg_metadata_out" xml:space="preserve">
<value>;FFMETADATA1
title=[Titel]
[CHAPTER]
TIMEBASE=1/1000

View File

@ -239,6 +239,9 @@ Module Subfolder
End Function
Public Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As IntPtr) As IntPtr
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Module