private void DoExpCol(object sender) { Button btn = (Button)sender; TreeLbItem tiCurrent = (TreeLbItem)btn.Tag; if (tiCurrent.Expanded) { tiCurrent.Collapse(); } else { if (tiCurrent.ContainerID != "IE") { tiCurrent.Expand(); } else { if (m_tiLoading != null) { MessageBox.Show("Load in progress!\n\nPlease wait..."); return; } m_tiLoading = tiCurrent; m_tiLoading.Loading = true; UserAgentHelper.GetUserAgent( iePanel, userAgent => { if (m_tiLoading != null) { m_tiLoading.Loading = false; m_tiLoading.PreInserts(); TreeLbItem ti; ti = new TreeLbItem(m_tiLoading.Holder, m_tiLoading, "UserAgent", "User Agent", userAgent); m_tiLoading.Insert(ti); m_tiLoading.Expand_Base(); m_tiLoading = null; } }); } } }
private void DoExpCol(object sender) { Button btn = (Button)sender; TreeLbItem tiCurrent = (TreeLbItem)btn.Tag; if (tiCurrent.Expanded) { tiCurrent.Collapse(); } else { tiCurrent.Expand(); } }