/// <summary>
        /// Add a PopupInfoItem to the collection
        /// </summary>
        /// <param name="index"></param>
        /// <param name="Item"></param>
        public void AddAt(int index, PopupInfoItem Item)
        {
            if (_ParentPopupInfo != null)
            {
                Item.Page = _ParentPopupInfo.Page;
                Item.PopupInfoContainer = _ParentPopupInfo;

                // *** VS Designer adds new items as soon as their accessed
                // *** but items may not be valid so we have to clean up
                if (this._ParentPopupInfo.DesignMode)
                {
                    UpdateListInDesignMode();
                }
            }

            InnerList.Insert(index, Item);
        }
		/// <summary>
		/// Add a PopupInfoItem to the collection
		/// </summary>
		/// <param name="index"></param>
		/// <param name="Item"></param>
		public void AddAt(int index, PopupInfoItem Item)
		{
			if (_ParentPopupInfo != null)
			{
				Item.Page = _ParentPopupInfo.Page;
				Item.PopupInfoContainer = _ParentPopupInfo;

				// *** VS Designer adds new items as soon as their accessed
				// *** but items may not be valid so we have to clean up
				if (this._ParentPopupInfo.DesignMode)
				{
					UpdateListInDesignMode();
				}
			}

			InnerList.Insert(index, Item);
		}
		/// <summary>
		/// Add a PopupInfoItem to the collection
		/// </summary>
		/// <param name="Item"></param>
		public void Add(PopupInfoItem Item)
		{
			if (_ParentPopupInfo != null)
			{
				Item.Page = _ParentPopupInfo.Page;
				Item.PopupInfoContainer = _ParentPopupInfo;

				// *** VS Designer adds new items as soon as they are accessed
				// *** but items may not be valid so we have to clean up
				if (this._ParentPopupInfo.DesignMode)
				{
					// *** Remove any blank items
					UpdateListInDesignMode();
				}
			}

			this.InnerList.Add(Item);
		}
        /// <summary>
        /// Add a PopupInfoItem to the collection
        /// </summary>
        /// <param name="Item"></param>
        public void Add(PopupInfoItem Item)
        {
            if (_ParentPopupInfo != null)
            {
                Item.Page = _ParentPopupInfo.Page;
                Item.PopupInfoContainer = _ParentPopupInfo;

                // *** VS Designer adds new items as soon as they are accessed
                // *** but items may not be valid so we have to clean up
                if (this._ParentPopupInfo.DesignMode)
                {
                    // *** Remove any blank items
                    UpdateListInDesignMode();
                }
            }

            this.InnerList.Add(Item);
        }
Exemple #5
0
        /// <summary>
        /// Returns a specific DataBinding Item for a given control.
        /// Always returns an item even if the Control is not found.
        /// If you need to check whether this is a valid item check
        /// the BindingSource property for being blank.
        ///
        /// Extender Property Get method
        /// </summary>
        /// <param name="control"></param>
        /// <returns></returns>
        public PopupInfoItem GetDataBindingItem(Control control)
        {
            foreach (PopupInfoItem Item in this.PopupInfoItems)
            {
                if (Item.ControlId == control.ID)
                {
                    // *** Ensure the binder is set on the item
                    Item.PopupInfoContainer = this;
                    return(Item);
                }
            }

            PopupInfoItem NewItem = new PopupInfoItem(this);

            NewItem.ControlId       = control.ID;
            NewItem.ControlInstance = control;

            this.PopupInfoItems.Add(NewItem);

            return(NewItem);
        }
        /// <summary>
        /// Add any PopupInfoItem controls that cannot be declaratively created in the aspx page because one or more
        /// properties are computed.
        /// </summary>
        private void AddPopupInfoItems()
        {
            // Create the popup for the local media tab's body text in the overview section, just below the text
            // "Select one or more files on your hard drive". If it wasn't for the string formatting of the DialogBody property,
            // we could have declared it in the aspx page like this:

            //<tis:PopupInfoItem ID="PopupInfoItem2" runat="server" ControlId="lblLocalMediaOverview" DialogTitle="<%$ Resources:GalleryServerPro, Task_Add_Objects_Local_Media_Overview_Hdr %>"
            //DialogBody="<% =GetLocalMediaPopupBodyText();%>" />
            int maxUploadSize = GallerySettings.MaxUploadSize;

            PopupInfoItem popupInfoItem = new PopupInfoItem();
            popupInfoItem.ID = "poi7";
            popupInfoItem.ControlId = "lblLocalMediaOverview";
            popupInfoItem.DialogTitle = Resources.GalleryServerPro.Task_Add_Objects_Local_Media_Overview_Hdr;
            popupInfoItem.DialogBody = String.Format(CultureInfo.CurrentCulture, Resources.GalleryServerPro.Task_Add_Objects_Local_Media_Overview_Bdy, maxUploadSize);

            PopupInfo1.PopupInfoItems.Add(popupInfoItem);
        }
        /// <summary>
        /// Returns a specific DataBinding Item for a given control.
        /// Always returns an item even if the Control is not found.
        /// If you need to check whether this is a valid item check
        /// the BindingSource property for being blank.
        /// 
        /// Extender Property Get method
        /// </summary>
        /// <param name="control"></param>
        /// <returns></returns>
        public PopupInfoItem GetDataBindingItem(Control control)
        {
            foreach (PopupInfoItem Item in this.PopupInfoItems)
            {
                if (Item.ControlId == control.ID)
                {
                    // *** Ensure the binder is set on the item
                    Item.PopupInfoContainer = this;
                    return Item;
                }
            }

            PopupInfoItem NewItem = new PopupInfoItem(this);
            NewItem.ControlId = control.ID;
            NewItem.ControlInstance = control;

            this.PopupInfoItems.Add(NewItem);

            return NewItem;
        }