コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }