Beispiel #1
0
 public ProjectService(ILogger <ProjectService> logger, AppDbContext context, IMapper mapper, IFilterHelper <ProjectDetailsDTO> filterHelper)
 {
     _logger       = logger ?? throw new ArgumentNullException(nameof(logger));
     _context      = context ?? throw new ArgumentNullException(nameof(context));
     _mapper       = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _filterHelper = filterHelper ?? throw new ArgumentNullException(nameof(filterHelper));
 }
Beispiel #2
0
 public TLBotProcessor(IFilterHelper filterhelper, IPlayBillDataResolver playBillResolver)
 {
     _commands.Add(new StartCommand());
     _commands.Add(new MonthCommand());
     _commands.Add(new DaysOfWeekCommand());
     _commands.Add(new PerfomanceTypesCommand());
     _commands.Add(new GetPerfomancesCommand(playBillResolver, filterhelper));
 }
Beispiel #3
0
        public override Texture Process(Painter painter, IFilterHelper helper,
                                        Texture input0 = null, Texture input1 = null,
                                        Texture input2 = null, Texture input3 = null)
        {
            BlurEffect effect = Effect as BlurEffect;

            if (_blurX == 0 && _blurY == 0)
            {
                effect.Strength = 0;
                return(base.Process(painter, helper, input0));
            }

            float   blurX      = Math.Abs(_blurX);
            float   blurY      = Math.Abs(_blurY);
            Texture outTexture = input0;
            Texture inTexture;

            effect.Direction = BlurEffect.BlurDirection.HORIZONTAL;

            while (blurX > 0)
            {
                effect.Strength = (float)Math.Min(1.0, blurX);

                blurX     -= effect.Strength;
                inTexture  = outTexture;
                outTexture = base.Process(painter, helper, inTexture);

                if (inTexture != input0)
                {
                    helper.PutTexture(inTexture);
                }
            }

            effect.Direction = BlurEffect.BlurDirection.VERTICAL;

            while (blurY > 0)
            {
                effect.Strength = (float)Math.Min(1.0, blurY);

                blurY     -= effect.Strength;
                inTexture  = outTexture;
                outTexture = base.Process(painter, helper, inTexture);

                if (inTexture != input0)
                {
                    helper.PutTexture(inTexture);
                }
            }

            return(outTexture);
        }
        /** Does the actual filter processing. This method will be called with up to four input
         *  textures and must return a new texture (acquired from the <code>helper</code>) that
         *  contains the filtered output. To to do this, it configures the FilterEffect
         *  (provided via <code>createEffect</code>) and calls its <code>render</code> method.
         *
         *  <p>In a standard filter, only <code>input0</code> will contain a texture; that's the
         *  object the filter was applied to, rendered into an appropriately sized texture.
         *  However, filters may also accept multiple textures; that's useful when you need to
         *  combine the output of several filters into one. For example, the DropShadowFilter
         *  uses a BlurFilter to create the shadow and then feeds both input and shadow texture
         *  into a CompositeFilter.</p>
         *
         *  <p>Never create or dispose any textures manually within this method; instead, get
         *  new textures from the provided helper object, and pass them to the helper when you do
         *  not need them any longer. Ownership of both input textures and returned texture
         *  lies at the caller; only temporary textures should be put into the helper.</p>
         */
        public virtual Texture Process(Painter painter, IFilterHelper helper,
                                       Texture input0 = null, Texture input1 = null,
                                       Texture input2 = null, Texture input3 = null)
        {
            Effect    effect = this.Effect;
            Texture   output = helper.GetTexture(_resolution);
            Matrix3D  projectionMatrix;
            Rectangle bounds = null;
            Texture   renderTarget;

            if (output != null) // render to texture
            {
                renderTarget     = output;
                projectionMatrix = MatrixUtil.CreatePerspectiveProjectionMatrix(0, 0,
                                                                                output.Root.Width / _resolution, output.Root.Height / _resolution);
                // OpenGL renders into textures with Y coordinates flipped :(
                projectionMatrix.Flip(output.Height);
            }
            else // render to back buffer
            {
                bounds                  = helper.TargetBounds;
                renderTarget            = (helper as FilterHelper).RenderTarget;
                projectionMatrix        = (helper as FilterHelper).ProjectionMatrix3D;
                effect.TextureSmoothing = _textureSmoothing;
            }

            painter.State.RenderTarget = renderTarget;
            painter.PrepareToDraw();
            painter.DrawCount += 1;

            input0.SetupVertexPositions(VertexData, 0, bounds);
            input0.SetupTextureCoordinates(VertexData);

            effect.Texture     = input0;
            effect.MvpMatrix3D = projectionMatrix;
            effect.UploadVertexData(VertexData);
            effect.UploadIndexData(IndexData);
            effect.Render(IndexData.NumTriangles);

            return(output);
        }
 public HomeController(IFilterHelper filterHelper, ICsvLoader csvLoader)
 {
     _filterHelper = filterHelper;
     _csvLoader    = csvLoader;
 }
Beispiel #6
0
 public GetPerfomancesCommand(IPlayBillDataResolver playBillResolver, IFilterHelper filterhelper) : base((int)DialogStep.Final)
 {
     _playBillResolver = playBillResolver;
     _filterhelper     = filterhelper;
 }
 protected BaseCrudController(TService crudDataService, IFilterHelper filterHelper)
     : base(crudDataService, filterHelper)
 {
     _crudService = crudDataService ?? throw new ArgumentNullException(nameof(crudDataService));
 }
 protected BaseRoController(TService roDataService, IFilterHelper filterHelper)
 {
     _roService    = roDataService ?? throw new ArgumentNullException(nameof(roDataService));
     _filterHelper = filterHelper ?? throw new ArgumentNullException(nameof(filterHelper));
 }
 public RoleController(IRoleRoService crudService, IFilterHelper filterHelper)
     : base(crudService, filterHelper)
 {
 }
Beispiel #10
0
 public CourseRepository(AcademyContext context, IFilterHelper filterHelper)
 {
     this._context = context;
     _filterHelper = filterHelper;
 }
 public UserDataController(IUserDataService crudDataService, IFilterHelper filterHelper)
     : base(crudDataService, filterHelper)
 {
 }
 public TestController(ITestService crudDataService, IFilterHelper filterHelper)
     : base(crudDataService, filterHelper)
 {
 }