private void List_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExtendedLongListSelector longListSelector = (ExtendedLongListSelector)sender;
            LinkHeader item = longListSelector.SelectedItem as LinkHeader;

            if (item == null)
            {
                return;
            }
            longListSelector.SelectedItem = ((object)null);
            if (!this._isPicker)
            {
                Navigator.Current.NavigateToUserProfile(item.Id, item.User.Name, "", false);
            }
            else if (item.Id != AppGlobalStateManager.Current.LoggedInUserId && (this.ViewModel.Managers == null || this.ViewModel.Managers.All <User>((Func <User, bool>)(m => m.id != item.Id))))
            {
                if (!this._isBlockingPicker)
                {
                    Navigator.Current.NavigateToCommunityManagementManagerAdding(this.ViewModel.CommunityId, this.ViewModel.CommunityType, item.User, true);
                }
                else
                {
                    Navigator.Current.NavigateToCommunityManagementBlockAdding(this.ViewModel.CommunityId, item.User, false);
                }
            }
            else
            {
                new GenericInfoUC().ShowAndHideLater(CommonResources.Error, (FrameworkElement)null);
            }
        }
Exemplo n.º 2
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/FavoritesPage.xaml", UriKind.Relative));
     this.LayoutRoot        = (Grid)base.FindName("LayoutRoot");
     this.ucHeader          = (GenericHeaderUC)base.FindName("ucHeader");
     this.pivot             = (Pivot)base.FindName("pivot");
     this.pivotItemPhotos   = (PivotItem)base.FindName("pivotItemPhotos");
     this.photosListBox     = (ExtendedLongListSelector)base.FindName("photosListBox");
     this.pivotItemVideos   = (PivotItem)base.FindName("pivotItemVideos");
     this.videosListBox     = (ExtendedLongListSelector)base.FindName("videosListBox");
     this.pivotItemPosts    = (PivotItem)base.FindName("pivotItemPosts");
     this.scrollPosts       = (ViewportControl)base.FindName("scrollPosts");
     this.stackPanelPosts   = (MyVirtualizingStackPanel)base.FindName("stackPanelPosts");
     this.panelPosts        = (MyVirtualizingPanel2)base.FindName("panelPosts");
     this.pivotItemPersons  = (PivotItem)base.FindName("pivotItemPersons");
     this.usersListBox      = (ExtendedLongListSelector)base.FindName("usersListBox");
     this.pivotItemLinks    = (PivotItem)base.FindName("pivotItemLinks");
     this.linksListBox      = (ExtendedLongListSelector)base.FindName("linksListBox");
     this.pivotItemProducts = (PivotItem)base.FindName("pivotItemProducts");
     this.productsListBox   = (ExtendedLongListSelector)base.FindName("productsListBox");
     this.ucPullToRefresh   = (PullToRefreshUC)base.FindName("ucPullToRefresh");
 }
Exemplo n.º 3
0
        private void GroupsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExtendedLongListSelector longListSelector = sender as ExtendedLongListSelector;

            this.HandleSelectedItem((object)longListSelector, longListSelector.SelectedItem);
            longListSelector.SelectedItem = ((object)null);
        }
Exemplo n.º 4
0
 private void UpdateAppBar()
 {
     if (this.OwnPhotos || this.EditableGroupPhotos)
     {
         if (this.CommonParameters.PickMode)
         {
             this.ApplicationBar = (null);
         }
         else
         {
             this.ApplicationBar = (!this._isInEditMode ? (IApplicationBar)this._albumsAppBar : (IApplicationBar)this._editAppBar);
         }
     }
     else
     {
         this.ApplicationBar = (null);
         ExtendedLongListSelector itemsControlAlbums = this.itemsControlAlbums;
         Thickness margin = ((FrameworkElement)this.itemsControlAlbums).Margin;
         // ISSUE: explicit reference operation
         double left = ((Thickness)@margin).Left;
         margin = ((FrameworkElement)this.itemsControlAlbums).Margin;
         // ISSUE: explicit reference operation
         double top = ((Thickness)@margin).Top;
         margin = ((FrameworkElement)this.itemsControlAlbums).Margin;
         // ISSUE: explicit reference operation
         double    right     = ((Thickness)@margin).Right;
         double    num       = -72.0;
         Thickness thickness = new Thickness(left, top, right, num);
         ((FrameworkElement)itemsControlAlbums).Margin = thickness;
     }
     this._appBarButtonDelete.IsEnabled = (this.listBoxAlbums.SelectedItems.Count > 0);
 }
        private void FriendsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExtendedLongListSelector longListSelector = sender as ExtendedLongListSelector;
            object selectedItem = longListSelector.SelectedItem;

            this.HandleSelectedItem(longListSelector, selectedItem);
            longListSelector.SelectedItem = null;
        }
