Example #1
0
        public MapAttachmentPage()
        {
            MapOverlay mapOverlay = new MapOverlay();
            Point      point      = new Point(0.5, 1.0);

            mapOverlay.PositionOrigin = point;
            this._mapOverlayPushpin   = mapOverlay;
            // ISSUE: explicit constructor call
            //base.\u002Ector();
            try
            {
                this.InitializeComponent();
                Image  image = new Image();
                double num1  = 44.0;
                ((FrameworkElement)image).Height = num1;
                double num2 = 28.0;
                ((FrameworkElement)image).Width = num2;
                this._pinImage = image;
                MultiResImageLoader.SetUriSource(this._pinImage, "Resources/MapPin.png");
            }
            catch (Exception ex)
            {
                Logger.Instance.ErrorAndSaveToIso("Failed to create MapAttachmentPage", ex);
            }
        }
 public override void LoadFullyNonVirtualizableItems()
 {
     if (this._link.money_transfer == null)
     {
         VeryLowProfileImageLoader.SetUriSource(this.image, this._imageUrl.ConvertToUri());
     }
     else
     {
         MultiResImageLoader.SetUriSource(this.image, this._imageUrl);
     }
 }
Example #3
0
        private void ConfigureLeftSideImage(NotificationType type, string forcedTypeIcon)
        {
            if (this._users.Count > 0)
            {
                Image  mainUserImage = this.mainUserImage;
                object user;
                ((FrameworkElement)this.mainUserImagePlaceholder).Tag = ((User)(user = this._users[0]));
                object obj = user;
                ((FrameworkElement)mainUserImage).Tag = obj;
                ImageLoader.SetSourceForImage(this.mainUserImage, this._users[0].photo_max, false);
            }
            string str = "";

            switch (type)
            {
            case NotificationType.follow:
                str = "/Resources/FeedbackIconsFollower.png";
                break;

            case NotificationType.friend_accepted:
                str = "/Resources/FeedbackIconsRequest.png";
                break;

            case NotificationType.like_post:
            case NotificationType.like_comment:
            case NotificationType.like_photo:
            case NotificationType.like_video:
            case NotificationType.like_comment_photo:
            case NotificationType.like_comment_video:
            case NotificationType.like_comment_topic:
                str = "/Resources/FeedbackIconsLike.png";
                break;

            case NotificationType.copy_post:
            case NotificationType.copy_photo:
            case NotificationType.copy_video:
                str = "/Resources/FeedbackIconsRepost.png";
                break;
            }
            if (forcedTypeIcon != null)
            {
                str = forcedTypeIcon;
            }
            MultiResImageLoader.SetUriSource(this.imageIcon, str);
        }
Example #4
0
        private static void OnTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PublishSocialUC publishSocialUc = d as PublishSocialUC;

            // ISSUE: explicit reference operation
            if (publishSocialUc == null || !(e.NewValue is PublishSocialType))
            {
                return;
            }
            // ISSUE: explicit reference operation
            switch ((PublishSocialType)e.NewValue)
            {
            case PublishSocialType.Twitter:
                MultiResImageLoader.SetUriSource(publishSocialUc.imageIcon, "/Resources/NewPost/ImportTwitter.png");
                break;

            case PublishSocialType.Facebook:
                MultiResImageLoader.SetUriSource(publishSocialUc.imageIcon, "/Resources/NewPost/ImportFacebook.png");
                break;
            }
        }
Example #5
0
        private static Canvas GetOptionsIcon()
        {
            Canvas canvas = new Canvas();
            double num1   = 64.0;

            ((FrameworkElement)canvas).Width = num1;
            double num2 = 64.0;

            ((FrameworkElement)canvas).Height = num2;
            SolidColorBrush solidColorBrush = new SolidColorBrush(Colors.Transparent);

            ((Panel)canvas).Background = ((Brush)solidColorBrush);
            Border border1 = new Border();
            double num3    = 56.0;

            ((FrameworkElement)border1).Width = num3;
            double num4 = 56.0;

            ((FrameworkElement)border1).Height = num4;
            Border border2 = border1;
            Image  image1  = new Image();
            int    num5    = 1;

            ((FrameworkElement)image1).VerticalAlignment = ((VerticalAlignment)num5);
            int num6 = 1;

            ((FrameworkElement)image1).HorizontalAlignment = ((HorizontalAlignment)num6);
            Image image2 = image1;

            MultiResImageLoader.SetUriSource(image2, "/Resources/WallPost/CardActions.png");
            border2.Child = ((UIElement)image2);
            Canvas.SetLeft((UIElement)border2, (64.0 - ((FrameworkElement)border2).Width) / 2.0 - 4.0);
            Canvas.SetTop((UIElement)border2, (64.0 - ((FrameworkElement)border2).Height) / 2.0);
            ((PresentationFrameworkCollection <UIElement>)((Panel)canvas).Children).Add((UIElement)border2);
            double num7 = 1.5;

            MetroInMotion.SetTilt((DependencyObject)canvas, num7);
            return(canvas);
        }
        private void SetPushpin(GeoCoordinate geoCoordinate, bool needCenter)
        {
            Image  image1 = new Image();
            double num1   = 44.0;

            ((FrameworkElement)image1).Height = num1;
            double num2 = 28.0;

            ((FrameworkElement)image1).Width = num2;
            Image image2 = image1;

            MultiResImageLoader.SetUriSource(image2, "/Resources/MapPin.png");
            this._mapOverlayPushpin.Content       = image2;
            this._mapOverlayPushpin.GeoCoordinate = geoCoordinate;
            this.ViewModel.GeoCoordinate          = geoCoordinate;
            if (!needCenter)
            {
                return;
            }
            this.Map.Center    = geoCoordinate;
            this.Map.ZoomLevel = 12.0;
        }
        private static Canvas GetOptionsIcon()
        {
            Canvas canvas = new Canvas();

            canvas.Width      = 64.0;
            canvas.Height     = 64.0;
            canvas.Background = new SolidColorBrush(Colors.Transparent);
            Border border1 = new Border();

            border1.Width  = 56.0;
            border1.Height = 56.0;
            Image image2 = new Image();

            image2.VerticalAlignment   = VerticalAlignment.Center;
            image2.HorizontalAlignment = HorizontalAlignment.Center;
            MultiResImageLoader.SetUriSource(image2, "/Resources/WallPost/CardActions.png");
            border1.Child = image2;
            Canvas.SetLeft(border1, (64.0 - border1.Width) / 2.0);
            Canvas.SetTop(border1, (64.0 - border1.Height) / 2.0);
            canvas.Children.Add(border1);
            MetroInMotion.SetTilt(canvas, 1.5);
            return(canvas);
        }