// // Copyright 2014 Perforce Software Inc. // using Perforce.ViewModel; using System; using System.Collections.Generic; using System.Text; using System.Windows; using System.Windows.Controls; namespace Perforce.View { /// <summary> /// Interaction logic for SearchView.xaml /// </summary> public partial class SearchView : UserControl, SidebarView { private SearchSelectorViewModel _model; public SearchView(SearchSelectorViewModel model) { InitializeComponent(); _model = model; this.DataContext = _model; } public SearchSelectorViewModel Model { get { return _model; } set { _model = value; this.DataContext = _model; } } public Grid ListingGrid { get { return ResultsGrid; } set { ResultsGrid = value; } } private void ShowMoreButton_Click(object sender, RoutedEventArgs e) { if (ShowMoreButton.IsChecked.Value) { SearchOptions.Visibility = System.Windows.Visibility.Visible; } else { SearchOptions.Visibility = System.Windows.Visibility.Collapsed; } } private void UIEvent_Click(object sender, RoutedEventArgs e) { _model.Refresh(); } private void SearchTags_SelectionChanged(object sender, SelectionChangedEventArgs e) { var combo = (sender as ComboBox); var obj = (SelectableObject<string>) combo.SelectedItem; if (obj != null) { obj.IsSelected = !obj.IsSelected; if (obj.IsSelected) { _model.AddTagFilter(obj.ObjectData); } else { _model.RemoveTagFilter(obj.ObjectData); } (sender as ComboBox).SelectedItem = null; _model.Refresh(); } } private void ResultsGrid_Loaded(object sender, RoutedEventArgs e) { Log.Debug("#### RESULTS LOADED"); } private void SearchTags_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { _model.ForceReload("TagList"); } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 16507 | perforce_software | Move to main branch. | ||
//guest/perforce_software/piper/windows/R1.1/Perforce/View/SearchView.xaml.cs | |||||
#3 | 16474 | Robert Cowham | Bring up-to-date with //guest/perforce_software/piper/windows/main/...@16473 | ||
#2 | 13572 | alan_petersen | updating R1.1 | ||
#1 | 11256 | alan_petersen |
Populate //guest/perforce_software/piper/windows/R1.1/... from //guest/perforce_software/piper/windows/main/.... |
||
//guest/perforce_software/piper/windows/main/Perforce/View/SearchView.xaml.cs | |||||
#1 | 11255 | alan_petersen | Rename/move file(s) | ||
//guest/perforce_software/piper/windows/Perforce/View/SearchView.xaml.cs | |||||
#1 | 10761 | alan_petersen |
initial drop of Piper for Windows.... this version still has _many_ bugs (er... i mean "unintended features") but I will be updating it over the next week as more stability is added. |