public ConfigureLedMappingPresenter(IConfigureLedMappingView view, int xPixels, int yPixels, List <PixelInfo> initialPixelMappings = null)
        {
            this.view      = view;
            this.xPixels   = xPixels;
            this.yPixels   = yPixels;
            patternService = new PatternCreationService();

            canDraw = false;

            if (initialPixelMappings != null)
            {
                pixelMappings = initialPixelMappings;
            }
            else
            {
                InitializeMappings(null, null);
            }

            this.view.ReadyToDraw          += EnableDraw;
            this.view.StopDrawing          += DisableDraw;
            this.view.MousePositionChanged += DetermineMapping;
            this.view.Undo    += Undo;
            this.view.Clear   += InitializeMappings;
            this.view.Confirm += (s, a) =>
            {
                FinishPresenting(pixelMappings);
            };
        }
Beispiel #2
0
        public VideoPlayer(LedConfiguration configuration, IPatternCreationService patternCreationService, IVideoMetadataService videoMetadataService)
        {
            this.configuration          = configuration;
            this.patternCreationService = patternCreationService;
            this.videoMetadataService   = videoMetadataService;
            videoQueuer = new VideoQueuer(configuration, videoMetadataService);

            DisconnectedHost += (s, args) =>
            {
            };

            ConnectedHost += (s, args) =>
            {
            };
        }