none
windows phone 8中重启或关机如何实现 RRS feed

  • 问题

  • 看了两天wp8api,没有找到重启或关机的api。但是应用商店中有一个restart的应用。怎么实现,多谢。
    2014年3月12日 6:56

答案

  • 你好,

    看到这里有一个例子,仅供参考。希望有所帮助。

      public void rebootPhone()
            {
                MessageBoxResult result;
                if (Convert.ToBoolean(settings["messageBox"]) == true)
                {
                    result = MessageBox.Show("Do you really want to restart your phone?", "Restart Phone", MessageBoxButton.OKCancel);
                }
                else
                    result = MessageBoxResult.OK;
    
                if (result == MessageBoxResult.OK)
                    Phone.OS.Shutdown(EWX.EWX_REBOOT);
            }

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2014年3月13日 6:30
    版主