Ejemplo n.º 1
0
        private ListView MakeList(string listId, string label)
        {
            ListView list = new ListView();

            list.View        = View.List;
            list.Name        = label;
            list.Dock        = System.Windows.Forms.DockStyle.Top;
            list.MultiSelect = false;


            XCore.List xlist = new XCore.List(null);             //(listNode);
            UIListDisplayProperties display = new UIListDisplayProperties(xlist);

            display.PropertyName = listId;
            m_mediator.SendMessage("Display" + listId, null, ref display);

            foreach (ListItem item in xlist)
            {
                ListViewItem x = list.Items.Add(item.label);
                x.Tag = new StringPropertyChoice(m_mediator, item.parameterNode, null, null);
            }

            list.SelectedIndexChanged += new EventHandler(OnSelectedIndexChanged);

            return(list);
        }
Ejemplo n.º 2
0
        protected void PopulateFromList()
        {
            /// Just before this group is displayed, allow the group's contents to be modified by colleagues
            //if this is a list-populated group.

            //first, we get the list as it is in the XML configuration file
            XmlNode listNode = m_configurationNode.OwnerDocument.SelectSingleNode("//list[@id='" + this.ListId + "']");

            StringTable stringTbl = null;

            if (m_mediator != null && m_mediator.HasStringTable)
            {
                stringTbl = m_mediator.StringTbl;
            }
            XCore.List list = new XCore.List(listNode, stringTbl);

            UIListDisplayProperties display = new UIListDisplayProperties(list);

            display.PropertyName = this.PropertyName;
            string wsSet = XmlUtils.GetOptionalAttributeValue(m_configurationNode, "wsSet");

            m_mediator.SendMessage("Display" + this.ListId, wsSet, ref display);

            PropertyName = display.PropertyName;

            foreach (ListItem item in list)
            {
                if (item is SeparatorItem)
                {
                    Add(new SeparatorChoice(null, null, null, null));
                }
                else
                {
                    Add(new ListPropertyChoice(m_mediator, item, m_adapter, this));
                }
            }

            // select the first one if none is selected
            if (
                (!m_mediator.PropertyTable.PropertyExists(this.PropertyName, this.PropertyTableGroup)) &&               // there isn't a value alread (from depersisting)
                (this.Count > 0))
            {
                //ListPropertyChoice first = (ListPropertyChoice)this[0];
                //				first.OnClick(this, null);
            }
        }
Ejemplo n.º 3
0
		private ListView MakeList(string listId, string label)
		{
			ListView list= new ListView();
			list. View = View.List;
			list.Name = label;
			list.Dock = System.Windows.Forms.DockStyle.Top;
			list.MultiSelect = false;


			XCore.List xlist = new XCore.List(null); //(listNode);
			UIListDisplayProperties display =new UIListDisplayProperties(xlist);
			display.PropertyName= listId;
			m_mediator.SendMessage("Display"+listId, null, ref display);

			foreach (ListItem item in xlist)
			{
				ListViewItem x =list.Items.Add(item.label);
				x.Tag = new StringPropertyChoice(m_mediator, item.parameterNode, null, null);
			}

			list.SelectedIndexChanged+=new EventHandler(OnSelectedIndexChanged);

			return list;
		}
Ejemplo n.º 4
0
        protected void PopulateFromList()
        {
            /// Just before this group is displayed, allow the group's contents to be modified by colleagues
            //if this is a list-populated group.

            //first, we get the list as it is in the XML configuration file
            XmlNode listNode = m_configurationNode.OwnerDocument.SelectSingleNode("//list[@id='"+this.ListId+"']");

            StringTable stringTbl = null;
            if (m_mediator != null && m_mediator.HasStringTable)
                stringTbl = m_mediator.StringTbl;
            XCore.List list = new XCore.List(listNode, stringTbl);

            UIListDisplayProperties display =new UIListDisplayProperties(list);
            display.PropertyName= this.PropertyName;
            string wsSet = XmlUtils.GetOptionalAttributeValue(m_configurationNode, "wsSet");
            m_mediator.SendMessage("Display"+this.ListId, wsSet, ref display);

            PropertyName = display.PropertyName;

            foreach (ListItem item in list)
            {
                Add(new ListPropertyChoice(m_mediator, item,m_adapter , this));
            }

            // select the first one if none is selected
            if(
                (!m_mediator.PropertyTable.PropertyExists(this.PropertyName, this.PropertyTableGroup))	// there isn't a value alread (from depersisting)
                && (this.Count>0))
            {
                //ListPropertyChoice first = (ListPropertyChoice)this[0];
                //				first.OnClick(this, null);
            }
        }