Esempio n. 1
0
        public WorldVariablesController(IWorldVariablesView view, IControllerFactory controllerFactory, IMessageBus messageBus, IConfigFile <Config> configFile)
            : base(view)
        {
            _controllerFactory = controllerFactory.EnsureNotNull(nameof(controllerFactory));
            _messageBus        = messageBus.EnsureNotNull(nameof(messageBus));
            _configFile        = configFile.EnsureNotNull(nameof(configFile));

            AddDisposables(
                View.NewRequested.Subscribe(x => NewRequested()),
                View.EditRequested.Subscribe(EditRequested),
                View.DeleteRequested.Subscribe(DeleteRequested));

            View.RestoreBounds(configFile.Config.Views.WorldVariables.Bounds, false);
            View.RestoreVariablesListColumnWidths(configFile.Config.Views.WorldVariables.ColumnWidths);
        }