Example #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public ThumbnailComponentControl(ThumbnailComponent component)
            :base(component)
        {
			_component = component;
            InitializeComponent();

			_galleryView.DataSource = _component.Thumbnails;

        	_imageSetTree.SelectionChanged += 
				delegate
            	{
            		_component.TreeSelection = _imageSetTree.Selection;
            	};

        	_imageSetTree.TreeBackColor = Color.FromKnownColor(KnownColor.Black);
			_imageSetTree.TreeForeColor = Color.FromKnownColor(KnownColor.ControlLight);
			_imageSetTree.TreeLineColor = Color.FromKnownColor(KnownColor.ControlLight);

			_component.PropertyChanged += OnPropertyChanged;

			_imageSetTree.Tree = _component.Tree;
        	_imageSetTree.VisibleChanged += OnTreeVisibleChanged;
		}
        /// <summary>
        /// Constructor.
        /// </summary>
        public ThumbnailComponentControl(ThumbnailComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            _galleryView.DataSource = _component.Thumbnails;

            _imageSetTree.SelectionChanged +=
                delegate
            {
                _component.TreeSelection = _imageSetTree.Selection;
            };

            _imageSetTree.TreeBackColor = Color.FromKnownColor(KnownColor.Black);
            _imageSetTree.TreeForeColor = Color.FromKnownColor(KnownColor.ControlLight);
            _imageSetTree.TreeLineColor = Color.FromKnownColor(KnownColor.ControlLight);

            _component.PropertyChanged += OnPropertyChanged;

            _imageSetTree.Tree            = _component.Tree;
            _imageSetTree.VisibleChanged += OnTreeVisibleChanged;
        }
Example #3
0
        public void SetModification(Modification newModificationValue)
        {
            if (this.modification != null)
            {
                this.enabledComponent.PropertyChanged   -= HandleComponentPropertyChanged;
                this.infoComponent.PropertyChanged      -= HandleComponentPropertyChanged;
                this.leagueComponent.PropertyChanged    -= HandleComponentPropertyChanged;
                this.thumbnailComponent.PropertyChanged -= HandleComponentPropertyChanged;
            }

            this.modification = newModificationValue;

            this.enabledComponent   = newModificationValue.GetComponent <EnabledComponent>();
            this.infoComponent      = newModificationValue.GetComponent <InfoComponent>();
            this.thumbnailComponent = newModificationValue.GetComponent <ThumbnailComponent>();
            this.leagueComponent    = newModificationValue.GetComponent <LeagueMetadataComponent>();

            enabledComponent.PropertyChanged   += HandleComponentPropertyChanged;
            infoComponent.PropertyChanged      += HandleComponentPropertyChanged;
            thumbnailComponent.PropertyChanged += HandleComponentPropertyChanged;
            leagueComponent.PropertyChanged    += HandleComponentPropertyChanged;

            OnPropertyChanged(nameof(Modification));
        }
Example #4
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ThumbnailComponent)component;
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ThumbnailComponent)component;
 }