Beispiel #1
0
 private void Pageload()
 {
     if (!FunctionManager.IsFunctionAdded("Map"))
     {
         Location_Selection.Visibility = Visibility.Visible;
         MapSwitch.IsOn = true;
     }
     if (!FunctionManager.IsFunctionAdded("Flight"))
     {
         Flight_Selection.Visibility = Visibility.Visible;
         FlightSwitch.IsOn           = true;
     }
     if (!FunctionManager.IsFunctionAdded("Translation"))
     {
         Translation_Selection.Visibility = Visibility.Visible;
         TranslationSwitch.IsOn           = true;
     }
     if (!FunctionManager.IsFunctionAdded("Weather"))
     {
         Weather_Selection.Visibility = Visibility.Visible;
         WeatherSwitch.IsOn           = true;
     }
     if (!FunctionManager.IsFunctionAdded("Photo"))
     {
         Photos_Selection.Visibility = Visibility.Visible;
         PhotoSwitch.IsOn            = true;
     }
     if (!FunctionManager.IsFunctionAdded("News"))
     {
         NewsList_Selection.Visibility = Visibility.Visible;
         NewsSwitch.IsOn = true;
     }
 }
Beispiel #2
0
 private void NewsSwitch_Toggled(object sender, RoutedEventArgs e)
 {
     if (NewsSwitch.IsOn)
     {
         NewsList_Selection.Visibility = Visibility.Visible;
         if (FunctionManager.IsFunctionAdded("News"))
         {
             FunctionManager.FunctionRemove("News");
         }
     }
     else if (!NewsSwitch.IsOn)
     {
         NewsList_Selection.Visibility = Visibility.Collapsed;
         MyFrame.Navigate(typeof(Homepage));
         if (!FunctionManager.IsFunctionAdded("News"))
         {
             FunctionManager.FunctionAdd("News");
         }
     }
 }