コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindowController" /> class with view and resource provider.
        /// </summary>
        /// <param name="window">The view which the newly created instance is responsible for managing.</param>
        /// <param name="resources">The resource provider which the newly created instance will query for resources.</param>
        public MainWindowController(BalloonsView window, IBalloonsWpfResourceProvider resources)
        {
            this.Window = window;

            this.Resources = resources;

            this.Window.CommandButtons.ForEach(button =>
            {
                button.Value.Click += (s, e) =>
                {
                    this.Window.Raise(s, new UserCommandArgs(button.Key));
                };
            });
        }
コード例 #2
0
        public EventEngineTests()
        {
            this.kernel = new StandardKernel();
            this.kernel.Bind<ILogger>().ToMethod(x => LogHelper.GetLogger());
            DependancyBinder.Instance
                .RegisterModules(
                                 new ModelsModule(this.kernel),
                                 new LogicModule(this.kernel),
                                 new ValidationModule(this.kernel),
                                 new WpfCommandModule(this.kernel),
                                 new HighscoreModule(this.kernel),
                                 new SaverModule(this.kernel),
                                 new WpfModule(this.kernel),
                                 new SoundsModule(this.kernel))
                .LoadAll();

            this.bundle = new WpfBundle(this.kernel);
            this.ctx = new Context(this.kernel);
            this.engine = new EventEngine(this.ctx, this.bundle);
            this.view = new BalloonsView();
            this.resources = new Resources();
            this.controller = new MainWindowController(this.view, this.resources);
        }
コード例 #3
0
ファイル: ResourceTests.cs プロジェクト: Baloons-Pop-4/Main
 public void TestInit()
 {
     this.resourceProvider = new Resources();
 }