Пример #1
0
 private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
 {
     if (ExtensibilityApp.IsLockScreenApplicationRegistered())
     {
         ExtensibilityApp.UnregisterLockScreenApplication();
     }
     useIt.IsChecked = ExtensibilityApp.IsLockScreenApplicationRegistered();
 }
Пример #2
0
 private void ButtonUnlock_ManipulationCompleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e)
 {
     if (!swipeComplete)
     {
         ExtensibilityApp.EndUnlock();
         MainSnapBack.Begin();
     }
     else
     {
         if (!App.MainViewModel.HasPasscode)
         {
             SystemProtection.RequestScreenUnlock();
         }
     }
 }
Пример #3
0
 private void CheckBox_Checked(object sender, RoutedEventArgs e)
 {
     if (bg.FileExists("Background.jpg"))
     {
         if (!ExtensibilityApp.IsLockScreenApplicationRegistered())
         {
             ExtensibilityApp.RegisterLockScreenApplication();
         }
         useIt.IsChecked = ExtensibilityApp.IsLockScreenApplicationRegistered();
     }
     else
     {
         MessageBox.Show("Choose background first");
         useIt.IsChecked = false;
     }
 }
Пример #4
0
 private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
 {
     string[] names = bg.GetFileNames();
     if (bg.FileExists("Background.jpg"))
     {
         IsolatedStorageFileStream stream = bg.OpenFile("Background.jpg", FileMode.Open, FileAccess.Read);
         BitmapImage bitmap = new BitmapImage();
         bitmap.SetSource(stream);
         bgImage.Source = bitmap;
         stream.Close();
     }
     if (IsolatedStorageSettings.ApplicationSettings.Contains("GestureLength"))
     {
         lengthSlider.Value = (double)IsolatedStorageSettings.ApplicationSettings["GestureLength"];
     }
     else
     {
         lengthSlider.Value = 0.2;
     }
     useIt.IsChecked = ExtensibilityApp.IsLockScreenApplicationRegistered();
 }
Пример #5
0
 private void ButtonUnlock_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
 {
     ExtensibilityApp.BeginUnlock();
 }
Пример #6
0
 protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
 {
     ExtensibilityApp.EndUnlock();
     MainSnapBack.Begin();
     e.Cancel = true;
 }