void QueryParams_QueryParamAdded(object sender, Entity.QueryParamEventArgs e) { e.QueryParam.LoadedChanged += QueryParam_LoadedChanged; if (e.QueryParam.IsLoaded) { QueryParam_LoadedChanged(e.QueryParam, null); } }
void QueryParams_QueryParamRemoved(object sender, Entity.QueryParamEventArgs e) { e.QueryParam.LoadedChanged -= QueryParam_LoadedChanged; var tp = st.Tabs.OfType <Query.QueryPageContainer>().FirstOrDefault(s => s.QueryParam == e.QueryParam); if (tp != null) { st.CloseTab(tp); } }