Esempio n. 1
0
		public Form1()
		{
			InitializeComponent();
			if(DesignMode)
				return;

			this._referenceCollectionControl = new WeSay.UI.ReferenceCollectionEditor<PretendReference>();
			this.Controls.Add(this._referenceCollectionControl);
			_placeholder.Visible = false;
			//
			// lexRelationControl1
			//
			this._referenceCollectionControl.Anchor = _placeholder.Anchor;

			this._referenceCollectionControl.BackColor = System.Drawing.Color.NavajoWhite;
			this._referenceCollectionControl.Choices = null;
			this._referenceCollectionControl.Location = _placeholder.Location;
			this._referenceCollectionControl.Name = "_referenceCollectionControl";
			this._referenceCollectionControl.Size = _placeholder.Size;
			this._referenceCollectionControl.TabIndex = 0;

			_referenceCollectionControl.CreateNewTargetItem += new EventHandler<WeSay.UI.AutoCompleteWithCreationBox.CreateNewArgs>(OnCreateNewTargetItem);
			_referenceCollectionControl.FormToObectFinder = FindObjectFromForm;
			_referenceCollectionControl.Collection = new List<PretendReference>();
			_referenceCollectionControl.DisplayStringAdaptor = new TestLabelAdaptor();
			AddReference(AddTargetObject("IDone", "one"));
			AddTargetObject("IDtwo", "two");
			AddReference(AddTargetObject("IDthree", "three"));
			AddTargetObject("IDfour", "four");

			_referenceCollectionControl.Choices = _potentialTargets;

			_referenceCollectionControl.CollectionChanged += new EventHandler(lexRelationControl1_CollectionChanged);
			LoadListViews();
		}
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();
            if (DesignMode)
            {
                return;
            }

            this._referenceCollectionControl = new WeSay.UI.ReferenceCollectionEditor <PretendReference>();
            this.Controls.Add(this._referenceCollectionControl);
            _placeholder.Visible = false;
            //
            // lexRelationControl1
            //
            this._referenceCollectionControl.Anchor = _placeholder.Anchor;

            this._referenceCollectionControl.BackColor = System.Drawing.Color.NavajoWhite;
            this._referenceCollectionControl.Choices   = null;
            this._referenceCollectionControl.Location  = _placeholder.Location;
            this._referenceCollectionControl.Name      = "_referenceCollectionControl";
            this._referenceCollectionControl.Size      = _placeholder.Size;
            this._referenceCollectionControl.TabIndex  = 0;

            _referenceCollectionControl.CreateNewTargetItem += new EventHandler <WeSay.UI.AutoCompleteWithCreationBox.CreateNewArgs>(OnCreateNewTargetItem);
            _referenceCollectionControl.FormToObectFinder    = FindObjectFromForm;
            _referenceCollectionControl.Collection           = new List <PretendReference>();
            _referenceCollectionControl.DisplayStringAdaptor = new TestLabelAdaptor();
            AddReference(AddTargetObject("IDone", "one"));
            AddTargetObject("IDtwo", "two");
            AddReference(AddTargetObject("IDthree", "three"));
            AddTargetObject("IDfour", "four");

            _referenceCollectionControl.Choices = _potentialTargets;

            _referenceCollectionControl.CollectionChanged += new EventHandler(lexRelationControl1_CollectionChanged);
            LoadListViews();
        }