Пример #1
0
        void breboot_TapEvent(object sender)
        {
            var rebootAlert = new AlertWindow(WindowAlertPeriod);

            rebootAlert.SetText("Do you really want to reboot?");
            rebootAlert.SetPositiveButton("Yes", delegate
            {
                Microsoft.SPOT.Hardware.PowerState.RebootDevice(true);
            });
            rebootAlert.SetNegativeButton("No", delegate { rebootAlert.Dismiss(); });
            rebootAlert.Show();
        }
Пример #2
0
 void bclear_TapEvent(object sender)
 {
     // Clear cache
     if (clearCache())
     {
         // Cache cleared successfully
         var cacheSuccessAlert = new AlertWindow(WindowAlertPeriod);
         cacheSuccessAlert.SetText("Cache cleared!");
         cacheSuccessAlert.SetPositiveButton("Ok", delegate { cacheSuccessAlert.Dismiss(); });
         cacheSuccessAlert.Show();
     }
     else
     {
         // Cache clear failed
     }
 }