Exemplo n.º 6
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Audio;component/UserControls/AlbumsUC.xaml", UriKind.Relative));
     this.AllAlbums = (ExtendedLongListSelector)base.FindName("AllAlbums");
 }
Exemplo n.º 7
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     return;
       this._contentLoaded = true;
       Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/CountryPickerUC.xaml", UriKind.Relative));
       this.textBoxSearch = (TextBox) base.FindName("textBoxSearch");
       this.textBlockWatermarkText = (TextBlock) base.FindName("textBlockWatermarkText");
       this.countriesList = (ExtendedLongListSelector) base.FindName("countriesList");
 }
Exemplo n.º 8
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/FriendsRecommendationsUC.xaml", UriKind.Relative));
     this.ItemsList = (ExtendedLongListSelector)base.FindName("ItemsList");
 }
Exemplo n.º 9
0
        private void List_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExtendedLongListSelector longListSelector = (ExtendedLongListSelector)sender;

            if (!(longListSelector.SelectedItem is FriendHeader))
            {
                return;
            }
            longListSelector.SelectedItem = null;
        }
Exemplo n.º 10
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/FriendsSearchUC.xaml", UriKind.Relative));
     this.listBoxUsers = (ExtendedLongListSelector)base.FindName("listBoxUsers");
 }
Exemplo n.º 11
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Video;component/VideoCatalog/CatalogItemsHorizontalExtUC.xaml", UriKind.Relative));
     this.LayoutRoot        = (Grid)base.FindName("LayoutRoot");
     this.horizontalListBox = (ExtendedLongListSelector)base.FindName("horizontalListBox");
 }
Exemplo n.º 12
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/BirthdaysPage.xaml", UriKind.Relative));
     this.ucHeader = (GenericHeaderUC)base.FindName("ucHeader");
     this.listBox  = (ExtendedLongListSelector)base.FindName("listBox");
 }
Exemplo n.º 13
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Photos;component/UC/PickAlbumUC.xaml", UriKind.Relative));
     this.LayoutRoot    = (Grid)base.FindName("LayoutRoot");
     this.listBoxAlbums = (ExtendedLongListSelector)base.FindName("listBoxAlbums");
 }
Exemplo n.º 14
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/MentionPickerUC.xaml", UriKind.Relative));
     this.mainPanel = (Grid)base.FindName("mainPanel");
     this.listBox   = (ExtendedLongListSelector)base.FindName("listBox");
 }
Exemplo n.º 15
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/Registration/RegistrationStep6UC.xaml", UriKind.Relative));
     this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
     this.list       = (ExtendedLongListSelector)base.FindName("list");
 }
Exemplo n.º 16
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/GamesMainPage.xaml", UriKind.Relative));
     this.HeaderUC        = (GenericHeaderUC)base.FindName("HeaderUC");
     this.ucPullToRefresh = (PullToRefreshUC)base.FindName("ucPullToRefresh");
     this.listBoxGames    = (ExtendedLongListSelector)base.FindName("listBoxGames");
 }
Exemplo n.º 17
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/AttachmentPickerUC.xaml", UriKind.Relative));
     this.scrollViewer  = (ScrollViewer)base.FindName("scrollViewer");
     this.listBoxPhotos = (ExtendedLongListSelector)base.FindName("listBoxPhotos");
     this.borderLoading = (Border)base.FindName("borderLoading");
 }
Exemplo n.º 18
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/PickerUC.xaml", UriKind.Relative));
     this.LayoutRoot       = (Grid)base.FindName("LayoutRoot");
     this.ApplicationTitle = (TextBlock)base.FindName("ApplicationTitle");
     this.listPicker       = (ExtendedLongListSelector)base.FindName("listPicker");
 }
Exemplo n.º 19
0
        private void AllAudios_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExtendedLongListSelector longListSelector = sender as ExtendedLongListSelector;
            AudioHeader audioHeader = (longListSelector != null ? longListSelector.SelectedItem : null) as AudioHeader;

            if (audioHeader == null)
            {
                return;
            }
            audioHeader.TryAssignTrack();
            longListSelector.SelectedItem = null;
        }
Exemplo n.º 20
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Audio;component/UserControls/PlaylistUC.xaml", UriKind.Relative));
     this.LayoutRoot     = (Grid)base.FindName("LayoutRoot");
     this.textBlockTitle = (TextBlock)base.FindName("textBlockTitle");
     this.AllAudios      = (ExtendedLongListSelector)base.FindName("AllAudios");
 }
