Skip to content

Commit a790929

Browse files
authored
V1.6.1 (#13)
* Visual Studio Commit Test * Fix a weird bug that happens when switching a build while searching * Overhauled Feature Scanner, Bug Fixes in both Apps * Fixed Telerik References for Building * Typo * Files for C_Please_Change_CrashReporter.vb.md * Removed Noise from Browser Extensions * Github doesn´t Display HTML Files * Bug Fixes and better Feature Scanning * PDB Download Fixes * Fixed the Scanner not launching mach2 correctly * Fixed some Bugs while loading manual Feature Lists and starting the Feature Scanner * Fixed Typo * Fixed XML Comments and made My.Settings Version independent * Fixed Text in the Done Tab * Fixed some if not most of the Grid View flickering * Cleaned up Source Code and comments * Different approach for the flickering issue * Cleaned up Source Code
1 parent c57b695 commit a790929

27 files changed

+741
-315
lines changed

ViVeTool-GUI.FeatureScanner/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
<setting name="DebuggerPath" serializeAs="String">
2020
<value />
2121
</setting>
22+
<setting name="UseSystemTheme" serializeAs="String">
23+
<value>False</value>
24+
</setting>
25+
<setting name="DarkMode" serializeAs="String">
26+
<value>False</value>
27+
</setting>
2228
</ViVeTool_GUI.FeatureScanner.My.MySettings>
2329
</userSettings>
2430
</configuration>

ViVeTool-GUI.FeatureScanner/ApplicationEvents.vb

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,17 @@
1313
'
1414
'You should have received a copy of the GNU General Public License
1515
'along with this program. If not, see <https://www.gnu.org/licenses/>.
16-
Imports Telerik.WinControls.UI
16+
Imports System.Configuration, Telerik.WinControls.UI
1717

1818
Namespace My
19-
' Für MyApplication sind folgende Ereignisse verfügbar:
20-
' Startup: Wird beim Starten der Anwendung noch vor dem Erstellen des Startformulars ausgelöst.
21-
' Shutdown: Wird nach dem Schließen aller Anwendungsformulare ausgelöst. Dieses Ereignis wird nicht ausgelöst, wenn die Anwendung mit einem Fehler beendet wird.
22-
' UnhandledException: Wird bei einem Ausnahmefehler ausgelöst.
23-
' StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist.
24-
' NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst.
2519
Partial Friend Class MyApplication
2620
Private Sub MyApplication_Startup(sender As Object, e As ApplicationServices.StartupEventArgs) Handles Me.Startup
21+
'Transfers older My.Settings to newer ViVeTool GUI Versions if applicable.
22+
If Not ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).HasFile Then Settings.Upgrade()
23+
2724
'Load the Text Boxes
28-
ScannerUI.RTB_DbgPath.Text = My.Settings.DebuggerPath
29-
ScannerUI.RTB_SymbolPath.Text = My.Settings.SymbolPath
25+
ScannerUI.RTB_DbgPath.Text = Settings.DebuggerPath
26+
ScannerUI.RTB_SymbolPath.Text = Settings.SymbolPath
3027

