Beispiel #1
0
        /// <summary>
        /// Recursively walks through the directory and discovers the TTS
        /// Engine DLL's in there and loads their Types into the cache
        /// </summary>
        /// <param name="dir">dir to descend into</param>
        /// <param name="culture">culture (optional) of the TTS Engine</param>
        /// <param name="resursive">true if deep-descend</param>
        private void loadTTSEngineTypesIntoCache(String dir, String culture, bool resursive = true)
        {
            DirectoryWalker walker = new DirectoryWalker(dir, "*.dll");

            _dirWalkCurrentCulture = culture;
            walker.Walk(new OnFileFoundDelegate(onFileFound));
        }
Beispiel #2
0
        /// <summary>
        /// Walks the specified directory and locates any fonts files in there
        /// and loads them
        /// </summary>
        /// <param name="directory">Root diretory to start from</param>
        /// <param name="wildCard">matching wild cards to look for</param>
        private static void loadFontsFromDir(String directory, String wildCard)
        {
            var walker = new DirectoryWalker(directory, wildCard);

            Log.Debug("Walking dir " + directory);
            walker.Walk(new OnFileFoundDelegate(onFileFound));
        }
Beispiel #3
0
        /// <summary>
        /// Walks the specified directory (rescursively)
        /// to look for files
        /// </summary>
        /// <param name="dir">Directory to walk</param>
        /// <param name="resursive">Recursively search?</param>
        private static void load(String dir, bool resursive = true)
        {
            var walker = new DirectoryWalker(dir, "*.*");

            Log.Debug("Walking dir " + dir);
            walker.Walk(new OnFileFoundDelegate(onFileFound));
        }
Beispiel #4
0
    public static void Main(string[] args)
    {
        DirectoryWalker dw = new DirectoryWalker(
            new DirectoryWalker.ProcessDirCallback(PrintDir),
            new DirectoryWalker.ProcessFileCallback(PrintFile));

        string root = ".";

        if (args.Length == 1)
        {
            root = args[0];
        }
        dw.Walk(root, "Passed string object");
    }
Beispiel #5
0
        public bool Init()
        {
            String userSkinsDir = FileUtils.GetUserSkinsDir();

            DirectoryWalker walker;

            if (Directory.Exists(userSkinsDir))
            {
                walker = new DirectoryWalker(userSkinsDir);
                walker.Walk(new OnDirectoryFoundDelegate(onDirFound));
            }

            walker = new DirectoryWalker(FileUtils.GetSkinsDir());
            walker.Walk(new OnDirectoryFoundDelegate(onDirFound));
            return(true);
        }
Beispiel #6
0
        /// <summary>
        /// Recursively walks through the directory and discovers the word
        /// predictor DLL's in there and loads their Types into the cache
        /// </summary>
        /// <param name="dir"></param>
        /// <param name="resursive"></param>
        private void loadWordPredictorsTypesIntoCache(String dir, bool resursive = true)
        {
            DirectoryWalker walker = new DirectoryWalker(dir, "*.dll");

            walker.Walk(new OnFileFoundDelegate(onFileFound));
        }
Beispiel #7
0
        private void buttonGenerate_Click(object sender, EventArgs e)
        {
            catalogList.Clear();

            DialogResult res = saveFileDialog1.ShowDialog();

            if (res != DialogResult.OK)
            {
                return;
            }

            labelStatus.Text = "Location helper code, adding in files...";
            Filename = saveFileDialog1.FileName;

            DirectoryWalker dw = new DirectoryWalker(
                new DirectoryWalker.ProcessDirCallback(PrintDir),
                new DirectoryWalker.ProcessFileCallback(PrintFile));

            dw.Walk(SelectedPath, "*.aspx,*.ascx,*.master,*.cs");

            labelStatus.Text = "POT file preparing...";
            if (catalogList.Count > 0)
            {
                GeneratePOTFile();
            }

            labelStatus.Text = "POT file generated!..";
        }
Beispiel #8
0
        /// <summary>
        /// Walks the specified directory tree
        /// </summary>
        /// <param name="path">Directory path</param>
        private void loadAgentsFromDir(String path)
        {
            var walker = new DirectoryWalker(path, "*.dll");

            walker.Walk(new OnFileFoundDelegate(onAgentDllFound));
        }
Beispiel #9
0
        /// <summary>
        /// Recursively walks through the directory and discovers the word
        /// predictor DLL's in there and loads their Types into the cache
        /// </summary>
        /// <param name="dir">root directory</param>
        private void loadSpellCheckerTypesIntoCache(String dir)
        {
            var walker = new DirectoryWalker(dir, "*.dll");

            walker.Walk(new OnFileFoundDelegate(onFileFound));
        }