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)

  • 相关阅读:
    更换glibc版本进行调试
    HDCTF 2020 Writeup
    Srop 原理与利用方法
    form使用DELETE被转换为GET的原因
    sqlite将时间转换为本地时间读取
    firewall-cmd命令
    windows创建系统服务命令
    Open_vSwitch操作
    Dublin Core
    CWM(Common warehouse metamodel)
  • 原文地址:https://www.cnblogs.com/zey23/p/2762988.html
Copyright © 2011-2022 走看看