BalloonsPop.GraphicUserInterface.MainWindowController.MainWindowController C# (CSharp) Méthode

MainWindowController() public méthode

Initializes a new instance of the MainWindowController class with view and resource provider.
public MainWindowController ( BalloonsView window, IBalloonsWpfResourceProvider resources ) : System
window BalloonsView The view which the newly created instance is responsible for managing.
resources IBalloonsWpfResourceProvider The resource provider which the newly created instance will query for resources.
Résultat System
        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));
                };
            });
        }