コード例 #1
0
        public DurationControls(int x, int y, int yIncrement, IKeyFramesScroll keyFramesScroll, IKeyFramesOrderer keyFramesOrderer)
        {
            _keyFramesScroll = keyFramesScroll;
            _settings = DependencyInjection.Resolve<IReadOnlySettings>();
            _durationControls = new DurationControl[_keyFramesScroll.Limit];
            var definitionsLoader = DependencyInjection.Resolve<IDefinitionsLoader>();

            for (var i = 0; i < _durationControls.Length; i++)
                _durationControls[i] = new DurationControl(x, y + (i * yIncrement), keyFramesOrderer);

            _settings.SelectedAnimationChanged += UpdateControls;
            _settings.SelectedAnimation.KeyFramesChanged += UpdateControls;
            _keyFramesScroll.ScrollIndexChanged += UpdateControls;
            definitionsLoader.DefinitionsLoaded += UpdateControls;
            UpdateControls();
        }
コード例 #2
0
        public DurationControls(int x, int y, int yIncrement, IKeyFramesScroll keyFramesScroll, IKeyFramesOrderer keyFramesOrderer)
        {
            _keyFramesScroll  = keyFramesScroll;
            _settings         = DependencyInjection.Resolve <IReadOnlySettings>();
            _durationControls = new DurationControl[_keyFramesScroll.Limit];
            var definitionsLoader = DependencyInjection.Resolve <IDefinitionsLoader>();

            for (var i = 0; i < _durationControls.Length; i++)
            {
                _durationControls[i] = new DurationControl(x, y + (i * yIncrement), keyFramesOrderer);
            }

            _settings.SelectedAnimationChanged           += UpdateControls;
            _settings.SelectedAnimation.KeyFramesChanged += UpdateControls;
            _keyFramesScroll.ScrollIndexChanged          += UpdateControls;
            definitionsLoader.DefinitionsLoaded          += UpdateControls;
            UpdateControls();
        }