protected override void OnShown(EventArgs i_E) { base.OnShown(i_E); new Thread(() => { m_FilterdCheckinList = CheckinsData.GetCheckins(); fetchCheckins(eNumFilter.ThisMonth); }).Start(); }
protected override void OnShown(EventArgs i_E) { base.OnShown(i_E); new Thread(() => { comboBoxPostsFilter.Invoke(new Action(() => comboBoxPostsFilter.Enabled = false)); // block user from changing filter while thread running (instead of use lock that take more resources) m_FilterdPostList = PostsData.GetPosts(); fetchPosts(eNumFilter.ThisMonth); // show the posts from this month while form is shown }).Start(); }