Пример #1
0
 private void UpdateData()
 {
     ImageLoader.SetUriSource(this.imageIcon, this.GameHeader.Icon);
     this.textBlockGenre.Text = this.GameHeader.Genre;
     this.textBlockTitle.Text = this.GameHeader.Title;
     GameViewHeaderUC.CorrectTextName(this.textBlockTitle);
     ((UIElement)this.ucMoreActions).Visibility = (this.GameHeader.IsInstalled ? Visibility.Visible : Visibility.Collapsed);
 }
Пример #2
0
        private static void OnIsSystemTrayPlaceholderVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            GameViewHeaderUC gameViewHeaderUc = d as GameViewHeaderUC;

            // ISSUE: explicit reference operation
            if (gameViewHeaderUc == null || !(e.NewValue is bool))
            {
                return;
            }
            // ISSUE: explicit reference operation
            ((UIElement)gameViewHeaderUc.borderSystemTrayPlaceholder).Visibility = ((bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed);
        }
Пример #3
0
        private static void OnMoreActionsVisibilityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            GameViewHeaderUC gameViewHeaderUc = d as GameViewHeaderUC;
            Visibility       result;

            // ISSUE: explicit reference operation
            // ISSUE: explicit reference operation
            if (gameViewHeaderUc == null || e.NewValue == null || !Enum.TryParse <Visibility>(e.NewValue.ToString(), out result))
            {
                return;
            }
            ((UIElement)gameViewHeaderUc.ucMoreActions).Visibility = result;
        }
Пример #4
0
        private static void OnGameHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            GameViewHeaderUC gameViewHeaderUc = d as GameViewHeaderUC;

            if (gameViewHeaderUc == null)
            {
                return;
            }
            // ISSUE: explicit reference operation
            if (!(e.NewValue is GameHeader))
            {
                gameViewHeaderUc.ResetData();
            }
            else
            {
                gameViewHeaderUc.UpdateData();
            }
        }
Пример #5
0
        private void MoreActions_OnTapped(object sender, System.Windows.Input.GestureEventArgs e)
        {
            e.Handled = true;
            List <MenuItem> menuItems             = new List <MenuItem>();
            MenuItem        menuItem1             = new MenuItem();
            string          notificationsSettings = CommonResources.Games_NotificationsSettings;

            menuItem1.Header = notificationsSettings;
            MenuItem menuItem2 = menuItem1;

            // ISSUE: method pointer
            menuItem2.Click += new RoutedEventHandler(this.MenuItemNotificationsSettings_OnClick);
            MenuItem menuItem3 = menuItem2;

            menuItems.Add(menuItem3);
            Grid headerPanel = this.HeaderPanel;

            GameViewHeaderUC.OpenMenu(menuItems, (DependencyObject)headerPanel);
        }
Пример #6
0
 public void InitializeComponent()
 {
     if (this._contentLoaded)
     {
         return;
     }
     this._contentLoaded = true;
     Application.LoadComponent(this, new Uri("/VKClient.Common;component/UC/GameView.xaml", UriKind.Relative));
     this.gridRoot             = (Grid)base.FindName("gridRoot");
     this.borderBackground     = (Border)base.FindName("borderBackground");
     this.ViewportCtrl         = (ViewportControl)base.FindName("ViewportCtrl");
     this.borderBackgroundMock = (Border)base.FindName("borderBackgroundMock");
     this.ContentPanel         = (MyVirtualizingStackPanel)base.FindName("ContentPanel");
     this.HeaderContentPanel   = (StackPanel)base.FindName("HeaderContentPanel");
     this.Header         = (GameViewHeaderUC)base.FindName("Header");
     this.ucFooter       = (FooterUC)base.FindName("ucFooter");
     this.loadingBar     = (ProgressBar)base.FindName("loadingBar");
     this.ucGameRequests = (GameRequestsSectionItemUC)base.FindName("ucGameRequests");
     this.WallPanel      = (MyVirtualizingPanel2)base.FindName("WallPanel");
     this.HeaderSticky   = (GameViewHeaderUC)base.FindName("HeaderSticky");
     this.panelOverlay   = (Border)base.FindName("panelOverlay");
 }