private void Click(object sender, RoutedEventArgs e)
        {
            if (sender == credits)
            {
                Frame.Navigate(typeof(Credits));
                return;
            }
            else if (sender == volumeOn || sender == volumeOff)
            {
                Sounddesign.PlaySoundAsync(Sounddesign.BUTTON_PUSH1);
                Sounddesign.CycleAmbient();
                volumeOn.Visibility  = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Collapsed : Visibility.Visible;
                volumeOff.Visibility = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Visible : Visibility.Collapsed;
                return;
            }

            if (App.OFFLINE_MODE)
            {
                return;
            }
            Sounddesign.PlaySoundAsync(Sounddesign.BUTTON_PUSH2);
            IsLogin = !IsLogin;
            ToggleAuswahl.IsChecked = true;
            ToggleAuswahl.Content   = IsLogin ? "Login" : "Registrieren";
            loginButton.Content     = IsLogin ? "Login" : "Registrieren";
            pwdConfirm.Visibility   = IsLogin ? Visibility.Collapsed : Visibility.Visible;
        }
 /* Musik ändern */
 private void ChangeMusic()
 {
     Sounddesign.PlaySoundAsync(Sounddesign.BUTTON_PUSH1);
     Sounddesign.CycleAmbient();
     volumeOn.Visibility  = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Collapsed : Visibility.Visible;
     volumeOff.Visibility = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Visible : Visibility.Collapsed;
 }
 private void Click(object sender, RoutedEventArgs e)
 {
     if (sender == Logout)
     {
         App.Abmelden(null);
     }
     else if (sender == volumeOn || sender == volumeOff)
     {
         Sounddesign.PlaySoundAsync(Sounddesign.BUTTON_PUSH1);
         Sounddesign.CycleAmbient();
         volumeOn.Visibility  = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Collapsed : Visibility.Visible;
         volumeOff.Visibility = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Visible : Visibility.Collapsed;
     }
 }
Beispiel #4
0
 private void Click(object sender, RoutedEventArgs e)
 {
     Sounddesign.PlaySoundAsync(Sounddesign.BUTTON_PUSH1);
     if (sender == Undo)
     {
         spiellogik.spController.Undo();
     }
     else if (sender == PrevOb)
     {
         spiellogik.PrevObjekt();
     }
     else if (sender == NextOb)
     {
         spiellogik.NextObjekt();
     }
     else if (sender == Forward)
     {
         MoveToHighScore();
     }
     else if (sender == Menu)
     {
         popup.IsOpen = !popup.IsOpen;
     }
     else if (sender == volumeOff || sender == volumeOn)
     {
         Sounddesign.PlaySoundAsync(Sounddesign.BUTTON_PUSH1);
         Sounddesign.CycleAmbient();
         volumeOn.Visibility  = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Collapsed : Visibility.Visible;
         volumeOff.Visibility = Sounddesign.CURRENT_AMBIENT == null ? Visibility.Visible : Visibility.Collapsed;
     }
     else if (sender == Back)
     {
         spiellogik.Cancel();
         Frame.Navigate(previous.GetType());
     }
 }