I wrote an article about V1.0 last week. Later I found several problems and changed it to V1.1. The main problems are as follows: Download the entire project.
1. In V1.0, the lyrics file is directly overwritten. If there is no backup, it will be miserable. The target path is added here. If not selected, the original file is overwritten by default.
2. Some files cannot be processed during usage in V1.0. That is, an exception occurs. If no processing is done, no tracing is available. The logging function is added here.
3. A Bug in V1.0. When filtering the lyrics, this row will not exist because it is recorded in the ArrayList. Therefore, the number of loops is --, otherwise, some rows that meet the deletion conditions cannot be deleted.
After modification, the main interface is as follows:
The modified filter class is as follows:
Code
Public class Filter
{
Private ArrayList content = new ArrayList ();
Private FileIO fileio = new FileIO ();
Private string [] patterns;
Public void ReadFile (string path)
{
Content. Clear ();
Fileio. OpenReadFile (path );
While (! Fileio. IsEof ())
{
Content. Add (fileio. ReadLine ());
}
Fileio. CloseReadFile ();
}
Public void Process (string path)
{
ReadFile (path );
FileFilter ();
If (Manager. objectpath = "")
{
WriteFile (path );
}
Else
{
WriteFile (Manager. objectpath + "\" + path. Substring (path. LastIndexOf ("\") + 1 ));
}
}
Public void FileFilter ()
{
Patterns = Manager. patterns;
For (int I = 0; I <content. Count; I ++)
{
For (int j = 0; j <patterns. Length; j ++)
{
If (content [I]. ToString (). Contains (patterns [j])
{
Content. RemoveAt (I );
I --;
Break;
}
}
}
}
Public void WriteFile (string path)
{
Fileio. OpenWriteFile (path );
Foreach (string str in content)
{
Fileio. WriteLine (str. ToString ());
}
Fileio. CloseWriteFile ();
}
}
:/Files/yueyue_effecfm/lrcopv1.1.rar
Finally, I recommended my company's somusic software to everyone. I thought it was good to use it.
Somusic is a powerful music Voice Search software and music player software. It supports singing search, music radar, voice search, and other functions. It also supports PC/mobile phone local search and player functions.
On the basis of Version 2.0, version 1.0 fixes some bugs and enhances the library.
With this software, you can easily find a song that you don't remember and download it.
:/Files/yueyue_effecfm/SoPlayerS60V2.rar