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)

  • 相关阅读:
    单行道
    学习C++50条忠告
    ROI
    OpenCV(图像处理)—访问像素的三种方法
    毕业课题项目——基于单目摄像头的距离测量
    API
    MFC
    STL
    debug、release
    Android中退出程序的提示框
  • 原文地址:https://www.cnblogs.com/zey23/p/2762988.html
Copyright © 2011-2022 走看看