Esempio n. 1
0
        protected override void Render()
        {
            //Set color, size and metadata
            //We might also need to initialize child presenters
            //here for ConnectionPoint initialization

            ConnectionPointParameter inputParameter = new ConnectionPointParameter()
            {
                AdornedElement = (UIElement)View,
                Type           = ConnectionPointType.Input,
                Index          = 0,
                Count          = 1,
                Canvas         = _parameter.Canvas
            };

            ConnectionPointParameter outputParameter = new ConnectionPointParameter()
            {
                AdornedElement = (UIElement)View,
                Type           = ConnectionPointType.Output,
                Index          = 0,
                Count          = 2,
                Canvas         = _parameter.Canvas
            };

            ConnectionPointParameter outputParameter2 = new ConnectionPointParameter()
            {
                AdornedElement = (UIElement)View,
                Type           = ConnectionPointType.Output,
                Index          = 1,
                Count          = 2,
                Canvas         = _parameter.Canvas
            };

            this.AddChild <ConnectionPointPresenter>(EventBus, inputParameter);
            this.AddChild <ConnectionPointPresenter>(EventBus, outputParameter);
            this.AddChild <ConnectionPointPresenter>(EventBus, outputParameter2);

            _parameter.Canvas.Children.Add((UIElement)View);

            SetPosition(_parameter.Position);
        }
        public ConnectionPointPresenter(IEventBus eventBus, IParameter parameter) : base(eventBus, parameter)
        {
            _parameter = (ConnectionPointParameter)parameter;

            this.InitializeView();
        }