/// <summary> /// Metoda MenuClick(object sender, TextChangedEventArgs e) podczas wywolania uaktualnie wybrana zakladke /// </summary> /// <param name="sender">Argument typu object, ktory przekazuje obiekt</param> /// <param name="e">Argument typu RoutedEventArgs, ktory przekazuje wszystkie informacje o zdarzeniu </param> private void MenuClick(object sender, RoutedEventArgs e) { int index = int.Parse(((Button)e.Source).Uid); GridCursor.SetValue(Grid.ColumnProperty, index); ScheduleGrid.Visibility = Visibility.Hidden; WorkersGrid.Visibility = Visibility.Hidden; HolidayGrid.Visibility = Visibility.Hidden; ListsGrid.Visibility = Visibility.Hidden; switch (index) { case 0: ScheduleGrid.Visibility = Visibility.Visible; break; case 1: WorkersGrid.Visibility = Visibility.Visible; break; case 2: HolidayGrid.Visibility = Visibility.Visible; break; case 3: ListsGrid.Visibility = Visibility.Visible; break; } }
private void Button_Click(object sender, RoutedEventArgs e) { int index = int.Parse(((Button)e.Source).Uid); switch (index) { case 0: GridMain.Children.Clear(); GridMain.Children.Add(new BeginnerWorkout()); GridCursor.SetValue(Grid.ColumnProperty, index); break; case 1: GridMain.Children.Clear(); GridMain.Children.Add(new AdvancedWorkout()); GridCursor.SetValue(Grid.ColumnProperty, index); break; case 2: GridMain.Children.Clear(); GridMain.Children.Add(new ExpertWorkout()); GridCursor.SetValue(Grid.ColumnProperty, index); break; default: break; } }
// wechselt zwischen frühstück, mittagessen und abendessen private void Button_Click(object sender, RoutedEventArgs e) { int index = int.Parse(((Button)e.Source).Uid); switch (index) { case 0: Breakfast(); GridCursor.SetValue(Grid.ColumnProperty, index); break; case 1: Lunch(); GridCursor.SetValue(Grid.ColumnProperty, index); break; case 2: Dinner(); GridCursor.SetValue(Grid.ColumnProperty, index); break; default: break; } }
private void LoadDefault() { GridMain.Children.Add(new BeginnerWorkout()); GridCursor.SetValue(Grid.ColumnProperty, 0); }
// lädt standard grid der seite private void LoadDefault() { Breakfast(); GridCursor.SetValue(Grid.ColumnProperty, 0); }