- mysql.chm.zip
- MySQL.chm
- bse.platten_en.zip
- BSE.Platten
- BSE.CoverFlow.WPFLib
- BSE.Platten.Admin.WinApp
- BSE.Platten.Admin
- BSE.Platten.Audio
- BSE.Platten.BO
- BSE.Platten.Common
- BSE.Platten.Covers
- BSE.Platten.FreeDb
- BSE.Platten.Ripper
- BSE.Platten.sln
- BSE.Platten.Statistik
- BSE.Platten.Tunes
- BSEadminSetup
- BSEadminSetup.vdproj
- Debug
- Release
- BSEtunesSetup
- BSEtunesSetup.vdproj
- Debug
- Release
- dll
- BSE.CDDrives.DLL
- BSE.Charts.DLL
- BSE.Configuration.DLL
- BSE.RemovableDrives.DLL
- BSE.Shell.DLL
- BSE.ThreadedShell.DLL
- BSE.Windows.Forms.DLL
- Lame
- lame_enc.dll
- lame-3.97
- mysqlcreatedatabase5x.sql.zip
- BSE.Platten.zip
|
using System;
using System.IO;
using System.Windows.Forms;
using BSE.Platten.BO;
using BSE.Platten.Common;
namespace BSE.Platten.Audio
{
/// <summary>
/// Summary description for CReadDirectories.
/// </summary>
/// <remarks></remarks>
/// <copyright>Copyright � 2005 MCH Messe Schweiz (Basel) AG</copyright>
public class ReadDirectories : ReadDirectoriesAndFiles
{
#region FieldsPrivate
private string m_strSearchPattern;
#endregion
#region MethodsPublic
/// <summary>
/// default constructor of the CReadDirectories class.
/// </summary>
public ReadDirectories(IWin32Window owner, string strSearchPattern, System.IO.DirectoryInfo directoryInfo)
: base(owner, directoryInfo)
{
this.m_strSearchPattern = strSearchPattern;
base.DirectoryInfo = directoryInfo;
base.Thread =
new System.Threading.Thread(
new System.Threading.ThreadStart(this.GetDirectories));
base.Thread.Start();
}
#endregion
#region MethodsPrivate
private void GetDirectories()
{
DirectoryInfo directory = new DirectoryInfo(base.DirectoryInfo.FullName);
if (directory.Exists == true)
{
bool bNewFolder = true;
try
{
FileInfo[] fileInfos = null;
if (string.IsNullOrEmpty(this.m_strSearchPattern) == true)
{
fileInfos = directory.GetFiles();
}
else
{
fileInfos = directory.GetFiles(this.m_strSearchPattern);
}
foreach (System.IO.FileInfo fileInfo in fileInfos)
{
System.Threading.Thread.Sleep(20);
if (bNewFolder == true)
{
OnReadDirectory(new ReadDirectoriesEventArgs(directory));
if ((string.Compare(fileInfo.Extension.ToLower(),AudioformatExtensions.Mp3) == 0) ||
(string.Compare(fileInfo.Extension.ToLower(),AudioformatExtensions.Wma) == 0))
{
OnFoundDirectory(new ReadDirectoriesEventArgs(directory));
bNewFolder = false;
break;
}
}
}
foreach (System.IO.DirectoryInfo subdirectory in directory.GetDirectories())
{
base.DirectoryInfo = subdirectory;
GetDirectories();
}
}
catch(Exception exception)
{
if (base.Thread.ThreadState != System.Threading.ThreadState.AbortRequested)
{
if (GlobalizedMessageBox.Show(base.Owner, exception.Message, MessageBoxButtons.OK, MessageBoxIcon.Error) == DialogResult.OK)
{
base.Thread.Abort();
}
}
}
}
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.