public void CopyAllFiles(IServiceMake serviceFunc) { if (m_targetPath.Length == 0) { throw (new Exception(ERR_MSG_TARGET_NOT_FONUD)); } if (!Directory.Exists(m_targetPath)) { m_targetPath = m_mainDirPath + "\\" + m_targetPath; Directory.CreateDirectory(m_mainDirPath + "\\" + m_targetPath); } else { float count = 1; foreach (string s in m_FilesList) { string temps = s; temps = temps.Contains("[") ? temps.Replace('[', '(') : temps; temps = temps.Contains("]") ? temps.Replace(']', ')') : temps; Match fileName = FILE_NAME_FORMAT.Match(temps); string src = (File.Exists(s)) ? s : (m_mainDirPath + "\\" + s); try { File.Copy(src, m_targetPath + "\\" + fileName.ToString(), true); serviceFunc.PrintResult(COPY_FILE_MSG + fileName.ToString(), (count / m_itemsCont)); } catch (System.IO.FileNotFoundException ex) { serviceFunc.PrintResult(CANT_COPY_MSG + ex.Message, (count / m_itemsCont)); } catch (System.IO.DirectoryNotFoundException ex1) { serviceFunc.PrintResult(CANT_COPY_MSG + ex1.Message, (count / m_itemsCont)); } catch (System.UnauthorizedAccessException ex2) { serviceFunc.PrintResult(CANT_COPY_MSG + ex2.Message, (count / m_itemsCont)); } catch (System.Exception ex3) { serviceFunc.PrintResult(CANT_COPY_MSG + ex3.Message, (count / m_itemsCont)); } ++count; } } }
public PlayListMaker(string filePath, string newFolderName, IServiceMake service) { m_serviceFuncs = service; CreateCore(filePath, newFolderName); }
public PlayListMaker(IServiceMake service) { m_serviceFuncs = service; }
public Amake(IServiceMake service) { }