3128
'Check if mach2.exe and msdia140.dll are present
3229
If IO.File.Exists(Application.Info.DirectoryPath & "\mach2.exe") = False OrElse IO.File.Exists(Application.Info.DirectoryPath & "\msdia140.dll") = False Then
@@ -40,6 +37,40 @@ Namespace My
4037
RadTaskDialog.ShowDialog(RTD)
4138
End
4239
End If
40+
41+
'Check if DynamicTheme is enabled, else Enable Dark Mode if previously turned on
42+
If Settings.UseSystemTheme Then
43+
'Set ToggleState for RTB_UseSystemTheme
44+
ScannerUI.RTB_UseSystemTheme.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On
45+
46+
'Get Registry Key Value
47+
Dim AppsUseLightTheme_CurrentUserDwordKey As Microsoft.Win32.RegistryKey = Computer.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Themes\Personalize")
48+
Dim AppsUseLightTheme_CurrentUserDwordValue As Object = AppsUseLightTheme_CurrentUserDwordKey.GetValue("SystemUsesLightTheme")
49+
50+
'If the Value is 0 then Light Mode is Disabled, if it is 1 then it is Enabled
51+
#Disable Warning BC42018
52+
If AppsUseLightTheme_CurrentUserDwordValue = 0 Then
53+
#Enable Warning BC42018
54+
ScannerUI.RTB_ThemeToggle.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On
55+
ScannerUI.RTB_ThemeToggle.Image = Resources.icons8_moon_and_stars_24
56+
Else
57+
ScannerUI.RTB_ThemeToggle.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off
58+
ScannerUI.RTB_ThemeToggle.Image = Resources.icons8_sun_24
59+
End If
60+
Else
61+
'Set ToggleState for RTB_UseSystemTheme
62+
ScannerUI.RTB_UseSystemTheme.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off
63+
64+
If Settings.DarkMode Then
65+
Telerik.WinControls.ThemeResolutionService.ApplicationThemeName = "FluentDark"
66+
ScannerUI.RTB_ThemeToggle.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On
67+
ScannerUI.RTB_ThemeToggle.Image = Resources.icons8_moon_and_stars_24
68+
Else
69+
Telerik.WinControls.ThemeResolutionService.ApplicationThemeName = "Fluent"
70+
ScannerUI.RTB_ThemeToggle.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off
71+
ScannerUI.RTB_ThemeToggle.Image = Resources.icons8_sun_24
72+
End If
73+
End If
4374
End Sub
4475
End Class
45-
End Namespace
76+
End Namespace
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Please change CrashReporter.vb yourself.
2+
3+
I do not wish to scramble my brain trying to figure out where ViVeTool GUI is crashing, before figuring out that that Crash Report came from a Git Clone or Fork.
4+
5+
## You can change the SendReport() Sub of CrashReporter.vb using one of the following **templates** as it is the only part that needs changing:
6+
7+
### Template 1: Analyze with DrDump using your own Application GUID
8+
9+
When you create a new Application in DrDump, you will automatically get an autogenerated GUID to use in your Clone/Fork. To do this you need to sign up for a [free DrDump Account](https://drdump.com/crash-reporting-system), and create an Application on DrDump.
10+
11+
The only thing you need to replace is the `YOUR GUID HERE` text with your own GUID that you got from DrDump.
12+
13+
```vbnet
14+
Private Shared Sub SendReport(exception As Exception)
15+
Dim reportCrash = New ReportCrash(Nothing) With {
16+
.AnalyzeWithDoctorDump = True,
17+
.CaptureScreen = False,
18+
.DoctorDumpSettings = New DoctorDumpSettings With {
19+
.ApplicationID = New Guid("YOUR GUID HERE")
20+
},
21+
.EmailRequired = False,
22+
.IncludeScreenshot = True,
23+
.ShowScreenshotTab = True,
24+
.DeveloperMessage = "Application Settings:" & Environment.NewLine & "AutoLoad: " & My.Settings.AutoLoad & Environment.NewLine & "Dark Mode: " & My.Settings.DarkMode & Environment.NewLine & "Use System Theme: " & My.Settings.UseSystemTheme
25+
}
26+
reportCrash.Send(exception)
27+
End Sub
28+
```
29+
30+
### Template 2: Use your own SMTP Server to send you an email when a crash occurs
31+
32+
This is similar to Template 1, although requires an SMTP Server and a bit more effort. [Source](https://github.com/ravibpatel/CrashReporter.NET#use-smtp-to-send-crash-reports-directly-to-email)
33+
34+
```vbnet
35+
Private Shared Sub SendReport(exception As Exception)
36+
Dim reportCrash = New ReportCrash(Nothing) With {
37+
.AnalyzeWithDoctorDump = False,
38+
.CaptureScreen = False,
39+
.EmailRequired = True,
40+
.IncludeScreenshot = True,
41+
.ShowScreenshotTab = True,
42+
.DeveloperMessage = "Application Settings:" & Environment.NewLine & "AutoLoad: " & My.Settings.AutoLoad & Environment.NewLine & "Dark Mode: " & My.Settings.DarkMode & Environment.NewLine & "Use System Theme: " & My.Settings.UseSystemTheme,
43+
.SmtpHost = "Your SMTP Host here",
44+
.Port = 587, 'Replace this with your SMTP Port
45+
.EnableSSL = true, 'Enable SSL if needed
46+
.UserName = "Your Email",
47+
.Password = "Your Email Password",
48+
.ToEmail = "Email Address where you want to receive crash reports",
49+
.FromEmail = "Your Email or Alias"
50+
}
51+
reportCrash.Send(exception)
52+
End Sub
53+
```
54+
55+
### Other Things to Note:
56+
57+
```vbnet
58+
.AnalyzeWithDoctorDump = True,
59+
```
60+
61+
Setting this to True will Analayse CrashRepots with DrDump and send Emails using DrDump
62+
63+
---
64+
65+
```vbnet
66+
.CaptureScreen = False,
67+
```
68+
69+
Setting this to True will Screenshot the entire Screen instead of only the Application Window. Setting it to false is recommended.
70+
71+
---
72+
73+
```vbnet
74+
.IncludeScreenshot = True,
75+
.ShowScreenshotTab = True,
76+
```
77+
78+
These will determine if a Screenshot of ViVeTool GUI should be taken.
79+
80+
Setting IncludeScreenshot to `True` will make a Screenshot of ViVeTool GUI
81+
82+
Setting ShowScreenshotTab to `True` will show the Screenshot Tab, allowing you to either send the taken Screenshot / Create one, or to not send it.
83+
84+
---
85+
86+
```vbnet
87+
.DeveloperMessage = "Application Settings:" & Environment.NewLine & "AutoLoad: " & My.Settings.AutoLoad & Environment.NewLine & "Dark Mode: " & My.Settings.DarkMode & Environment.NewLine & "Use System Theme: " & My.Settings.UseSystemTheme
88+
```
89+
90+
The DeveloperMessage will show any additional Information on the CrashDump on DrDump or in the sent Email. In this case it tells you, what application settings are currently enabled or disabled. See Image:
91+
92+
![Developer Message Image](https://github.com/PeterStrick/ViVeTool-GUI/raw/master/images/DeveloperMessage.png)
93+
94+
---
95+
96+
You can also view a sample DrDump crash Report here (HTML hosted on my external server): https://rawrr.cf/ViVeTool-GUI/SampleCrash.html

ViVeTool-GUI.FeatureScanner/CrashReporter.vb

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
Imports System.Threading, CrashReporterDotNET
1+
'ViVeTool-GUI - Windows Feature Control GUI for ViVeTool
2+
'Copyright (C) 2022 Peter Strick / Peters Software Solutions
3+
'
4+
'This program is free software: you can redistribute it and/or modify
5+
'it under the terms of the GNU General Public License as published by
6+
'the Free Software Foundation, either version 3 of the License, or
7+
'(at your option) any later version.
8+
'
9+
'This program is distributed in the hope that it will be useful,
10+
'but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
'GNU General Public License for more details.
13+
'
14+
'You should have received a copy of the GNU General Public License
15+
'along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
Imports System.Threading, CrashReporterDotNET
217

318
''' <summary>
419
''' CrashReporter.Net Helper Class
@@ -42,4 +57,4 @@ Public Class CrashReporter
4257
}
4358
reportCrash.Send(exception)
4459
End Sub
45-
End Class
60+
End Class

ViVeTool-GUI.FeatureScanner/GlobalSuppressions.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
Imports System.Diagnostics.CodeAnalysis
77

88
<Assembly: SuppressMessage("Minor Code Smell", "S1125:Boolean literals should not be redundant", Justification:="<Ausstehend>", Scope:="member", Target:="~M:ViVeTool_GUI.FeatureScanner.My.MyApplication.MyApplication_Startup(System.Object,Microsoft.VisualBasic.ApplicationServices.StartupEventArgs)")>
9-
<Assembly: SuppressMessage("Minor Code Smell", "S1075:URIs should not be hardcoded", Justification:="<Ausstehend>", Scope:="member", Target:="~M:ViVeTool_GUI.FeatureScanner.ScannerUI.RB_OA_CopyFeaturesTXT_Click(System.Object,System.EventArgs)")>
9+
<Assembly: SuppressMessage("Minor Code Smell", "S1075:URIs should not be hardcoded", Justification:="<Ausstehend>", Scope:="member", Target:="~M:ViVeTool_GUI.FeatureScanner.ScannerUI.RB_OA_CopyFeaturesTXT_Click(System.Object,System.EventArgs)")>

ViVeTool-GUI.FeatureScanner/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("1.6.0.3")>
35-
<Assembly: AssemblyFileVersion("1.6.0.3")>
34+
<Assembly: AssemblyVersion("1.6.1.0")>
35+
<Assembly: AssemblyFileVersion("1.6.1.0")>

ViVeTool-GUI.FeatureScanner/My Project/Resources.Designer.vb

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ViVeTool-GUI.FeatureScanner/My Project/Resources.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
121+
<data name="icons8_change_theme_24px" type="System.Resources.ResXFileRef, System.Windows.Forms">
122+
<value>..\..\vivetool-gui\images\icons8_change_theme_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123+
</data>
124+
<data name="icons8_moon_and_stars_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
125+
<value>..\..\vivetool-gui\images\icons8_moon_and_stars_24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126+
</data>
121127
<data name="icons8_portrait_mode_scanning_96px" type="System.Resources.ResXFileRef, System.Windows.Forms">
122128
<value>..\..\vivetool-gui\images\icons8_portrait_mode_scanning_96px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123129
</data>
130+
<data name="icons8_sun_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
131+
<value>..\..\vivetool-gui\images\icons8_sun_24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
132+
</data>
124133
</root>

ViVeTool-GUI.FeatureScanner/My Project/Settings.Designer.vb

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ViVeTool-GUI.FeatureScanner/My Project/Settings.settings

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@
88
<Setting Name="DebuggerPath" Type="System.String" Scope="User">
99
<Value Profile="(Default)" />
1010
</Setting>
11+
<Setting Name="UseSystemTheme" Type="System.Boolean" Scope="User">
12+
<Value Profile="(Default)">False</Value>
13+
</Setting>
14+
<Setting Name="DarkMode" Type="System.Boolean" Scope="User">
15+
<Value Profile="(Default)">False</Value>
16+
</Setting>
1117
</Settings>
1218
</SettingsFile>
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
Telerik.WinControls.UI.RadStatusStrip, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
2-
Telerik.WinControls.UI.RadDesktopAlert, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
3-
Telerik.WinControls.UI.RadTextBox, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
41
Telerik.WinControls.UI.RadLabel, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
5-
Telerik.WinControls.UI.RadButton, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
62
Telerik.WinControls.UI.RadPageView, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
3+
Telerik.WinControls.UI.RadDesktopAlert, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
4+
Telerik.WinControls.Themes.FluentDarkTheme, Telerik.WinControls.Themes.FluentDark, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
5+
Telerik.WinControls.UI.RadStatusStrip, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
6+
Telerik.WinControls.Themes.FluentTheme, Telerik.WinControls.Themes.Fluent, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
7+
Telerik.WinControls.UI.RadButton, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
8+
Telerik.WinControls.UI.RadToggleButton, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
9+
Telerik.WinControls.UI.RadTextBox, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e
10+
Telerik.WinControls.UI.RadGroupBox, Telerik.WinControls.UI, Version=2021.3.1109.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e

0 commit comments

Comments
 (0)