WP8.1 windows phone 8.1 二次退出

public MainPage()
{ HardwareButtons.BackPressed += HardwareButtons_BackPressed; //注册后退键 } private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
{
Frame frame = Window.Current.Content as Frame;
if(frame==null)
{
return;
}
if(frame.CanGoBack)
{
frame.GoBack();
e.Handled = true; //正常页面的推出
}
else
{
Back_Key++;//记录器
if (Back_Key == )
{ Main_Pivot.Opacity = 0.5;
Back_Text.Visibility = Visibility.Visible;
Back_Border.Visibility = Visibility.Visible;
Main_Pivot.IsEnabled = false;

DT = new DispatcherTimer();//计时器
DT.Interval = new TimeSpan(0, 0, 1);

DT.Start();
DT.Tick += DT_Tick;
e.Handled = true;
}
else
{ App.Current.Exit();//完全退出
} } }
上一篇:《Spark MLlib机器学习实践》内容简介、目录


下一篇:如何查询数据库中所有表格,或者查询是否存在某个表格-mysql和oracle