Example #1
0
        public static void Processor()
        {
            Console.Title = "DIVA Converter";
            Main.Choose(1, "diva", out string[] FileNames);

            DIVA DIVA;

            foreach (string file in FileNames)
            {
                try
                {
                    string filepath = file.Replace(Path.GetExtension(file), "");
                    string ext      = Path.GetExtension(file);
                    Console.Title = "DIVA Converter: " + Path.GetFileNameWithoutExtension(file);
                    DIVA          = new DIVA(filepath);
                    switch (ext.ToLower())
                    {
                    case ".diva":
                        DIVA.DIVAReader();
                        break;

                    case ".wav":
                        DIVA.DIVAWriter();
                        break;
                    }
                    GC.Collect();
                }
                catch (Exception e) { Console.WriteLine(e.Message); }
            }
        }
Example #2
0
        public static void Processor()
        {
            Console.Title = "DIVA Converter";
            Main.Choose(1, "diva", out string[] FileNames);
            if (FileNames.Length < 1)
            {
                return;
            }
            string filepath = "";
            string ext      = "";

            DIVA DIVA;

            foreach (string file in FileNames)
            {
                DIVA     = new DIVA();
                ext      = Path.GetExtension(file);
                filepath = file.Replace(ext, "");
                ext      = ext.ToLower();

                Console.Title = "DIVA Converter: " + Path.GetFileNameWithoutExtension(file);
                if (ext == ".diva")
                {
                    DIVA.DIVAReader(filepath);
                }
                else if (ext == ".wav")
                {
                    DIVA.DIVAWriter(filepath);
                }
                DIVA = null;
            }
        }
Example #3
0
        public static void Processor()
        {
            Console.Title = "DIVA Converter";
            Program.Choose(1, "diva", out string[] fileNames);
            if (fileNames.Length < 1)
            {
                return;
            }

            string filepath, ext;
            DIVA   diva;

            foreach (string file in fileNames)
            {
                diva     = new DIVA();
                filepath = Path.RemoveExtension(file);
                ext      = Path.GetExtension(file).ToLower();

                Console.Title = "DIVA Converter: " + Path.GetFileNameWithoutExtension(file);
                if (ext == ".diva")
                {
                    diva.DIVAReader(filepath);
                }
                else if (ext == ".wav")
                {
                    diva.DIVAWriter(filepath);
                }
                diva = null;
            }
        }