Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine();
            Console.WriteLine();

            Console.Title = "SpotifySynchronizer by Zeczero";
            Titles titles = new Titles();

            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.BackgroundColor = ConsoleColor.Black;

            titles.GetTitle("SpotifySynchronizer ");

            Console.ForegroundColor = ConsoleColor.Blue;
            Console.BackgroundColor = ConsoleColor.Black;

            titles.GetCredits();

            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.Yellow;

            Console.Write("\tKilling Spotify ..");

            string[] spotifyPath = SyncSpotify.KillSpotifyProcess().ToArray();

            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Console.WriteLine("\tOK");

            foreach (String spotifyDir in SyncSpotify.GetToProcess())
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine($"\tProcessing {spotifyDir}..");

                String        userDir   = Path.Combine(spotifyDir, "Users");
                DirectoryInfo usersDirs = new DirectoryInfo(userDir);

                foreach (var di in usersDirs.GetDirectories("*-user"))
                {
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    Console.WriteLine($"\t --> Found user: {di.Name}");
                }
            }
            if (spotifyPath.Length == 0)
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.Write("\tStarting Spotify ..");

                SyncSpotify.TurnOnSpotify();
                Console.ForegroundColor = ConsoleColor.DarkGreen;
                Console.Write("     OK");

                Console.WriteLine("");
                Console.ForegroundColor = ConsoleColor.Magenta;
                Console.WriteLine("\tPress any key to exit ..");

                Console.ReadKey();
            }
            Console.ReadKey();
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            DvdAuthor a = new DvdAuthor();

            Titles b = new Titles(a.XmlDoc);
            Titles c = new Titles(a.XmlDoc);

            b.AddFile("/hello/world.mpg");
            b.AddFile("/hello/world/version2.mpg");

            c.AddFile("/big/buck/bunny.mpg");
            c.AddFile("/big/world/version2.mpg");

            a.AddTitle(b.GetTitle());
            a.AddTitle(c.GetTitle());

            a.Save(@"C:\Documents and Settings\Peter\Desktop\test.xml");

            Console.WriteLine("Hello World!");
        }