public void Open(object parameter)
{
if (!Completed || State != DownloadState.Ok)
throw new InvalidOperationException();
try
{
bool isFolder = Directory.Exists(_downloadInfo.Path);
if (!isFolder && !String.IsNullOrEmpty(Properties.Settings.Default.ReaderPath))
{
System.Diagnostics.Process.Start(Properties.Settings.Default.ReaderPath, ProcessHelper.EscapeArguments(_downloadInfo.Path));
}
else
{
System.Diagnostics.Process.Start(_downloadInfo.Path);
}
}
catch (Exception ex)
{
_log.Error("Unable to open downloaded chapter.", ex);
}
}