Beispiel #1
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Console.WriteLine("Usage: StbImageSharp.Viewer <path_to_image_file>");
                return;
            }

            try
            {
                using (var game = new ViewerGame(args[0]))
                    game.Run();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Console.WriteLine("Usage: StbImageSharp.Viewer <path_to_image_file> [-animated-gif]");
                return;
            }

            try
            {
                var isAnimatedGif = false;
                if (args.Length > 1 && args[1] == "-animated-gif")
                {
                    isAnimatedGif = true;
                }

                using (var game = new ViewerGame(args[0], isAnimatedGif))
                    game.Run();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }