Skip to content

Commit

Permalink
Merge pull request #7 from CodingWonders/dt_pre_2364
Browse files Browse the repository at this point in the history
DISMTools 0.3 Preview 13
  • Loading branch information
CodingWonders authored Jun 24, 2023
2 parents cc0df0e + 5c18c21 commit 1e13871
Show file tree
Hide file tree
Showing 23 changed files with 662 additions and 80 deletions.
67 changes: 53 additions & 14 deletions Actions/Actions.MainForm.Designer.vb

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

45 changes: 44 additions & 1 deletion Actions/Actions.MainForm.vb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Imports System.IO
Imports ScintillaNET
Imports System.Text.Encoding

Public Class Actions_MainForm

Public ActionFile As String

Sub InitScintilla(fntName As String, fntSize As Integer)
' Initialize Scintilla editor
Scintilla1.StyleResetDefault()
Expand Down Expand Up @@ -162,10 +165,50 @@ Public Class Actions_MainForm

Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
Scintilla1.Text = File.ReadAllText(OpenFileDialog1.FileName)
Text = "Actions - " & Path.GetFileName(OpenFileDialog1.FileName)
ActionFile = OpenFileDialog1.FileName
Text = "Actions - " & Path.GetFileName(ActionFile)
End Sub

Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click
OpenFileDialog1.ShowDialog()
End Sub

Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs) Handles ToolStripButton4.Click
If ActionFile Is Nothing Or Not File.Exists(ActionFile) Then
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
File.WriteAllText(SaveFileDialog1.FileName, Scintilla1.Text, ASCII)
ActionFile = SaveFileDialog1.FileName
End If
Else
File.WriteAllText(ActionFile, Scintilla1.Text, ASCII)
End If
Text = "Actions - " & Path.GetFileName(ActionFile)
End Sub

Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
If ActionFile Is Nothing Or Not File.Exists(ActionFile) Then
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
File.WriteAllText(SaveFileDialog1.FileName, Scintilla1.Text, ASCII)
ActionFile = SaveFileDialog1.FileName
Else
Exit Sub
End If
Text = "Actions - " & Path.GetFileName(ActionFile)
End If
ProgressPanel.ActionFile = ActionFile
ProgressPanel.ActionRunning = True
ProgressPanel.IsInValidationMode = True
WindowState = FormWindowState.Minimized
ProgressPanel.ShowDialog(MainForm)
End Sub

Private Sub Scintilla1_TextChanged(sender As Object, e As EventArgs) Handles Scintilla1.TextChanged
If ActionFile IsNot Nothing And File.Exists(ActionFile) Then
If File.ReadAllText(ActionFile).ToString() = Scintilla1.Text Then
Text = "Actions - " & Path.GetFileName(ActionFile)
Else
Text = "Actions - " & Path.GetFileName(ActionFile) & "*"
End If
End If
End Sub
End Class
45 changes: 45 additions & 0 deletions Actions/Validation/Actions.Validation.Designer.vb

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

3 changes: 3 additions & 0 deletions Actions/Validation/Actions.Validation.resx
Original file line number Diff line number Diff line change
Expand Up @@ -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="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
4 changes: 4 additions & 0 deletions Actions/Validation/Actions.Validation.vb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
Private Sub ValidationForm_Move(sender As Object, e As EventArgs) Handles MyBase.Move
Height = Screen.GetWorkingArea(Me).Height
End Sub

Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
ContextMenuStrip1.Show(sender, New Point(PictureBox1.Width / 2, PictureBox1.Height / 2))
End Sub
End Class
5 changes: 5 additions & 0 deletions DISMTools.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,9 @@
<None Include="Helpers\extps1\extappx.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Helpers\extps1\mImgMgr.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Installer\Default.isl" />
<None Include="Installer\Setup.e32" />
<None Include="Installer\SetupLdr.e32" />
Expand Down Expand Up @@ -830,6 +833,8 @@
<None Include="Resources\setting_migration.ico" />
<None Include="Resources\secprogress_classic.png" />
<None Include="Resources\secprogress_modern.png" />
<None Include="Resources\menus\menu_light.png" />
<None Include="Resources\menus\menu_dark.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
3 changes: 2 additions & 1 deletion Helpers/dthelper.bat
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ echo Ready to accept user input.
echo If you are new to the command line, or just want to know how to do a specific task, type CMDHELP (case-insensitive) to show the DISMTools Command Help (console view).
echo.
doskey pwd=cd
doskey getappxpkg=powershell "bin\extps1\extappx.ps1"
doskey getappxpkg=powershell -executionpolicy unrestricted "bin\extps1\extappx.ps1"
doskey mimgmgr=powershell -executionpolicy unrestricted "bin\extps1\mImgMgr.ps1"
if exist ".\extbatch" (
path %cd%"\extbatch";"%windir%\system32";"%windir%\system32\wbem";"%windir%\system32\WindowsPowerShell\v1.0"
) else (
Expand Down
Loading

0 comments on commit 1e13871

Please sign in to comment.