zoukankan      html  css  js  c++  java
  • windows 8 获取用户账号信息

    using Windows.UI.Xaml.Media.Imaging;
    using Windows.System.UserProfile;

    string.IsNullOrEmpty(lastName) 

    获取第一名称

         string firstName = await UserInformation.GetFirstNameAsync();

    获取用户第二名称

        string lastName = await UserInformation.GetLastNameAsync();

    获取用户

       string displayName = await UserInformation.GetDisplayNameAsync();

    设置用户 头像

                    FileOpenPicker imagePicker = new FileOpenPicker                

                 {                 

                             ViewMode = PickerViewMode.Thumbnail,                    

                             SuggestedStartLocation = PickerLocationId.PicturesLibrary,                   

                            FileTypeFilter = { ".jpg", ".jpeg", ".png", ".bmp" }                

                 };

                    StorageFile imageFile = await imagePicker.PickSingleFileAsync();                

                  SetAccountPictureResult result = await UserInformation.SetAccountPicturesAsync(null, imageFile, null);                    

                  if (result == SetAccountPictureResult.Success)

  • 相关阅读:
    51nod1376 最长递增子序列的数量
    51nod1201 整数划分
    51nod1202 子序列个数
    51nod 博弈论水题
    51nod1052 最大M子段和
    51nod1678 lyk与gcd
    51nod1262 扔球
    BZOJ2763, 最短路
    吃西瓜 最大子矩阵 三维的。 rqnoj93
    noip2015 信息传递 强连通块
  • 原文地址:https://www.cnblogs.com/zey23/p/2762988.html
Copyright © 2011-2022 走看看