private void NavigatorOnFileAdded( FileInfo fi )
{
try
{
if (IsFileInSourceFolder( fi ))
{
var property = cmbSourceTypes.SelectedValue as string;
if (property == null) throw new Exception( "No Selected Source Item" );
var sourceFileExtensions = ATMLContext.GetProperty( property ) as string;
if (sourceFileExtensions == null)
throw new Exception( string.Format( "Failed to find property [{0}]", property ) );
if (sourceFileExtensions.Contains( fi.Extension ))
{
if (!HasFileInBuildList( fi ))
{
var si = new TranslationSourceInfo( fi.Name );
_sourceFiles.Add( si );
//SaveProjectInfo();
SetButtonStates();
_bindingSource.ResetBindings( false );
}
}
}
}
catch (Exception err)
{
LogManager.SourceError( ATMLTranslator.SOURCE, err );
}
}