示例#1
0
文件: tab.cs 项目: modulexcite/IL2JS
 internal void AttachTitle()
 {
     _elmTitle = (ListItem)Browser.Document.GetById(Id + "-title");
     _elmTitleA = (Anchor)_elmTitle.ChildNodes[0];
     _elmTitleSpan = (Span)_elmTitleA.ChildNodes[0];
     _elmATText = (Span)_elmTitleA.ChildNodes[1];
 }
示例#2
0
文件: tab.cs 项目: modulexcite/IL2JS
        public override void Dispose()
        {
            _elmTitleA.Click -= OnTitleClick;
            _elmTitleA.KeyPress -= OnTitleKeyPress;
            _elmTitleA.DblClick -= OnTitleDblClick;

            base.Dispose();
            _elmATText = null;
            _elmTitle = null;
            _elmTitleA = null;
            _elmTitleSpan = null;
        }
示例#3
0
文件: tab.cs 项目: modulexcite/IL2JS
 internal void EnsureTitleDOMElement()
 {
     if (CUIUtility.IsNullOrUndefined(_elmTitle))
         _elmTitle = new ListItem();
 }
示例#4
0
        protected override void AppendChildrenToElement(HtmlElement elm)
        {
            ListItem listItem;

            foreach (Component child in Children)
            {
                // Put all menu items into a list item for semantics
                listItem = new ListItem();
                listItem.ClassName = "ms-cui-menusection-items";

                // This is very important for performance
                // We should always try to append an empty child DOM Element
                // first and then call EnsureRefreshed() where the child fills it
                child.EnsureDOMElement();
                listItem.AppendChild(child.ElementInternal);
                elm.AppendChild(listItem);
                child.EnsureRefreshed();
            }
        }
示例#5
0
 public void Dispose()
 {
     _elmMain = null;
     _elmTitle = null;
     _elmTabTitleContainer = null;
     _tabCount = 0;
 }
示例#6
0
 /// <summary>
 /// Named "Attempt" because it is a valid case if the DOM element is not present in the DOM.
 /// This is unlike all the components whose DOM elements are expected to be there and 
 /// it is a bug if they are not when Attach() is called.
 /// </summary>
 internal void AttemptAttachDOMElements()
 {
     ListItem elm = (ListItem)Browser.Document.GetById(Id);
     if (!CUIUtility.IsNullOrUndefined(elm))
     {
         _elmMain = elm;
         _elmTitle = (Div)_elmMain.ChildNodes[0].ChildNodes[0];
         _elmTabTitleContainer = (UnorderedList)_elmMain.ChildNodes[1];
     }
 }