你好,
看到这里有一个例子,仅供参考。希望有所帮助。
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.