async private void LoadPicture()
        {
            string profilePictureUrl;

            if (string.IsNullOrEmpty(Session.ActiveSession.CurrentAccessTokenData.FacebookId))
            {
                profilePictureUrl = ProfilePicture.GetBlankProfilePictureUrl(this.CropMode == CropMode.Square);
            }
            else
            {
                profilePictureUrl = this.GetFacebookProfilePictureUrl();
            }

            var currentprofilePictureUrl = (string)this.GetValue(ImageSourceProperty);

            if (currentprofilePictureUrl != profilePictureUrl)
            {
                this.SetValue(ImageSourceProperty, profilePictureUrl);
            }
        }
示例#2
0
        private void LoadPicture()
        {
            string profilePictureUrl;

            if (string.IsNullOrEmpty(this.ProfileId))
            {
                profilePictureUrl = ProfilePicture.GetBlankProfilePictureUrl(this.CropMode == CropMode.Square);
            }
            else
            {
                profilePictureUrl = this.GetFacebookProfilePictureUrl();
            }

            var currentprofilePictureUrl = (string)this.GetValue(ImageSourceProperty);

            if (currentprofilePictureUrl != profilePictureUrl)
            {
                this.SetValue(ImageSourceProperty, profilePictureUrl);
            }
        }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/KP%20Monitor;component/Content.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.isi = ((Microsoft.Phone.Controls.Panorama)(this.FindName("isi")));
     this.login = ((Microsoft.Phone.Controls.PanoramaItem)(this.FindName("login")));
     this.opening = ((System.Windows.Controls.TextBlock)(this.FindName("opening")));
     this.home = ((Microsoft.Phone.Controls.PanoramaItem)(this.FindName("home")));
     this.profilePicture = ((Facebook.Client.Controls.ProfilePicture)(this.FindName("profilePicture")));
     this.namauser = ((System.Windows.Controls.TextBlock)(this.FindName("namauser")));
     this.userInfo = ((System.Windows.Controls.TextBlock)(this.FindName("userInfo")));
     this.post = ((Microsoft.Phone.Controls.PanoramaItem)(this.FindName("post")));
     this.postfeed = ((System.Windows.Controls.Button)(this.FindName("postfeed")));
     this.postKata = ((System.Windows.Controls.TextBox)(this.FindName("postKata")));
     this.likedata = ((Microsoft.Phone.Controls.PanoramaItem)(this.FindName("likedata")));
     this.hasilquery = ((System.Windows.Controls.TextBlock)(this.FindName("hasilquery")));
     this.query = ((System.Windows.Controls.Button)(this.FindName("query")));
     this.namapage = ((System.Windows.Controls.TextBox)(this.FindName("namapage")));
     this.reward = ((Microsoft.Phone.Controls.PanoramaItem)(this.FindName("reward")));
     this.hadiahmakan = ((System.Windows.Controls.TextBlock)(this.FindName("hadiahmakan")));
     this.hadiahminum = ((System.Windows.Controls.TextBlock)(this.FindName("hadiahminum")));
     this.postdetail = ((Microsoft.Phone.Controls.PanoramaItem)(this.FindName("postdetail")));
     this.scrollViewer1 = ((System.Windows.Controls.ScrollViewer)(this.FindName("scrollViewer1")));
     this.detailpostfb = ((System.Windows.Controls.TextBlock)(this.FindName("detailpostfb")));
     this.headerpostdetail = ((System.Windows.Controls.TextBlock)(this.FindName("headerpostdetail")));
     this.loginButton = ((Facebook.Client.Controls.LoginButton)(this.FindName("loginButton")));
     this.wait = ((System.Windows.Controls.Canvas)(this.FindName("wait")));
     this.waitteks = ((System.Windows.Controls.TextBlock)(this.FindName("waitteks")));
     this.performanceProgressBar = ((System.Windows.Controls.ProgressBar)(this.FindName("performanceProgressBar")));
 }
        private static List <GraphUser> LoadDesignData()
        {
            var data = new List <GraphUser>();

            var profilePictureUrl = new Uri(ProfilePicture.GetBlankProfilePictureUrl(true), UriKind.RelativeOrAbsolute);

            data.Add(new GraphUser {
                Id = "1", Name = "Michael Alexander", FirstName = "Michael", LastName = "Alexander", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Pilar Ackerman", FirstName = "Pilar", LastName = "Ackerman", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Yan Li", FirstName = "Yan", LastName = "Li", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Madeleine Kelly", FirstName = "Madeleine", LastName = "Kelly", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Peter Connelly", FirstName = "Peter", LastName = "Connelly", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Alicia Thornber", FirstName = "Alicia", LastName = "Thornber", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Frank Martinez", FirstName = "Frank", LastName = "Martinez", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Tina Makovec", FirstName = "Tina", LastName = "Makovec", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Lisa Toftemark", FirstName = "Lisa", LastName = "Toftemark", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Karen Toh", FirstName = "Karen", LastName = "Toh", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Peter Villadsen", FirstName = "Peter", LastName = "Villadsen", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Anna Misiec", FirstName = "Anna", LastName = "Misiec", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Doris Krieger", FirstName = "Doris", LastName = "Krieger", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Pat Coleman", FirstName = "Pat", LastName = "Coleman", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Samantha Smith", FirstName = "Samantha", LastName = "Smith", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Roman Stachnio", FirstName = "Roman", LastName = "Stachnio", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Oliver Lee", FirstName = "Oliver", LastName = "Lee", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Jacky Chan", FirstName = "Jacky", LastName = "Chan", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Daniela Guaita", FirstName = "Daniela", LastName = "Guaita", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Nina Vietzen", FirstName = "Nina", LastName = "Vietzen", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Ray Mohrman", FirstName = "Ray", LastName = "Mohrman", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Eduardo Melo", FirstName = "Eduardo", LastName = "Melo", ProfilePictureUrl = profilePictureUrl
            });
            data.Add(new GraphUser {
                Id = string.Empty, Name = "Jesse Merriam", FirstName = "Jesse", LastName = "Merriam", ProfilePictureUrl = profilePictureUrl
            });

            return(data);
        }