예제 #1
0
        } // end of ctor

        /// <summary>
        /// Returns a the  button, if present
        /// </summary>
        /// <value></value>
        public LinkButton this[string index]
        {
            get
            {
                // find control
                ViewControlData vcd = findControl(index);
                LinkButton      btn = null;
                // if present assign it
                if (vcd != null)
                {
                    btn = (LinkButton)vcd.viewControlBtn;
                }
                return(btn);
            }
        } // end of LinkButton
예제 #2
0
        } // end of create

        /// <summary>
        /// Create the Image Button
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="altText">The alt text.</param>
        /// <param name="localize">The localize.</param>
        /// <returns></returns>
        public LinkButton create(string name, string altText, string localize)
        {
            ViewControlData vcd = findControl(name);

            // if present, then overwite
            if (vcd == null)
            {
                // create a new view control
                vcd = new ViewControlData(name, altText, localize);
                // set event handlers
                vcd.viewControlBtn.Click += new EventHandler(Button_Click);
                // set attributes
                vcd.viewControlBtn.Attributes["mID"] = moduleID_.ToString();
                vcd.viewControlBtn.Attributes["tID"] = tabID_.ToString();
                // add to list
                buttons_.Add(vcd);
            }

            return(vcd.viewControlBtn);
        } // end of create
        /// <summary>
        /// Create the Image Button
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="altText">The alt text.</param>
        /// <param name="localize">The localize.</param>
        /// <returns></returns>
        public LinkButton create(string name, string altText, string localize)
        {
            ViewControlData vcd = findControl(name);
            // if present, then overwite
            if (vcd == null)
            {
                // create a new view control
                vcd = new ViewControlData(name, altText, localize);
                // set event handlers
                vcd.viewControlBtn.Click += new EventHandler(Button_Click);
                // set attributes
                vcd.viewControlBtn.Attributes["mID"] = moduleID_.ToString();
                vcd.viewControlBtn.Attributes["tID"] = tabID_.ToString();
                // add to list
                buttons_.Add(vcd);
            }

            return vcd.viewControlBtn;
        }