Skip to content

Commit b90dcae

Browse files
committed
Greaseweazle flux export: UI, validation, workflow overhaul
Major improvements to the Greaseweazle "Read Disk" dialog for flux image output: - Added separate root folder, folder name, and prefix fields for better organization of flux sets. - New Vista-style folder picker for modern Windows experience. - Toggle Sequence Token button (and Alt+S shortcut) for easy insertion/removal of number tokens in file/folder/prefix fields. - Robust validation for file and folder names, including reserved device names and Windows path rules, with error messages. - Refactored filename/path sanitization and placeholder handling. - Image format combo now displays "(Double-step)" when appropriate. - Revs (number of revolutions) are cached separately for flux/non-flux output. - UI layout and control visibility dynamically adapts to output type. - Warning label replaced with color-coded image format label. - Resource strings and project file updated; version bumped to 2.38.0. These changes greatly improve usability, error prevention, and flexibility for flux image export.
1 parent cb92b70 commit b90dcae

File tree

12 files changed

+1026
-144
lines changed

12 files changed

+1026
-144
lines changed

DiskImageTool/DiskImage/Modules/FloppyDiskFunctions.vb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@
674674
Me.FileExtension = FileExtension
675675
Me.DriveType = DriveType
676676
Me.Detected = False
677+
Me.Doublestep = False
677678
End Sub
678679

679680
Public ReadOnly Property BitRateKbps As UShort
@@ -770,6 +771,10 @@
770771
D &= $" ({Sides}, {Density})"
771772
End If
772773

774+
If Me.Doublestep Then
775+
D &= " (Double-step)"
776+
End If
777+
773778
If Me.Detected Then
774779
D &= " *"
775780
End If
@@ -779,6 +784,7 @@
779784
End Property
780785

781786
Public Property Detected As Boolean
787+
Public Property Doublestep As Boolean
782788
Public ReadOnly Property FileExtension As String
783789
Public ReadOnly Property Format As FloppyDiskFormat
784790
Public ReadOnly Property Gaps As FloppyDiskGaps

DiskImageTool/DiskImageTool.vbproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<TargetCulture>en-US</TargetCulture>
3131
<ProductName>DiskImageTool</ProductName>
3232
<PublisherName>Digitoxin</PublisherName>
33-
<ApplicationRevision>2</ApplicationRevision>
34-
<ApplicationVersion>2.37.0.%2a</ApplicationVersion>
33+
<ApplicationRevision>0</ApplicationRevision>
34+
<ApplicationVersion>2.38.0.%2a</ApplicationVersion>
3535
<UseApplicationTrust>false</UseApplicationTrust>
3636
<PublishWizardCompleted>true</PublishWizardCompleted>
3737
<BootstrapperEnabled>true</BootstrapperEnabled>
@@ -219,6 +219,7 @@
219219
<Compile Include="ImageFormats\TD0\TD0SectorHeader.vb" />
220220
<Compile Include="ImageFormats\TD0\TD0Track.vb" />
221221
<Compile Include="ImageFormats\TD0\TD0TrackHeader.vb" />
222+
<Compile Include="Lib\VistaFolderPicker.vb" />
222223
<Compile Include="Modules\Dialogs.vb" />
223224
<Compile Include="Modules\FileIO.vb" />
224225
<Compile Include="Modules\XMLDump.vb" />
@@ -855,6 +856,7 @@
855856
</ItemGroup>
856857
<ItemGroup>
857858
<Folder Include="Flux\Kryoflux\Forms\" />
859+
<Folder Include="ImageFormats\DMK\" />
858860
</ItemGroup>
859861
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
860862
<PropertyGroup>

DiskImageTool/Flux/Forms/ConvertImageForm.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ Namespace Flux
917917
ClearStatusBar()
918918
End If
919919
Dim ImageFormat = ReadImageFormat()
920-
PopulateImageFormats(ComboImageFormat, ImageFormat, ImageFormat, False)
920+
PopulateImageFormats(ComboImageFormat, ImageFormat, ImageFormat, False, False)
921921
PopulateOutputTypes()
922922
PopulateFileExtensions()
923923
RefreshButtonState()
@@ -1545,7 +1545,7 @@ Namespace Flux
15451545

15461546
Private Sub TextBoxFileName_Validating(sender As Object, e As CancelEventArgs) Handles TextBoxFileName.Validating
15471547
Dim tb As TextBox = DirectCast(sender, TextBox)
1548-
tb.Text = SanitizeFileName(tb.Text)
1548+
tb.Text = SanitizeFileName(tb.Text, False)
15491549
RefreshImportButtonState()
15501550
End Sub
15511551

0 commit comments

Comments
 (0)