private void _appBarButtonSearch_Click(object sender, EventArgs e) { GenericSearchUC searchUC = new GenericSearchUC(); searchUC.LayoutRootGrid.Margin = (new Thickness(0.0, 32.0, 0.0, 0.0)); GenericSearchUC arg_94_0 = searchUC; ISearchDataProvider <User, FriendHeader> arg_94_1 = new ConversationsSearchDataProvider(); Action <object, object> arg_94_2 = new Action <object, object>((object listBox, object selectedItem) => { FriendHeader friendHeader = selectedItem as FriendHeader; if (friendHeader != null) { bool isChat = friendHeader.UserId < 0L; long userOrChatId = Math.Abs(friendHeader.UserId); Navigator.Current.NavigateToConversation(userOrChatId, isChat, true, "", 0, false); } }); arg_94_0.Initialize <User, FriendHeader>(arg_94_1, arg_94_2, Application.Current.Resources["FriendItemTemplate"] as DataTemplate); searchUC.SearchTextBox.TextChanged += (delegate(object s, TextChangedEventArgs ev) { bool flag = searchUC.SearchTextBox.Text != ""; this.ContentPanel.Visibility = (flag ? Visibility.Collapsed : Visibility.Visible); }); this._de.HideOnNavigation = false; this._de.AnimationType = DialogService.AnimationTypes.None; this._de.BackgroundBrush = new SolidColorBrush(Colors.Transparent); this._de.Child = searchUC; this._de.Show(this.ContentPanel); }
private void AppBarSearchButton_OnClicked(object sender, EventArgs e) { DialogService expr_12 = new DialogService(); expr_12.BackgroundBrush = new SolidColorBrush(Colors.Transparent); expr_12.AnimationType = DialogService.AnimationTypes.None; expr_12.HideOnNavigation = false; DocumentsSearchDataProvider searchDataProvider = new DocumentsSearchDataProvider(this.ViewModel.Sections[this.pivot.SelectedIndex].Items.Collection); DataTemplate itemTemplate = (DataTemplate)base.Resources["ItemTemplate"]; GenericSearchUC searchUC = new GenericSearchUC(); searchUC.LayoutRootGrid.Margin = (new Thickness(0.0, 77.0, 0.0, 0.0)); searchUC.Initialize <Doc, DocumentHeader>(searchDataProvider, delegate(object p, object f) { this.list_OnSelectionChanged(p, null); }, itemTemplate); searchUC.SearchTextBox.TextChanged += (delegate(object s, TextChangedEventArgs ev) { bool flag = searchUC.SearchTextBox.Text != ""; this.pivot.Visibility = (flag ? Visibility.Collapsed : Visibility.Visible); }); expr_12.Closed += delegate(object p, EventArgs f) { this.pivot.Visibility = Visibility.Visible; this._isSearchNow = false; }; this._isSearchNow = true; expr_12.Child = searchUC; expr_12.Show(this.pivot); this.InitializeAdornerControls(); }
private void SearchButton_OnClicked(object sender, EventArgs e) { if (this.ViewModel.Managers == null) { return; } DialogService expr_20 = new DialogService(); expr_20.BackgroundBrush = new SolidColorBrush(Colors.Transparent); expr_20.AnimationType = DialogService.AnimationTypes.None; expr_20.HideOnNavigation = false; DataTemplate itemTemplate = (DataTemplate)base.Resources["ItemTemplate"]; CommunitySubscribersSearchDataProvider searchDataProvider = new CommunitySubscribersSearchDataProvider(this._communityId, this.ViewModel.CommunityType, this.ViewModel.Managers, this._isManagement, this.Pivot.SelectedItem == this.PivotItemFriends); GenericSearchUC searchUC = new GenericSearchUC(); searchUC.LayoutRootGrid.Margin = (new Thickness(0.0, 77.0, 0.0, 0.0)); searchUC.Initialize <User, LinkHeader>(searchDataProvider, delegate(object p, object f) { this.List_OnSelectionChanged(p, null); }, itemTemplate); searchUC.SearchTextBox.TextChanged += (delegate(object s, TextChangedEventArgs ev) { bool flag = searchUC.SearchTextBox.Text != ""; this.Pivot.Visibility = (flag ? Visibility.Collapsed : Visibility.Visible); }); expr_20.Closed += delegate(object p, EventArgs f) { this.Pivot.Visibility = (0); this.ViewModel.SearchViewModel = null; }; expr_20.Child = searchUC; expr_20.Show(this.Pivot); this.InitializeAdornerControls(); this.ViewModel.SearchViewModel = ((GenericSearchViewModel <User, LinkHeader>)searchUC.ViewModel).SearchVM; }
private void EnableSearch() { this._dialogService = new DialogService { BackgroundBrush = new SolidColorBrush(Colors.Transparent), AnimationType = DialogService.AnimationTypes.None, HideOnNavigation = false }; AudioSearchDataProvider searchDataProvider = new AudioSearchDataProvider(this.ViewModel.AllTracks.Collection); DataTemplate itemTemplate = (DataTemplate)Application.Current.Resources["TrackTemplate"]; GenericSearchUC searchUC = new GenericSearchUC(); searchUC.LayoutRootGrid.Margin = (new Thickness(0.0, 77.0, 0.0, 0.0)); searchUC.Initialize <AudioObj, AudioHeader>(searchDataProvider, delegate(object listBox, object selectedItem) { this.HandleAudioSelectionChanged(listBox, selectedItem, true); }, itemTemplate); searchUC.SearchTextBox.TextChanged += (delegate(object s, TextChangedEventArgs ev) { bool flag = searchUC.SearchTextBox.Text != ""; this.mainPivot.Visibility = (flag ? Visibility.Collapsed : Visibility.Visible); }); this._dialogService.Child = searchUC; this._dialogService.Show(this.mainPivot); }
private void _appBarButtonSearch_Click(object sender, EventArgs e) { this._dialogService = new DialogService { BackgroundBrush = new SolidColorBrush(Colors.Transparent), HideOnNavigation = false, AnimationType = DialogService.AnimationTypes.None }; ObservableCollection <GroupHeader> collection = this.GroupsListVM.AllVM.Collection; if (this._pickManaged) { collection = this.GroupsListVM.ManagedVM.Collection; } GroupsSearchDataProvider searchDataProvider = new GroupsSearchDataProvider(collection, this._excludedId, this._pickManaged); DataTemplate itemTemplate = (DataTemplate)Application.Current.Resources["VKGroupTemplate"]; GenericSearchUC searchUC = new GenericSearchUC(); searchUC.LayoutRootGrid.Margin = (new Thickness(0.0, 77.0, 0.0, 0.0)); searchUC.Initialize <Group, GroupHeader>(searchDataProvider, new Action <object, object>(this.HandleSelectedItem), itemTemplate); searchUC.SearchTextBox.TextChanged += (delegate(object s, TextChangedEventArgs ev) { bool flag = searchUC.SearchTextBox.Text != ""; this.pivot.Visibility = (flag ? Visibility.Collapsed : Visibility.Visible); }); this._dialogService.Child = searchUC; this._dialogService.Show(this.pivot); CommunityOpenSource lastCurrentCommunitySource = CurrentCommunitySource.Source; this._dialogService.Closed += delegate(object p, EventArgs f) { CurrentCommunitySource.Source = lastCurrentCommunitySource; }; CurrentCommunitySource.Source = CommunityOpenSource.Search; }
private void AppBarButtonSearch_Click(object sender, EventArgs e) { this._dialogService = new DialogService { BackgroundBrush = new SolidColorBrush(Colors.Transparent), HideOnNavigation = true, AnimationType = DialogService.AnimationTypes.None }; IEnumerable <User> arg_60_0 = this.PickUserVM.AllFriendsRaw; Func <User, FriendHeader> arg_60_1 = new Func <User, FriendHeader>((f) => new FriendHeader(f, false)); UsersSearchDataProvider searchDataProvider = new UsersSearchDataProvider(Enumerable.Select <User, FriendHeader>(arg_60_0, arg_60_1), !this.ForbidGlobalSearch); DataTemplate itemTemplate = (DataTemplate)Application.Current.Resources["FriendItemTemplate"]; GenericSearchUC searchUC = new GenericSearchUC(); searchUC.LayoutRootGrid.Margin = new Thickness(0.0, 77.0, 0.0, 0.0); searchUC.Initialize <User, FriendHeader>(searchDataProvider, new Action <object, object>(this.HandleSelectedItem), itemTemplate); searchUC.SearchTextBox.TextChanged += (delegate(object s, TextChangedEventArgs ev) { bool flag = searchUC.SearchTextBox.Text != string.Empty; this.pivot.Visibility = (flag ? Visibility.Collapsed : Visibility.Visible); }); this._dialogService.Child = searchUC; this._dialogService.Show(this.pivot); }
private void EnableSearch() { VideosSearchDataProvider searchDataProvider = new VideosSearchDataProvider((IEnumerable <VideoHeader>) this.ViewModel.AllVideosVM.Collection); DataTemplate dataTemplate = (DataTemplate)((FrameworkElement)this).Resources["VideoTemplate2"]; Action <object, object> selectedItemCallback = new Action <object, object>(this.HandleSearchSelectedItem); Action <string> textChangedCallback = (Action <string>)(searchString => { ((UIElement)this.mainPivot).Visibility = (searchString != "" ? Visibility.Collapsed : Visibility.Visible); this._searchQuery = searchString; }); DataTemplate itemTemplate = dataTemplate; Thickness? margin = new Thickness?(new Thickness(0.0, 77.0, 0.0, 0.0)); GenericSearchUC.CreatePopup <VKClient.Common.Backend.DataObjects.Video, VideoHeader>((ISearchDataProvider <VKClient.Common.Backend.DataObjects.Video, VideoHeader>)searchDataProvider, selectedItemCallback, textChangedCallback, itemTemplate, (Func <SearchParamsUCBase>)(() => (SearchParamsUCBase) new SearchParamsVideoUC()), margin).Show((UIElement)this.mainPivot); }
private void AppBarSearchButton_OnClicked(object sender, EventArgs e) { DocumentsSearchDataProvider searchDataProvider = new DocumentsSearchDataProvider((IEnumerable <DocumentHeader>) this.ViewModel.CurrentSection.Items.Collection); DataTemplate dataTemplate = (DataTemplate)base.Resources["ItemTemplate"]; Action <object, object> selectedItemCallback = (Action <object, object>)((p, f) => this.List_OnSelectionChanged(p, null)); Action <string> textChangedCallback = (Action <string>)(searchString => ((UIElement)this.list).Visibility = (searchString != "" ? Visibility.Collapsed : Visibility.Visible)); DataTemplate itemTemplate = dataTemplate; // ISSUE: variable of the null type Thickness? margin = new Thickness?(new Thickness(0.0, 77.0, 0.0, 0.0)); DialogService popup = GenericSearchUC.CreatePopup <Doc, DocumentHeader>((ISearchDataProvider <Doc, DocumentHeader>)searchDataProvider, selectedItemCallback, textChangedCallback, itemTemplate, null, margin); EventHandler eventHandler = (EventHandler)((o, args) => ((UIElement)this.list).Visibility = Visibility.Visible); popup.Closing += eventHandler; Grid gridContent = this.gridContent; popup.Show((UIElement)gridContent); }
private void _appBarButtonSearch_Click(object sender, EventArgs e) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type // FriendsPage.<>c__DisplayClass17_0 cDisplayClass170 = new FriendsPage.<>c__DisplayClass17_0(); // ISSUE: reference to a compiler-generated field // cDisplayClass170.<>4__this = this; DialogService dialogService = new DialogService(); dialogService.BackgroundBrush = (Brush) new SolidColorBrush(Colors.Transparent); dialogService.AnimationType = DialogService.AnimationTypes.None; int num = 0; dialogService.HideOnNavigation = num != 0; this._dialogService = dialogService; UsersSearchDataProvider searchDataProvider = new UsersSearchDataProvider((IEnumerable <FriendHeader>)Enumerable.Select <User, FriendHeader>(this.FriendsVM.AllFriendsRaw, (Func <User, FriendHeader>)(f => new FriendHeader(f, false))), this._mode == FriendsPageMode.Default); DataTemplate itemTemplate = (DataTemplate)Application.Current.Resources["FriendItemTemplate"]; // ISSUE: reference to a compiler-generated field GenericSearchUC searchUC = new GenericSearchUC(); // ISSUE: reference to a compiler-generated field ((FrameworkElement)searchUC.LayoutRootGrid).Margin = (new Thickness(0.0, 77.0, 0.0, 0.0)); // ISSUE: reference to a compiler-generated field // ISSUE: method pointer searchUC.Initialize <User, FriendHeader>((ISearchDataProvider <User, FriendHeader>)searchDataProvider, new Action <object, object>(this.HandleSearchSelectionChanged), itemTemplate); // ISSUE: reference to a compiler-generated field // ISSUE: method pointer searchUC.SearchTextBox.TextChanged += (delegate(object s, TextChangedEventArgs ev) { bool flag = searchUC.SearchTextBox.Text != string.Empty; this.pivot.Visibility = (flag ? Visibility.Collapsed : Visibility.Visible); }); // ISSUE: reference to a compiler-generated field this._dialogService.Child = (FrameworkElement)searchUC; this._dialogService.Show((UIElement)this.pivot); }