Пример #1
0
        private void _listView_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (_listGroup.SelectionType == SelectionType.One)
            {
                if (_listView.SelectedIndices.Count == 0)
                {
                    return;
                }

                _listGroup.SelectionState.RequestChange(_listView.SelectedIndices[0]);
            }
            else
            {
                // multiple selections

                ListData data = new ListData(_listGroup.FullPath + "." +
                                             ListGroupNode.LIST_SELECTION_STATE);

                for (int i = 0; i < _listView.SelectedIndices.Count; i++)
                {
                    MultipleValueData values = new MultipleValueData();
                    values.AddValue(new ValueData(ListGroupNode.LIST_SELECTION_STATE,
                                                  i.ToString()));
                }

                _listGroup.RequestChange(data);
            }
        }
Пример #2
0
        public IStateNameData AssemblePUCData(IStateNameData data)
        {
            ListData listData = new ListData(this.DataWindow, _index);

            PUCData d = (PUCData)data;

            if (d is ValueData)
            {
                MultipleValueData mv = new MultipleValueData();
                mv.AddValue((ValueData)d);
                d = mv;
            }

            listData.AddElement(d);

            OpData ret = listData;

            if (_windowParent != null)
            {
                ret = (OpData)_windowParent.AssemblePUCData(listData);
            }

            return(ret);
        }