Skip to content

Commit

Permalink
DISMTools 0.4.2 Update 1 (March 2024 Update) (#109)
Browse files Browse the repository at this point in the history
* Update assembly information

* Fixed splash screen opacity issues

* Fixed exception

* Select the file we want to point to in File Explorer

* Add possible fix to freezing issue

* Don't show update recommendation on nightly versions of DT

* Add better exception handling

* Add basic computer information to error in case of an internal error

* Show more information when downloading from App Installer packages

* Added image export capabilities, and fixed some coloring and progress panel disposal issues

* Fixed exception

* Access background processes panel with a keyboard shortcut

* Begin experimental video playback implementation

* Add video playback support for tutorial videos

* Tutorial Video update - 2024/03/24

* Enhanced video player

* Add manual configurator for IE browser emulation

* Finish tutorial video panel design

* Make use of video feed from dedicated repo

* Added error handling to video functions

* Prepare backport

Fixed stupid Git merge conflict things, and some unwanted changes

* Update What's New section, and new Update System information files
  • Loading branch information
CodingWonders committed Mar 30, 2024
1 parent 4cc4ede commit 69eb63d
Show file tree
Hide file tree
Showing 34 changed files with 2,003 additions and 126 deletions.
88 changes: 88 additions & 0 deletions ApplicationEvents.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Imports Microsoft.Win32
Imports Microsoft.VisualBasic.ControlChars
Imports System.Management

Namespace My
' Los siguientes eventos están disponibles para MyApplication:
'
' Inicio: se desencadena cuando se inicia la aplicación, antes de que se cree el formulario de inicio.
' Apagado: generado después de cerrar todos los formularios de la aplicación. Este evento no se genera si la aplicación termina de forma anómala.
' UnhandledException: generado si la aplicación detecta una excepción no controlada.
' StartupNextInstance: se desencadena cuando se inicia una aplicación de instancia única y la aplicación ya está activa.
' NetworkAvailabilityChanged: se desencadena cuando la conexión de red está conectada o desconectada.
Partial Friend Class MyApplication

Private Sub Start(sender As Object, e As EventArgs) Handles Me.Startup
AddHandler Microsoft.Win32.SystemEvents.UserPreferenceChanged, AddressOf SysEvts_UserPreferenceChanged
AddHandler Microsoft.Win32.SystemEvents.DisplaySettingsChanging, AddressOf SysEvts_DisplaySettingsChanging
AddHandler Microsoft.Win32.SystemEvents.DisplaySettingsChanged, AddressOf SysEvts_DisplaySettingsChanged
End Sub

Private Sub CatchEmAll(sender As Object, e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs) Handles Me.UnhandledException
ExceptionForm.ErrorText.Text = e.Exception.ToString() & CrLf & CrLf &
"Error Message: " & e.Exception.Message & CrLf & CrLf &
"Error Code (HRESULT): " & e.Exception.HResult
Try
' Get basic information about the system. This does not include any personally identifiable information (PII) or
' serial numbers that can identify the computer this program is run on
Dim CS_Searcher As ManagementObjectSearcher = New ManagementObjectSearcher("SELECT Manufacturer, Model FROM Win32_ComputerSystem")
Dim BIOS_Searcher As ManagementObjectSearcher = New ManagementObjectSearcher("SELECT Name, Description, SMBIOSBIOSVersion FROM Win32_BIOS")
Dim Proc_Searcher As ManagementObjectSearcher = New ManagementObjectSearcher("SELECT Name, Caption, Manufacturer, Family FROM Win32_Processor")
Dim CS_Results As ManagementObjectCollection = CS_Searcher.Get()
Dim BIOS_Results As ManagementObjectCollection = BIOS_Searcher.Get()
Dim Proc_Results As ManagementObjectCollection = Proc_Searcher.Get()
ExceptionForm.ErrorText.AppendText(CrLf & CrLf &
"Machine information:" & CrLf)
For Each CS_Result As ManagementObject In CS_Results
ExceptionForm.ErrorText.AppendText(" - Computer manufacturer: " & CS_Result("Manufacturer") & CrLf &
" - Computer model: " & CS_Result("Model") & CrLf)
Next
For Each BIOS_Result As ManagementObject In BIOS_Results
ExceptionForm.ErrorText.AppendText(" - BIOS name/description: " & BIOS_Result("Name") & " " & BIOS_Result("Description") & CrLf &
" - System Management BIOS (SMBIOS) version: " & BIOS_Result("SMBIOSBIOSVersion") & CrLf & CrLf)
Next
ExceptionForm.ErrorText.AppendText("Operating system information:" & CrLf &
" - OS name: " & My.Computer.Info.OSFullName & CrLf &
" - OS version: " & My.Computer.Info.OSVersion & CrLf &
" - OS Platform: " & My.Computer.Info.OSPlatform & CrLf &
" - Is a 64-bit system? " & If(Environment.Is64BitOperatingSystem, "Yes", "No") & CrLf & CrLf &
"Processor information:" & CrLf)
For Each Proc_Result As ManagementObject In Proc_Results
ExceptionForm.ErrorText.AppendText(" - Processor name: " & Proc_Result("Name") & CrLf &
" - Processor caption: " & Proc_Result("Caption") & CrLf &
" - Processor manufacturer: " & Proc_Result("Manufacturer") & CrLf &
" - Processor family (WMI type): " & Proc_Result("Family") & CrLf &
" NOTE: refer to the following website to get the exact family type of your processor:" & CrLf &
" https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-processor" & CrLf & CrLf)
Next
ExceptionForm.ErrorText.AppendText("This information is gathered to help isolate the issue to a specific hardware or software configuration. " &
"No information that can be used to identify the user or the exact system is gathered." & CrLf & CrLf &
"If you don't want to send this information to the developers, paste the text that was copied to the clipboard in a text editor, remove this information, and copy the new text again.")
Catch ex As Exception
' Could not get basic machine information
End Try
ExceptionForm.ShowDialog()
If ExceptionForm.DialogResult = DialogResult.OK Then
e.ExitApplication = False
ElseIf ExceptionForm.DialogResult = DialogResult.Cancel Then
e.ExitApplication = True
End If
End Sub

Private Sub SysEvts_UserPreferenceChanged(sender As Object, e As Microsoft.Win32.UserPreferenceChangedEventArgs)
' Do nothing
End Sub

Private Sub SysEvts_DisplaySettingsChanged(sender As Object, e As EventArgs)
' Do nothing
End Sub

Private Sub SysEvts_DisplaySettingsChanging(sender As Object, e As EventArgs)
' Do nothing
End Sub

End Class


End Namespace

Expand Down
38 changes: 37 additions & 1 deletion DISMTools.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<Compile Include="Actions\Validation\Actions.Validation.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="ApplicationEvents.vb" />
<Compile Include="Elements\AppxPackage.vb" />
<Compile Include="Elements\Recents.vb" />
<Compile Include="Help\HelpBrowserForm.Designer.vb">
Expand All @@ -145,6 +146,12 @@
<Compile Include="Help\HelpBrowserForm.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Help\HelpVideoPlayer.Designer.vb">
<DependentUpon>HelpVideoPlayer.vb</DependentUpon>
</Compile>
<Compile Include="Help\HelpVideoPlayer.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.vb">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -191,6 +198,12 @@
<Compile Include="Panels\DoWork\ProgressPanel.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Panels\Exceptions\ExceptionForm.Designer.vb">
<DependentUpon>ExceptionForm.vb</DependentUpon>
</Compile>
<Compile Include="Panels\Exceptions\ExceptionForm.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Panels\Exe_Ops\BGProcs\BGProcsAdvSettings.Designer.vb">
<DependentUpon>BGProcsAdvSettings.vb</DependentUpon>
</Compile>
Expand Down Expand Up @@ -680,6 +693,7 @@
<Compile Include="Utilities\DT_Utils.vb" />
<Compile Include="Utilities\ImageWatcher.vb" />
<Compile Include="Utilities\PriReader.vb" />
<Compile Include="Videos\Video.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Actions\Actions.MainForm.resx">
Expand All @@ -691,6 +705,9 @@
<EmbeddedResource Include="Help\HelpBrowserForm.resx">
<DependentUpon>HelpBrowserForm.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Help\HelpVideoPlayer.resx">
<DependentUpon>HelpVideoPlayer.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.vb</DependentUpon>
</EmbeddedResource>
Expand All @@ -712,6 +729,9 @@
<EmbeddedResource Include="Panels\DoWork\ProgressPanel.resx">
<DependentUpon>ProgressPanel.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Panels\Exceptions\ExceptionForm.resx">
<DependentUpon>ExceptionForm.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Panels\Exe_Ops\BGProcs\BGProcsAdvSettings.resx">
<DependentUpon>BGProcsAdvSettings.vb</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -1022,6 +1042,7 @@
<None Include="settings.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Tools\DT_IEConfig.reg" />
</ItemGroup>
<ItemGroup>
<None Include="Panels\readme.md" />
Expand Down Expand Up @@ -1232,6 +1253,8 @@
<None Include="Resources\about\gitter_chat.png" />
<None Include="Resources\import_driver.png" />
<None Include="Resources\onedrive_exclusion.png" />
<None Include="Resources\error_32px.png" />
<None Include="Resources\video_play.png" />
<Content Include="ThemeVS2012\Resources\Dockindicator_PaneDiamond_Hotspot.png" />
<Content Include="ThemeVS2012\Resources\DockIndicator_PaneDiamond_HotspotIndex.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowBottom.png" />
Expand Down Expand Up @@ -1564,9 +1587,15 @@ IF NOT EXIST logs (
IF NOT EXIST scratch (
md scratch
)
:: Copy the Internet Explorer browser emulation registry file to the program directory
copy /y "$(SolutionDir)Tools\DT_IEConfig.reg" "DT_IEConfig.reg"
IF %25ISPREVIEW%25=="Yes" (
echo You will be running a preview release, which may not be ready for production. You may experience more bugs and less stability. Please switch to a stable release whenever possible.
)
IF NOT EXIST videos (
md videos
copy /y "$(SolutionDir)Videos\videoplay.html" "videos\videoplay_tmp.html"
)
IF %25COPY_DOCS%25=="Yes" (
echo Copying help documentation...
xcopy "$(ProjectDir)docs\*" "$(TargetDir)docs" /cehyi
Expand Down Expand Up @@ -1603,7 +1632,14 @@ IF EXIST scratch (
)
IF EXIST docs (
rd docs /s /q
)</PreBuildEvent>
)

IF EXIST videos (
rd videos /s /q
)

IF EXIST videos.xml (del videos.xml)
IF EXIST videos.xml.old (del videos.xml.old)</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
58 changes: 58 additions & 0 deletions Help/HelpVideoPlayer.Designer.vb

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

0 comments on commit 69eb63d

Please sign in to comment.