Exemplo n.º 1
0
        protected IEnumerable <BindThumb> GetBindThumbs(BindOptions option)
        {
            switch (option)
            {
            case BindOptions.Input:
                return(InputThumbs);

            case BindOptions.Output:
                return(OutputThumbs);

            case BindOptions.Parameter:
                return(ParameterThumbs);

            case BindOptions.Return:
                return(ReturnThumbs);

            case BindOptions.Output | BindOptions.Return:
                return(OutputThumbs.Concat(ReturnThumbs));

            case BindOptions.Input | BindOptions.Parameter:
                return(InputThumbs.Concat(ParameterThumbs));
            }

            return(Enumerable.Empty <BindThumb>());
        }
Exemplo n.º 2
0
        private void EnsureRemoveThumb(IBinder binder)
        {
            if (binder is PBinder binderModel)
            {
                var thumb = binderModel.GetView <BindThumb>();

                if (thumb != null)
                {
                    switch (binder.BindOption)
                    {
                    case BindOptions.Input:
                        InputThumbs.Remove(thumb);
                        break;

                    case BindOptions.Output:
                        OutputThumbs.Remove(thumb);
                        break;

                    case BindOptions.Parameter:
                        ParameterThumbs.Remove(thumb);
                        break;

                    case BindOptions.Return:
                        ReturnThumbs.Remove(thumb);
                        break;
                    }
                }
            }
        }
Exemplo n.º 3
0
        // Trigger In / Out Thumb
        private void AddTriggerThumb(PBinder binder)
        {
            var thumb = new BindThumb(binder);

            if (binder.BindOption == BindOptions.Input)
            {
                InputThumbs.Add(thumb);
            }
            else
            {
                OutputThumbs.Add(thumb);
            }

            AddThumbCore(thumb);
        }