Skip to content

Commit ea18ebd

Browse files
committed
-Improvement- Export frame, frames, and audo will now all open the folder with the resulting files
1 parent 1644b0b commit ea18ebd

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

SimpleVideoEditor/MainForm.vb

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,7 @@ Public Class MainForm
15411541
sfdExportFrame.OverwritePrompt = True
15421542
Select Case sfdExportFrame.ShowDialog()
15431543
Case DialogResult.OK
1544+
Dim chosenName As String = sfdExportFrame.FileName
15441545
Task.Run(Sub()
15451546
Me.Invoke(Sub()
15461547
Me.UseWaitCursor = True
@@ -1549,13 +1550,17 @@ Public Class MainForm
15491550
pgbOperationProgress.Value = pgbOperationProgress.Minimum
15501551
pgbOperationProgress.Visible = True
15511552
End Sub)
1552-
If File.Exists(sfdExportFrame.FileName) Then
1553-
My.Computer.FileSystem.DeleteFile(sfdExportFrame.FileName)
1553+
If File.Exists(chosenName) Then
1554+
My.Computer.FileSystem.DeleteFile(chosenName)
15541555
End If
1555-
mobjMetaData.ExportFfmpegFrames(mintCurrentFrame, mintCurrentFrame, sfdExportFrame.FileName, Me.CropRect, mobjOutputProperties.Rotation)
1556+
mobjMetaData.ExportFfmpegFrames(mintCurrentFrame, mintCurrentFrame, chosenName, Me.CropRect, mobjOutputProperties.Rotation)
15561557
Me.Invoke(Sub()
15571558
Me.UseWaitCursor = False
15581559
End Sub)
1560+
If File.Exists(chosenName) Then
1561+
'Show file location of saved file
1562+
OpenOrFocusFile(chosenName)
1563+
End If
15591564
End Sub)
15601565
Case Else
15611566
'Do nothing
@@ -1577,6 +1582,7 @@ Public Class MainForm
15771582
sfdExportFrame.OverwritePrompt = True
15781583
Select Case sfdExportFrame.ShowDialog()
15791584
Case DialogResult.OK
1585+
Dim chosenName As String = sfdExportFrame.FileName
15801586
Task.Run(Sub()
15811587
Me.Invoke(Sub()
15821588
Me.UseWaitCursor = True
@@ -1585,16 +1591,21 @@ Public Class MainForm
15851591
pgbOperationProgress.Value = pgbOperationProgress.Minimum
15861592
pgbOperationProgress.Visible = True
15871593
End Sub)
1588-
Dim chosenName As String = sfdExportFrame.FileName
1594+
15891595
If chosenName.Contains("#") Then
15901596
chosenName = chosenName.Replace("#", "%03d")
15911597
Else
15921598
chosenName = Path.Combine({Path.GetDirectoryName(chosenName), Path.GetFileNameWithoutExtension(chosenName), "%03d", ".png"})
15931599
End If
1600+
Dim firstFrame As String = Regex.Replace(chosenName, "%03d", "001")
15941601
mobjMetaData.ExportFfmpegFrames(startFrame, endFrame, chosenName, Me.CropRect, mobjOutputProperties.Rotation)
15951602
Me.Invoke(Sub()
15961603
Me.UseWaitCursor = False
15971604
End Sub)
1605+
If File.Exists(firstFrame) Then
1606+
'Show file location of saved file
1607+
OpenOrFocusFile(firstFrame)
1608+
End If
15981609
End Sub)
15991610
Case Else
16001611
'Do nothing
@@ -1764,6 +1775,10 @@ Public Class MainForm
17641775
My.Computer.FileSystem.DeleteFile(sfdExportAudio.FileName)
17651776
End If
17661777
mobjMetaData.ExportFfmpegAudioStream(sfdExportAudio.FileName, detectedStreamExtension)
1778+
If File.Exists(sfdExportAudio.FileName) Then
1779+
'Show file location of saved file
1780+
OpenOrFocusFile(sfdExportAudio.FileName)
1781+
End If
17671782
Case Else
17681783
'Do nothing
17691784
End Select

SimpleVideoEditor/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.1.0.72")>
35-
<Assembly: AssemblyFileVersion("1.1.0.72")>
34+
<Assembly: AssemblyVersion("1.1.0.73")>
35+
<Assembly: AssemblyFileVersion("1.1.0.73")>

0 commit comments

Comments
 (0)