Skip to content

Commit

Permalink
v21 release changes: Upgrade to CefSharp/Chrome v75. Added dark / lig…
Browse files Browse the repository at this point in the history
…ht UI theme option. Show URL at bottom when mouse hovering a link. CounterWallet login improvements. F@H Web Control loading improvements. Update the BTC blockchain explorer URL. Updated installer for CureCoin Wallet v2.0.0.2 with blockchain up to 2019-10-06.
  • Loading branch information
Hou5e committed Oct 22, 2019
1 parent f6af5ed commit b2426b5
Show file tree
Hide file tree
Showing 10 changed files with 336 additions and 252 deletions.
41 changes: 28 additions & 13 deletions Browser/DisplayOptionsDialog.Designer.vb

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

27 changes: 24 additions & 3 deletions Browser/DisplayOptionsDialog.vb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'Load the pull-down menu from the constants
Me.cbxHomepage.Items.AddRange({HpgDefault, HpgTopBottom, HpgSideBySide, HpgFoldingCoin, HpgFoldingCoinTeamStats, HpgFoldingCoinMyStats, HpgCureCoin, HpgCureCoinTeamStatsEOC, HpgMyStatsEOC, HpgFAH, HpgBlank})

'Start with the textboxes instead of the raw data that is hard to look at
'Start with the text boxes instead of the raw data that is hard to look at
chkShowRawData_CheckedChanged(Nothing, Nothing)

'Make sure the INI key/value exists
Expand Down Expand Up @@ -44,6 +44,14 @@
INI.AddSection(INI_Settings).AddKey(INI_DarkThemeUI).Value = Me.chkDarkTheme.Checked.ToString
End If

If INI.GetSection(INI_Settings).GetKey(INI_RevCWServers) IsNot Nothing Then
'Load option
Me.chkRevCWServers.Checked = CBool(INI.GetSection(INI_Settings).GetKey(INI_RevCWServers).GetValue())
Else
'Add, if it doesn't exist
INI.AddSection(INI_Settings).AddKey(INI_RevCWServers).Value = Me.chkRevCWServers.Checked.ToString
End If

'Display the INI data in the main raw data textbox
Me.txtDisplayText.Text = INI.SaveToString
Me.txtDisplayText.Select(Me.txtDisplayText.Text.Length, 0)
Expand All @@ -60,13 +68,18 @@
End Sub

Private Sub DisplayOptionsDialog_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
If INI.GetSection(INI_Settings).GetKey(INI_DarkThemeUI) IsNot Nothing Then
'Load option
Me.chkDarkTheme.Checked = CBool(INI.GetSection(INI_Settings).GetKey(INI_DarkThemeUI).GetValue())
End If

'Clear out the displayed text
Me.txtDisplayText.Text = String.Empty
End Sub

Private Sub chkShowRawData_CheckedChanged(sender As Object, e As EventArgs) Handles chkShowRawData.CheckedChanged
If Me.chkShowRawData.Checked = False Then
'Use the individual textboxes
'Use the individual text boxes
Me.SplitContainer1.Panel1Collapsed = False
Me.SplitContainer1.Panel2Collapsed = True
Me.btnSaveChanges.Visible = True
Expand All @@ -92,6 +105,9 @@
INI.AddSection(INI_Settings).AddKey(INI_ShowPanelOnMouseEnter).Value = g_bShowWebLinkPanelOnMouseEnterEvent.ToString

INI.AddSection(INI_Settings).AddKey(INI_DarkThemeUI).Value = Me.chkDarkTheme.Checked.ToString

g_bRevCWServers = Me.chkRevCWServers.Checked
INI.AddSection(INI_Settings).AddKey(INI_RevCWServers).Value = Me.chkRevCWServers.Checked.ToString
INI.Save(IniFilePath)

'Display the INI data in the main raw data textbox
Expand Down Expand Up @@ -128,9 +144,14 @@

'If any of the options are changed, then enable the Save Changes button
Private Sub chkDarkTheme_CheckedChanged(sender As Object, e As EventArgs) Handles chkDarkTheme.CheckedChanged
'Update the UI
'Update the UI immediately to preview the changes
g_Main.ThemeColorUI(Me.chkDarkTheme.Checked)

Me.btnSaveChanges.Enabled = True
End Sub

'If any of the options are changed, then enable the Save Changes button
Private Sub chkRevCWServers_CheckedChanged(sender As Object, e As EventArgs) Handles chkRevCWServers.CheckedChanged
Me.btnSaveChanges.Enabled = True
End Sub
End Class
12 changes: 6 additions & 6 deletions Browser/DisplayTextDialog.vb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Me.cbxWalletId.Text = g_Main.cbxToolsWalletId.Text
End If

'Start with the textboxes instead of the raw data that is hard to look at
'Start with the text boxes instead of the raw data that is hard to look at
chkShowRawData_CheckedChanged(Nothing, Nothing)
chkShowPW_CheckedChanged(Nothing, Nothing)

Expand All @@ -46,7 +46,7 @@

