Skip to content

Commit

Permalink
Added Custom Speed / Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ReignStumble committed May 13, 2018
1 parent 684a49e commit f5ef921
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
<TextBox x:Name="TXT_OutputFilename" Grid.Row="1" Grid.Column="1" Height="22"></TextBox>
<TextBox x:Name="TXT_OutputDirectory" Grid.Row="2" Grid.Column="1" Height="22" Width="290" HorizontalAlignment="left" Text="ISO" ></TextBox>
<Button x:Name="BTN_OutputDirectoryBrowse" Grid.Row="2" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="Right" Content="Browse" Click="BTN_OutputDirectoryBrowse_Click" ></Button>
<ComboBox x:Name="CB_DriveLetter" Grid.Row="3" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="left">
<ComboBox x:Name="CB_DriveLetter" Grid.Row="3" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="left">

</ComboBox>
<ComboBox x:Name="CB_DriveSpeed" Grid.Row="4" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="left">
<ComboBox x:Name="CB_DriveSpeed" Grid.Row="4" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="left" SelectionChanged="CB_DriveSpeed_SelectionChanged">
<ComboBoxItem Content="4"/>
<ComboBoxItem Content="8"/>
<ComboBoxItem Content="16"/>
Expand Down
21 changes: 10 additions & 11 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public void ScanForDisk()
else
{
LBL_Status.Content = "No CD or DVD found !";

}
BTN_Search.IsEnabled = true;
}
Expand All @@ -52,7 +51,6 @@ public void BrowseFolder()
}
}


public async void StartDumping()
{
String VAR_Type = "";
Expand All @@ -62,8 +60,6 @@ public async void StartDumping()
String VAR_OutputFilename = TXT_OutputFilename.Text;
String VAR_DriveSpeed = CB_DriveSpeed.Text;
Boolean VAR_IsPSX = false;


BTN_Start.IsEnabled = false;

switch (Convert.ToString(CB_DiscType.Text))
Expand Down Expand Up @@ -199,7 +195,6 @@ public async void StartDumping()
break;
}


await Task.Run(
() =>
{
Expand All @@ -223,16 +218,11 @@ await Task.Run(
writetext.WriteLine("psxt001z" + " " + "\""+ VAR_OutputDirectory + VAR_OutputFilename + " (Track 01).bin" + "\" > " + "\"" + VAR_OutputDirectory + "psxt001z3.txt");
writetext.WriteLine("psxt001z" + " " + "--libcrypt " + "\"" + VAR_OutputDirectory + VAR_OutputFilename + ".sub\" > " + "\"" + VAR_OutputDirectory + "libcrypt.txt");
writetext.WriteLine("psxt001z" + " " + "--libcryptdrvfast " + VAR_DriveLetter + " > " + "\"" + VAR_OutputDirectory + "libcryptdrv.log");

}


Process processpsx = new Process();
processpsx.StartInfo.FileName = "PSX.bat";
processpsx.Start();
processpsx.WaitForExit();


}
BTN_Start.IsEnabled = true;

Expand All @@ -254,7 +244,6 @@ private void BTN_OutputDirectoryBrowse_Click(object sender, RoutedEventArgs e)
BrowseFolder();
}


private void BTN_Search_Click(object sender, RoutedEventArgs e)
{
ScanForDisk();
Expand All @@ -264,5 +253,15 @@ private void CB_DiscType_SelectionChanged(object sender, System.Windows.Controls
{
LBL_Status.Content = "Ready to dump";
}

private void CB_DriveSpeed_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
if (CB_DriveSpeed.SelectedIndex == 4)
{
CB_DriveSpeed.Items.Clear();
CB_DriveSpeed.IsEditable = true;

}
}
}
}

0 comments on commit f5ef921

Please sign in to comment.