public override void Init() { base.Init(); if (matricies == null) { // Set Matrix Set matricies = new EmitterMatricies(); matricies.Init(); } if (targetController == null) { targetController = new TargetController(); } if (emitterController == null) { emitterController = new EmitterController(); } if (reflectorController == null) { reflectorController = new ReflectorController(); } if (boxController == null) { boxController = new BoxController(); } InitScenePuzzle(); }
static void Main(string[] args) { IController controller = new ReflectorController(); var router = new ReflectorRouter(); router.RegisterRoute("/",new RootHandler()); router.RegisterRoute("/{ctx}", new ContextHandler()); router.RegisterRoute("/{ctx}/as", new ContextAssemblyHandler()); router.RegisterRoute("/{ctx}/ns", new ContextNamespaceHandler()); router.RegisterRoute("/{ctx}/as/{assemblyName}", new AssemblyHandler()); router.RegisterRoute("/{ctx}/ns/{namespacePrefix}", new NamespaceHandler()); router.RegisterRoute("/{ctx}/ns/{namespace}/{shortName}", new TypeHandler()); router.RegisterRoute("/{ctx}/ns/{namespace}/{shortName}/m/{methodName}", new MethodHandler()); router.RegisterRoute("/{ctx}/ns/{namespace}/{shortName}/c", new ConstructorHandler()); router.RegisterRoute("/{ctx}/ns/{namespace}/{shortName}/f/{fieldName}", new FieldHandler()); router.RegisterRoute("/{ctx}/ns/{namespace}/{shortName}/p/{propName}", new PropertyHandler()); router.RegisterRoute("/{ctx}/ns/{namespace}/{shortName}/e/{eventName}", new EventHandler()); //TODO:deixar de ser estatico AssemblyModel.AddContext("ContextTest1", @"..\..\..\..\Test\ContextTest1"); AssemblyModel.AddContext("ContextTest2", @"..\..\..\..\Test\ContextTest2"); AssemblyModel.AddContext("System32", @"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"); ViewBinder.RootFolder = @"..\..\..\..\Test\Views\"; var ui = new HttpBinder(); //TODO: RegisterHandlers using a folder controller.RegisterUI(ui); controller.RegisterRouter(router); //todo: start Assync with register callbacks controller.Start(); }
public ReflectorViewModel(IEventAggregator enigmaAggregator, IComponentFactory componentFactory, IEnigmaSettings enigmaSettings, HelpersViewModelFactory helpersViewModelFactory) { Types = Enum.GetValues(typeof(ReflectorType)).Cast <ReflectorType>(); _componentController = new ReflectorController(enigmaSettings, componentFactory, enigmaAggregator); var reflectorAggregator = _componentController.GetAggregator(); ReflectorType = _componentController.GetComponentType(); _viewController = new ReflectorViewController(reflectorAggregator, helpersViewModelFactory); AlphabetViewModel = _viewController.GetAlphabetViewModel(); }