private void lblPosition_Click(object sender, EventArgs e) { using (ProfileMap m = new ProfileMap()) { m.Owner = this; m.Users = new List<PockeTwit.Library.User>(new Library.User[] { _User }); m.ShowDialog(); m.Dispose(); } }
private void MapList() { Cursor.Current = Cursors.WaitCursor; Application.DoEvents(); using (ProfileMap m = new ProfileMap()) { List<Library.User> users = new List<Library.User>(); for (int i = 0; i < statList.m_items.Count; i++) { Library.User thisUser = statList.m_items[i].Tweet.user; if (thisUser.needsFetching) { thisUser = Library.User.FromId(thisUser.screen_name, statList.m_items[i].Tweet.Account); thisUser.needsFetching = false; } users.Add(thisUser); } m.Users = users; m.ShowDialog(); if (m.Range > 0) { SearchForm f = new SearchForm(); f.providedDistnce = m.Range.ToString(); string secondLoc = Yedda.GoogleGeocoder.Geocode.GetAddress(m.CenterLocation.ToString()); if (string.IsNullOrEmpty(secondLoc)) { secondLoc = m.CenterLocation.ToString(); } f.providedLocation = secondLoc; this.statList.Visible = false; IsLoaded = false; if (f.ShowDialog() == DialogResult.Cancel) { IsLoaded = true; this.statList.Visible = true; f.Close(); return; } IsLoaded = true; this.statList.Visible = true; f.Hide(); string SearchString = f.SearchText; f.Close(); this.statList.Visible = true; ShowSearchResults(SearchString); } m.Close(); } }