void LoadUserQuerys() { var querys = Session.UserProfile.QueryParams.Where(s => s.IsLoaded && !s.Resign).ToArray(); if (querys.Length == 0) { var queryParam = new Entity.QueryParam(); Session.UserProfile.QueryParams.Add(queryParam); queryParam.LoadedChanged += QueryParam_LoadedChanged; new Query.QueryPageContainer(Session, queryParam, st); st.SelectedTabIndex = 0; } else { Array.ForEach(querys, s => new Query.QueryPageContainer(Session, s, st)); var resumeQuery = ProgramConfiguration.Instance.KeepQueryStateAfterRestart; querys.ForEach(s => { s.LoadedChanged += QueryParam_LoadedChanged; if (resumeQuery && s.IsLastInQuery && s.DepartureDate.Date > DateTime.Now.Date) { s.OnRequestQuery(); } }); st.SelectedTabIndex = 0; } }
public void Init(Entity.QueryParam param) { QueryParam = param; if (_fonts == null) { Font = Font; } }