private void CommandShowFilterForTags_Executed(object sender, ExecutedRoutedEventArgs e) { string filterText = e.Parameter as string; SavedSearch ss = new SavedSearch(); ss.Id = -1; ss.SearchText = filterText.Substring(1); _panelController.LoadSavedSearchView(ss); }
public void SaveSearch(string searchText) { //_accountInfo.SelectPanel(); SavedSearch savedSearch = new SavedSearch(); savedSearch.SearchText = searchText; LocalSavedSearchBO.Insert(savedSearch); LocalSavedSearchBO.SaveChanges(); _accountInfo.AddSearch(savedSearch); _tweetSender.txtSearchBox.Text = ""; Panel info = null; //Need to change this LoadHomeView(info); }
private void txtSearchBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Enter) { if (_searchTableEnum == SearchTableEnum.Peoples) { string peopleName = txtSearchBox.Text; _panelController = StatusPanelController.Current; _panelController.SearchUserByUserName(txtSearchBox.Text); // _panelController.LoadFindPeople(peopleName); } else { _panelController = StatusPanelController.Current; SavedSearch ss = new SavedSearch(); ss.Id = -1; ss.SearchText = txtSearchBox.Text; _panelController.LoadSavedSearchView(ss); } } }
public void DeleteSavedSearch(SavedSearch ssPanel) { MessageBoxResult messageResult; messageResult = MessageBox.Show("Are you sure you want to delete this saved search?", "Delete Confirmation", MessageBoxButton.YesNo); if (messageResult == MessageBoxResult.Yes) { SavedSearch savedSearch = LocalSavedSearchBO.Get(search => search.Id == ssPanel.Id); if (savedSearch != null) { LocalSavedSearchBO.Delete(savedSearch); LocalSavedSearchBO.SaveChanges(); _accountInfo.DeleteSearch(savedSearch); } } _tweetSender.txtSearchBox.Text = ""; Panel info = null; //Need to change this LoadHomeView(info); }
public void LoadSavedSearchView(SavedSearch ssPanel) { _accountInfo.SelectPanel(); string savedsearchPanelKey = "SAVEDSEARCHPANEL" + ssPanel.Id; UserAllTweets savedsearchView; if (_panelViewDict.ContainsKey(savedsearchPanelKey)) { savedsearchView = _panelViewDict[savedsearchPanelKey]; } else { savedsearchView = new UserAllTweets(); //savedsearchView.DataTemplate = savedsearchView.FindResource("SavedSearchDataTemplate") as DataTemplate; savedsearchView.CollectionTypeFilter = TOBEntityEnum.None; _panelViewDict.Add(savedsearchPanelKey, savedsearchView); } SortableObservableCollection<TwitterSearchStatus> searchCollections; searchCollections = new SortableObservableCollection<TwitterSearchStatus>(GetSearchList(ssPanel.SearchText)); savedsearchView.SearchCollection = searchCollections; _currentTweetsView = savedsearchView; _mainWindow.frmTOBMain.Content = savedsearchView; _tweetSender.ChangeGlobelSearchType(-1); _tweetSender.txtSearchBox.Text = ssPanel.SearchText; }
partial void UpdateSavedSearch(SavedSearch instance);
partial void InsertSavedSearch(SavedSearch instance);
partial void DeleteSavedSearch(SavedSearch instance);
public void DeleteSearch(SavedSearch savedSearch) { _savedSearchList.Remove(savedSearch); }
public void AddSearch(SavedSearch savedSearch) { _savedSearchList.Add(savedSearch); savedSearch.CommandSearch = TOBCommands.SearchCommand; }