Skip to content

Commit

Permalink
Output path improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
moisespr123 committed Aug 16, 2019
1 parent 7254910 commit 12d0eba
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions PAQCompress/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
End If
End If
EnableDisableFlags()
AdjustOutputFilename()
If Not String.IsNullOrWhiteSpace(InputLocation.Text) Then AdjustOutputFilename()
My.Settings.PAQSeries = PAQSeries.SelectedItem.ToString()
My.Settings.Save()
End Sub
Expand Down Expand Up @@ -179,22 +179,26 @@
CheckCompressionLevelAndChange()
End If
EnableDisableFlags()
AdjustOutputFilename()
If Not String.IsNullOrWhiteSpace(InputLocation.Text) Then AdjustOutputFilename()
My.Settings.PAQVersion = PAQVersion.SelectedItem.ToString()
My.Settings.Save()
End Sub
Private Sub AdjustOutputFilename()
If Not String.IsNullOrWhiteSpace(OutputLocation.Text) Then
If PAQVersion.Enabled Then
If (PAQSeries.SelectedItem Is "PAQ8PX" And PAQVersion.SelectedIndex > Flags_enable) Or PAQSeries.SelectedItem Is "PAQ8PXd" Or PAQSeries.SelectedItem Is "PAQ8PXv" Then
OutputLocation.Text = IO.Path.ChangeExtension(OutputLocation.Text, PAQSeries.SelectedItem.ToString.ToLower + PAQVersion.SelectedItem.ToString().Remove(0, 1))
If CompressRButton.Checked Then
If Not String.IsNullOrWhiteSpace(OutputLocation.Text) Then
If PAQVersion.Enabled Then
If (PAQSeries.SelectedItem Is "PAQ8PX" And PAQVersion.SelectedIndex > Flags_enable) Or PAQSeries.SelectedItem Is "PAQ8PXd" Or PAQSeries.SelectedItem Is "PAQ8PXv" Then
OutputLocation.Text = IO.Path.ChangeExtension(OutputLocation.Text, PAQSeries.SelectedItem.ToString.ToLower + PAQVersion.SelectedItem.ToString().Remove(0, 1))
Else
OutputLocation.Text = IO.Path.ChangeExtension(OutputLocation.Text, "." + PAQSeries.SelectedItem.ToString.ToLower + "_" + PAQVersion.SelectedItem.ToString())
End If

Else
OutputLocation.Text = IO.Path.ChangeExtension(OutputLocation.Text, "." + PAQSeries.SelectedItem.ToString.ToLower + "_" + PAQVersion.SelectedItem.ToString())
OutputLocation.Text = IO.Path.ChangeExtension(OutputLocation.Text, "." + PAQSeries.SelectedItem.ToString.ToLower)
End If

Else
OutputLocation.Text = IO.Path.ChangeExtension(OutputLocation.Text, "." + PAQSeries.SelectedItem.ToString.ToLower)
End If
Else
OutputLocation.Text = IO.Path.GetDirectoryName(InputLocation.Text)
End If
End Sub

Expand Down Expand Up @@ -436,6 +440,7 @@
End If
End Sub
Private Sub CheckAndAdjust()
If IO.Path.GetExtension(InputLocation.Text).Contains(".paq8") Then ExtractRButton.Checked = True Else CompressRButton.Checked = True
If ExtractRButton.Checked Then
AdjustPAQVersion(IO.Path.GetFileName(InputLocation.Text))
Else
Expand Down

0 comments on commit 12d0eba

Please sign in to comment.