Пример #1
0
        private OpenVideoResult InstanciateGenerator(string filePath)
        {
            OpenVideoResult res       = OpenVideoResult.NotSupported;
            string          extension = Path.GetExtension(filePath).ToLower();

            switch (extension)
            {
            case ".jpg":
            case ".jpeg":
            case ".png":
            case ".bmp":
            {
                generator = new FrameGeneratorImageFile();
                break;
            }

            default:
                throw new NotImplementedException();
            }

            if (generator != null)
            {
                res         = generator.Initialize(filePath);
                initialized = res == OpenVideoResult.Success;
            }
            return(res);
        }
        private OpenVideoResult InstanciateGenerator(SyntheticVideo video)
        {
            OpenVideoResult res = OpenVideoResult.NotSupported;

            generator   = new FrameGeneratorSyntheticVideo(video);
            res         = generator.Initialize(null);
            initialized = res == OpenVideoResult.Success;
            return(res);
        }
Пример #3
0
        private OpenVideoResult InstanciateGenerator(string filePath)
        {
            OpenVideoResult res       = OpenVideoResult.NotSupported;
            string          extension = Path.GetExtension(filePath).ToLower();

            if (extension != ".svg")
            {
                throw new NotImplementedException();
            }

            generator   = new FrameGeneratorSVG();
            res         = generator.Initialize(filePath);
            initialized = res == OpenVideoResult.Success;
            return(res);
        }
Пример #4
0
 public Game(int maxFrames, int maxPins)
 {
     _frameGeneratorService = new FrameGeneratorService(maxFrames, maxPins);
     _maxPins = maxPins;
 }