Clean and stylecop

This commit is contained in:
Tichau committed 2016-07-10 10:09:00 +02:00
1 parent 8ebddd9f0c
commit 12c7a3b4c2
4 files changed
+29 -28

No files matched your search

@@ -86,20 +86,6 @@ namespace FileConverter.ConversionJobs
}
}
protected int CurrentOuputFilePathIndex
{
get
{
return this.currentOuputFilePathIndex;
}
set
{
this.currentOuputFilePathIndex = value;
this.NotifyPropertyChanged(nameof(this.OutputFilePath));
}
}
public ConversionState State
{
get
@@ -187,6 +173,20 @@ namespace FileConverter.ConversionJobs
private set;
}
protected int CurrentOuputFilePathIndex
{
get
{
return this.currentOuputFilePathIndex;
}
set
{
this.currentOuputFilePathIndex = value;
this.NotifyPropertyChanged(nameof(this.OutputFilePath));
}
}
protected virtual InputPostConversionAction InputPostConversionAction
{
get
@@ -13,7 +13,7 @@ namespace FileConverter.ConversionJobs
public class ConversionJob_ExtractCDA : ConversionJob
{
private Ripper.CDDrive cdDrive;
private Ripper.CDDrive diskDrive;
private int cdaTrackNumber = -1;
private WaveWriter waveWriter;
private string intermediateFilePath;
@@ -55,8 +55,8 @@ namespace FileConverter.ConversionJobs
char driveLetter = pathDriveLetter[0];
this.cdDrive = new Ripper.CDDrive();
this.cdDrive.CDRemoved += new EventHandler(this.CdDriveCdRemoved);
this.diskDrive = new Ripper.CDDrive();
this.diskDrive.CDRemoved += new EventHandler(this.CdDriveCdRemoved);
bool driveLetterFound = false;
char[] driveLetters = Ripper.CDDrive.GetCDDriveLetters();
@@ -82,13 +82,13 @@ namespace FileConverter.ConversionJobs
return;
}
if (this.cdDrive.IsOpened)
if (this.diskDrive.IsOpened)
{
this.ConversionFailed(string.Format("CD drive already used."));
return;
}
if (!this.cdDrive.Open(driveLetter))
if (!this.diskDrive.Open(driveLetter))
{
this.ConversionFailed(string.Format("Fail to open cd drive {0}.", driveLetter));
return;
@@ -116,19 +116,19 @@ namespace FileConverter.ConversionJobs
this.UserState = Properties.Resources.ConversionStateExtraction;
if (!this.cdDrive.IsCDReady())
if (!this.diskDrive.IsCDReady())
{
this.ConversionFailed(string.Format("CD drive is not ready."));
return;
}
if (!this.cdDrive.Refresh())
if (!this.diskDrive.Refresh())
{
this.ConversionFailed(string.Format("Can't refresh CD drive data."));
return;
}
if (!this.cdDrive.LockCD())
if (!this.diskDrive.LockCD())
{
this.ConversionFailed(string.Format("Can't lock cd."));
return;
@@ -137,16 +137,16 @@ namespace FileConverter.ConversionJobs
WaveFormat waveFormat = new WaveFormat(44100, 16, 2);
using (Stream waveStream = new FileStream(this.intermediateFilePath, FileMode.Create, FileAccess.Write))
using (this.waveWriter = new WaveWriter(waveStream, waveFormat, this.cdDrive.TrackSize(this.cdaTrackNumber)))
using (this.waveWriter = new WaveWriter(waveStream, waveFormat, this.diskDrive.TrackSize(this.cdaTrackNumber)))
{
this.cdDrive.ReadTrack(this.cdaTrackNumber, this.WriteWaveData, this.CdReadProgress);
this.diskDrive.ReadTrack(this.cdaTrackNumber, this.WriteWaveData, this.CdReadProgress);
}
this.waveWriter = null;
this.cdDrive.UnLockCD();
this.diskDrive.UnLockCD();
this.cdDrive.Close();
this.diskDrive.Close();
this.StateFlags = ConversionFlags.None;
@@ -179,7 +179,7 @@ namespace FileConverter.ConversionJobs
}
/// <summary>
/// Convert video quality index to libtheora video quality level.
/// Convert video quality index to lib theora video quality level.
/// </summary>
/// <param name="quality">The quality index.</param>
/// <returns>Returns the video quality index.</returns>
@@ -730,7 +730,8 @@
</Grid.RowDefinitions>
<Label Content="{x:Static project:Resources.PresetName}" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,5,0"/>
<TextBox x:Name="PresetNameTextBox" Grid.Row="0" Grid.Column="1" Margin="5,2,25,2" Text="{Binding SelectedPreset.Name, ElementName=window, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" TextWrapping="Wrap" Width="Auto" />
<TextBox x:Name="PresetNameTextBox" Grid.Row="0" Grid.Column="1" Margin="5,2,25,2" TextWrapping="Wrap" Width="Auto" FontSize="15"
Text="{Binding SelectedPreset.Name, ElementName=window, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
<GroupBox Grid.Row="1" Grid.Column="0" Header="{x:Static project:Resources.InputFormats}" Margin="5">
<Grid Margin="5">