Exemplo n.º 21
0
        private void List_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ExtendedLongListSelector longListSelector = (ExtendedLongListSelector)sender;
            LinkHeader selectedItem = longListSelector.SelectedItem as LinkHeader;

            if (selectedItem == null)
            {
                return;
            }
            longListSelector.SelectedItem = null;
            Navigator.Current.NavigateToUserProfile(selectedItem.Id, "", "", false);
        }
Exemplo n.º 22
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Groups;component/Management/InvitationsPage.xaml", UriKind.Relative));
     this.Header        = (GenericHeaderUC)base.FindName("Header");
     this.List          = (ExtendedLongListSelector)base.FindName("List");
     this.PullToRefresh = (PullToRefreshUC)base.FindName("PullToRefresh");
 }
Exemplo n.º 23
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/SettingsPrivacyPage.xaml", UriKind.Relative));
     this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
     this.Header     = (GenericHeaderUC)base.FindName("Header");
     this.mainList   = (ExtendedLongListSelector)base.FindName("mainList");
 }
Exemplo n.º 24
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent((object)this, new Uri("/VKClient.Common;component/Market/Views/MarketAlbumsPage.xaml", UriKind.Relative));
     this.ucHeader        = (GenericHeaderUC)this.FindName("ucHeader");
     this.ucPullToRefresh = (PullToRefreshUC)this.FindName("ucPullToRefresh");
     this.listBoxAlbums   = (ExtendedLongListSelector)this.FindName("listBoxAlbums");
 }
Exemplo n.º 25
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/GenericSearchUC.xaml", UriKind.Relative));
     this.LayoutRoot             = (Grid)base.FindName("LayoutRoot");
     this.searchTextBox          = (TextBox)base.FindName("searchTextBox");
     this.textBlockWatermarkText = (TextBlock)base.FindName("textBlockWatermarkText");
     this.searchResultsListBox   = (ExtendedLongListSelector)base.FindName("searchResultsListBox");
 }
Exemplo n.º 26
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Photos;component/PhotosMainPage.xaml", UriKind.Relative));
     this.Header             = (GenericHeaderUC)base.FindName("Header");
     this.itemsControlAlbums = (ExtendedLongListSelector)base.FindName("itemsControlAlbums");
     this.listBoxAlbums      = (MyListBox)base.FindName("listBoxAlbums");
     this.ucPullToRefresh    = (PullToRefreshUC)base.FindName("ucPullToRefresh");
 }
Exemplo n.º 27
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UsersSearchResultsPage.xaml", UriKind.Relative));
     this.textBoxSearch          = (TextBox)base.FindName("textBoxSearch");
     this.textBlockWatermarkText = (TextBlock)base.FindName("textBlockWatermarkText");
     this.listBoxUsers           = (ExtendedLongListSelector)base.FindName("listBoxUsers");
     this.ucPullToRefresh        = (PullToRefreshUC)base.FindName("ucPullToRefresh");
 }
Exemplo n.º 28
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/FriendRequestsPage.xaml", UriKind.Relative));
     this.LayoutRoot            = (Grid)base.FindName("LayoutRoot");
     this.listBoxFriendRequests = (ExtendedLongListSelector)base.FindName("listBoxFriendRequests");
     this.ucHeader        = (GenericHeaderUC)base.FindName("ucHeader");
     this.ucPullToRefresh = (PullToRefreshUC)base.FindName("ucPullToRefresh");
 }
Exemplo n.º 29
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent((object)this, new Uri("/VKClient.Common;component/Profiles/Users/Views/SubscriptionsPage.xaml", UriKind.Relative));
     this.ucHeader   = (GenericHeaderUC)this.FindName("ucHeader");
     this.pivot      = (Pivot)this.FindName("pivot");
     this.listPages  = (ExtendedLongListSelector)this.FindName("listPages");
     this.listGroups = (ExtendedLongListSelector)this.FindName("listGroups");
 }
Exemplo n.º 30
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Video;component/VideoCatalog/UserVideosUC.xaml", UriKind.Relative));
     this.LayoutRoot      = (Grid)base.FindName("LayoutRoot");
     this.listBoxAdded    = (ExtendedLongListSelector)base.FindName("listBoxAdded");
     this.listBoxUploaded = (ExtendedLongListSelector)base.FindName("listBoxUploaded");
     this.listBoxAlbums   = (ExtendedLongListSelector)base.FindName("listBoxAlbums");
 }