예제 #1
0
 //Collection IndexOf method 
 public int IndexOf(TabPage item)
 {
     return List.IndexOf(item);
 }
예제 #2
0
 public void CopyTo(TabPage[] array, int index)
 {
     List.CopyTo(array, index);
 }
예제 #3
0
 public void Remove(TabPage Tab)
 {
     List.Remove(Tab);
 }
예제 #4
0
 public bool Contains(TabPage Tab)
 {
     return List.Contains(Tab);
 }
예제 #5
0
 public void Insert(int index, TabPage item)
 {
     List.Insert(index, item);
 }
예제 #6
0
 /// <summary>
 /// Adds a new error to the collection
 /// </summary>
 public void Add(TabPage Tab)
 {
     List.Add(Tab);
     Parent.Controls.Add(Tab);
 }
예제 #7
0
        /// <summary>
        /// Fixes up the ActionLink property to final script code
        /// suitable for an onclick handler
        /// </summary>
        /// <returns></returns>
        protected string FixupActionLink(TabPage Tab)
        {
            string Action = Tab.ActionLink;

            if (Action.ToLower() == "default" || string.IsNullOrEmpty(Action))
                Action = "ActivateTab('" + ClientID + "','" + Tab.TabPageClientId + "');";

                // If we don't have 'javascript:' in the text it's a Url: must use document to go there
            else if (Action != "" && Action.IndexOf("script:") < 0)
                Action = "document.location='" + Action + "';";

            return Action;
        }
예제 #8
0
 public void AddTab(TabPage Tab)
 {
     Tab.ID = ID + "_" + (TabCounter++).ToString();
     _Tabs.Add(Tab);
 }
예제 #9
0
 /// <summary>
 /// Adds a new item to the Tab collection.
 /// </summary>
 /// <param name="Caption">The caption of the tab</param>
 /// <param name="Link">The HTTP or JavaScript link that is fired when the tab is activated. Can optionally be Default which activates the tab and activates the page ID.</param>
 /// <param name="TabPageClientId">The ID for this tab - map this to an ID tag in the HTML form.</param>
 public void AddTab(string Caption, string Link, string TabPageClientId)
 {
     TabPage Tab = new TabPage();
     Tab.Caption = Caption;
     Tab.ActionLink = Link;
     Tab.TabPageClientId = TabPageClientId;
     Tab.ID = ID + "_" + (TabCounter++).ToString();
     AddTab(Tab);
     Page.Response.Write("Add Tab");
 }