Skip to content

Commit

Permalink
Fix tab order in application ID dialog, rename some controls
Browse files Browse the repository at this point in the history
  • Loading branch information
dotcomboom committed Apr 4, 2023
1 parent 0f4819d commit 4b9c254
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 57 deletions.
38 changes: 19 additions & 19 deletions Mario Kart Wii Rich Presence Redux/frmMain.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions Mario Kart Wii Rich Presence Redux/frmMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ Public Class frmMain

Private client As DiscordRpcClient

Private Async Sub WebView21_NavigationCompletedAsync(sender As Object, e As Microsoft.Web.WebView2.Core.CoreWebView2NavigationCompletedEventArgs) Handles WebView21.NavigationCompleted
TextBox3.Text = WebView21.Source.AbsoluteUri
Private Async Sub UpdateRPC() Handles webView.NavigationCompleted
TextBox3.Text = webView.Source.AbsoluteUri

'get profile url
Dim rgx As Regex = New Regex("p([0-9])+")
Dim matches = rgx.Matches(WebView21.Source.AbsoluteUri)
Dim matches = rgx.Matches(webView.Source.AbsoluteUri)
'CheckBox1.Checked = matches.Count > 0
If matches.Count > 0 Then

TextBox2.Text = WebView21.Source.AbsoluteUri
My.Settings.startUrl = WebView21.Source
TextBox2.Text = webView.Source.AbsoluteUri
My.Settings.startUrl = webView.Source

'scraping :)
' <a href="https://ct.wiimm.de/i/3459">N64 Sherbet Land (Nintendo)</a>
Dim html As String
html = Await WebView21.ExecuteScriptAsync("document.documentElement.outerHTML;")
html = Await webView.ExecuteScriptAsync("document.documentElement.outerHTML;")

' "The Html comes back with unicode character codes, other escaped characters, and
' wrapped in double quotes, so I'm using this code to clean it up for what I'm doing."
Expand Down Expand Up @@ -133,7 +133,7 @@ Public Class frmMain
End If
chkShare.Checked = My.Settings.shareBtn
txtUserURL.Text = My.Settings.startUrl.AbsoluteUri
WebView21.Source = My.Settings.startUrl
webView.Source = My.Settings.startUrl
txtAddText.Text = My.Settings.addText

useOwnApp.Checked = My.Settings.useOwnApp
Expand All @@ -145,7 +145,7 @@ Public Class frmMain
Try
client = New DiscordRpcClient(My.Settings.userAppId)
Catch ex As Exception
MsgBox(ex.Message & "\r\nUsing own application ID has been disabled.", MsgBoxStyle.Exclamation)
MsgBox(ex.Message & vbNewLine & "Using own application ID has been disabled.", MsgBoxStyle.Exclamation)
client = New DiscordRpcClient(default_app_id)
End Try
Else
Expand All @@ -171,9 +171,9 @@ Public Class frmMain
})
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnSaveUpdate.Click
Private Sub btnSaveUpdate_Click(sender As Object, e As EventArgs) Handles btnSaveUpdate.Click
My.Settings.addText = txtAddText.Text
WebView21.CoreWebView2.Navigate(txtUserURL.Text)
webView.CoreWebView2.Navigate(txtUserURL.Text)
End Sub

Private Sub lnkList_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lnkList.LinkClicked
Expand All @@ -194,7 +194,7 @@ Public Class frmMain
Me.FormBorderStyle = FormBorderStyle.Sizable
btnOpenClose.Text = "<< Retract"
End If
WebView21.Visible = Me.Tag = "expanded"
webView.Visible = Me.Tag = "expanded"
End Sub

Private Sub LinkGithub_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lnkGithub.LinkClicked
Expand All @@ -205,7 +205,7 @@ Public Class frmMain
My.Settings.shareBtn = chkShare.Checked
End Sub

Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles useOwnApp.Click
Private Sub useOwnApp_CheckedChanged(sender As Object, e As EventArgs) Handles useOwnApp.Click
If useOwnApp.Checked Then
frmOwnRPC.ClientId.Text = My.Settings.userAppId
If frmOwnRPC.ShowDialog = DialogResult.OK Then
Expand Down
53 changes: 27 additions & 26 deletions Mario Kart Wii Rich Presence Redux/frmOwnRPC.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b9c254

Please sign in to comment.