public ChangeParameterSelectionAction( IFractalContext context, Expression <Func <IFractalContext, T> > targetPropertyExpression, T newValue) { this.context = context; this.targetProperty = ResolveTargetProperty(targetPropertyExpression); this.newValue = newValue; }
public ConsoleRenderer( IAlgorithmRegistry algorithmRegistry, IShaderRegistry shaderRegistry, IFractalContextFactory contextFactory, IScreen screen) { this.context = contextFactory.Create(screen); // TODO: make configurable this.context.CurrentAlgorithm = algorithmRegistry.GetAll().First(r => r.ToString().StartsWith("Mandel")); this.context.CurrentShader = shaderRegistry.GetAll().First(); this.context.MaxIterations = 1500; }
public Form1( IAlgorithmRegistry algorithmRegistry, IShaderRegistry shaderRegistry, IFractalContextFactory contextFactory, IUndoStack undoStack, IParameterActionFactory parameterActionFactory) { this.InitializeComponent(); this.algorithmRegistry = algorithmRegistry; this.shaderRegistry = shaderRegistry; this.undoStack = undoStack; this.parameterActionFactory = parameterActionFactory; this.undoStack.StackChanged += this.OnUndoSackChanged; this.context = contextFactory.Create(this.Screen); this.context.StatusChanged += this.OnStatusChanged; this.InitializeOptions(); }
public ZoomInAction(IFractalContext context, Rectangle <int> selection) { this.context = context; this.selection = selection; }
public IAction CreateChangeAlgorithmAction(IFractalContext context, IFractalAlgorithm algorithm) { return(new ChangeParameterSelectionAction <IFractalAlgorithm>(context, c => c.CurrentAlgorithm, algorithm)); }
public IAction CreateChangeIterationsAction(IFractalContext context, int iterations) { return(new ChangeParameterSelectionAction <int>(context, c => c.MaxIterations, iterations)); }
public IAction CreateChangeShaderAction(IFractalContext context, IShader shader) { return(new ChangeParameterSelectionAction <IShader>(context, c => c.CurrentShader, shader)); }
public DrawAction(IFractalContext context) { this.context = context; }