Пример #1
0
        public IEnumerator Apply()
        {
            SelectionManager = MetaSelectionSet.ConstructPayloadSelectionSet(Bound,
                                                                             Bars, NormalState, SelectedState, NoneSelectedState, NormalStateMulti, SelectedStateMulti, NoneSelectedStateMulti);

            var clickSelector = PayloadSelectorFactory.InstantiateClickSelect(SelectionManager, gameObject);

            clickSelector.SelectionMode.OperationToPerform = SelectionOperation.SelectOnly;

            var controlClickSelector = PayloadSelectorFactory.InstantiateClickSelect(SelectionManager, gameObject, new InputModifiers()
            {
                Control = true
            });

            controlClickSelector.SelectionMode.OperationToPerform = SelectionOperation.ToggleFullySelected;

            var rowSelect = PayloadSelectorFactory.InstantiateRowColumnSelect(SelectionManager);

            rowSelect.SelectionMode.OperationToPerform = SelectionOperation.SelectOnly;

            var controlRowSelect = PayloadSelectorFactory.InstantiateRowColumnSelect(SelectionManager);

            controlRowSelect.SelectionMode.OperationToPerform = SelectionOperation.ToggleFullySelected;

            PayloadSelectorFactory.InstantiateSelectAll(SelectionManager);

            var iterator = SelectionManager.TransmitAll();

            while (iterator.MoveNext( ))
            {
                yield return(null);
            }
        }
Пример #2
0
        public override IEnumerator ReceivePayload(VisualPayload payload)
        {
            //payload.VisualData.Bound.Data = payload.Data;

            var metaEntries = EntryField.GetEntries(payload.Data);

            var createdPayloads = new List <VisualPayload>();

            foreach (var metaEntry in metaEntries)
            {
                // foreach ( var entry in entries )
                // {
                var newBound = payload.VisualData.Bound.CreateDependingBound(Name);

                var newPayload = new VisualPayload(metaEntry.Last(), new VisualDescription(newBound));

                //newBound.Data = metaEntry.Last();

                createdPayloads.Add(newPayload);
            }

            MetaSelectionSet selectionManager = MetaSelectionSet.ConstructPayloadSelectionSet(
                payload.VisualData.Bound, createdPayloads,
                NormalState, SelectedState, NoneSelectedState,
                NormalStateMulti, SelectedStateMulti, NoneSelectedStateMulti);

            var iterator = selectionManager.TransmitAll();

            while (iterator.MoveNext())
            {
                yield return(null);
            }
        }