Private Sub chkShowRawData_CheckedChanged(sender As Object, e As EventArgs) Handles chkShowRawData.CheckedChanged
If Me.chkShowRawData.Checked = False Then
'Use the individual textboxes
'Use the individual text boxes
Me.SplitContainer1.Panel1Collapsed = False
Me.SplitContainer1.Panel2Collapsed = True
Me.chkShowPW.Visible = True
Expand Down Expand Up @@ -85,7 +85,7 @@

Private Sub btnSaveChanges_Click(sender As Object, e As EventArgs) Handles btnSaveChanges.Click
If Me.chkShowRawData.Checked = False Then
'Use the individual textboxes
'Use the individual text boxes
Dim DAT As New IniFile
'Build the new DAT file
If System.IO.File.Exists(DatFilePath) = True Then
Expand Down Expand Up @@ -116,7 +116,7 @@
Me.txtExtremeOverclockingId.Text = Me.txtExtremeOverclockingId.Text.Trim


'Save textboxes with DAT data for the Wallet Id...
'Save text boxes with DAT data for the Wallet Id...
DAT.AddSection(Id & Me.cbxWalletId.Text)
If Me.txtFAHUsername.Text.Length <> 0 Then
DAT.AddSection(Id & Me.cbxWalletId.Text).AddKey(DAT_FAH_Username).Value = Me.txtFAHUsername.Text
Expand Down Expand Up @@ -177,7 +177,7 @@

DAT = Nothing
Else
'Large single textbox with the Raw INI data: Set a flag to reload the textboxes so they don't get out of sync
'Large single textbox with the Raw INI data: Set a flag to reload the text boxes so they don't get out of sync
m_bRawDataSaved = True
End If

Expand Down Expand Up @@ -343,7 +343,7 @@
Me.txtDisplayText.Select(Me.txtDisplayText.Text.Length, 0)


'Load textboxes with DAT data for the Wallet Id...
'Load text boxes with DAT data for the Wallet Id...
If DAT.GetSection(Id & Me.cbxWalletId.Text).GetKey(DAT_FAH_Username) IsNot Nothing Then
Me.txtFAHUsername.Text = DAT.GetSection(Id & Me.cbxWalletId.Text).GetKey(DAT_FAH_Username).GetValue()
End If
Expand Down
8 changes: 4 additions & 4 deletions Browser/FAHSetupDialog.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Public m_bInitialInstall As Boolean = False

Private Const PATH_FAH_ALL_USER_CFG As String = "C:\ProgramData\FAHClient\config.xml"
Private Const PAUSE_FAH As String = "options idle=true open-web-control=false" 'Disabling the web control popup doesn't happen soon enough to stop it
Private Const PAUSE_FAH As String = "options idle=true open-web-control=false" 'Disabling the web control pop-up doesn't happen soon enough to stop it
Private Path_FAH_CurrentUserCfg As String = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FAHClient\config.xml")
Private m_strFAHCfgPath As String = ""

Expand Down Expand Up @@ -194,10 +194,10 @@
m_bSkipUpdating = False
CreateFAHUserName()

'Disable the OK button until settings are saved. NOTE: Pausing FAH with Telent is not Awaited above, and was undoing this on an initial install
'Disable the OK button until settings are saved. NOTE: Pausing FAH with Telnet is not Awaited above, and was undoing this on an initial install
Me.btnOK.Enabled = False

'Set for inital state
'Set for initial state
Me.SplitContainer2.SplitterWidth = 2
Me.SplitContainer1.SplitterWidth = 2

Expand Down Expand Up @@ -334,7 +334,7 @@
Me.lblErrorNote.Visible = True

Case m_regexFAH_Warning.IsMatch(Me.lblUsernamePreview.Text) = True
'This could be a warning, but it's safer to constrain the usernames to safe values, especially so the username might work in web link URLs, searches, databases, etc
'This could be a warning, but it's safer to constrain the user names to safe values, especially so the username might work in web link URLs, searches, databases, etc
Me.txtUsername.BackColor = Color.Tomato
Me.lblErrorNote.Text = "Avoid special characters that may not work"
Me.lblErrorNote.Visible = True
Expand Down
3 changes: 3 additions & 0 deletions Browser/GlobalRefs.vb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Public Module GlobalRefs
Public Const INI_Homepage As String = "Homepage"
Public Const INI_ShowPanelOnMouseEnter As String = "ShowPanelOnMouseEnter"
Public Const INI_DarkThemeUI As String = "DarkThemeUI"
Public Const INI_RevCWServers As String = "RevCWServers"

'Wallet Id specific
Public Const INI_EOC_ID As String = "ExtremeOverclockingUserId"
Expand Down Expand Up @@ -148,6 +149,8 @@ Public Module GlobalRefs
Public g_bAskDownloadLocation As Boolean = True
'Holds on to the last downloaded file path, when the download completes
Public g_strDownloadedFilePath As String = ""
'CounterWallet
Public g_bRevCWServers As Boolean = True

'Option to Show the Web Link Panel On MouseEnter Event
Public g_bShowWebLinkPanelOnMouseEnterEvent As Boolean = True
Expand Down
33 changes: 17 additions & 16 deletions Browser/Main.Designer.vb

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

3 changes: 0 additions & 3 deletions Browser/Main.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>16, 6</value>
</metadata>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>16, 6</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>28</value>
</metadata>
Expand Down
Loading

0 comments on commit b2426b5

Please sign in to comment.