예제 #1
0
 private void SetPickerVisibility(TimePartVisibility visibility)
 {
     SetVisibility(_hourInput, _minuteInput, _secondInput, visibility);
     SetAmPmVisibility();
 }
예제 #2
0
 private void SetHandVisibility(TimePartVisibility visibility)
 {
     SetVisibility(_hourHand, _minuteHand, _secondHand, visibility);
 }
예제 #3
0
 private static void SetVisibility(UIElement partHours, UIElement partMinutes, UIElement partSeconds, TimePartVisibility visibility)
 {
     if (partHours != null)
     {
         partHours.Visibility = visibility.HasFlag(TimePartVisibility.Hour) ? Visibility.Visible : Visibility.Collapsed;
     }
     if (partMinutes != null)
     {
         partMinutes.Visibility = visibility.HasFlag(TimePartVisibility.Minute) ? Visibility.Visible : Visibility.Collapsed;
     }
     if (partSeconds != null)
     {
         partSeconds.Visibility = visibility.HasFlag(TimePartVisibility.Second) ? Visibility.Visible : Visibility.Collapsed;
     }
 }
예제 #4
0
 private void SetPickerVisibility(TimePartVisibility visibility)
 {
     SetVisibility(_hourInput, _minuteInput, _secondInput, visibility);
     SetAmPmVisibility();
 }
예제 #5
0
 private void SetHandVisibility(TimePartVisibility visibility)
 {
     SetVisibility(_hourHand, _minuteHand, _secondHand, visibility);
 }
예제 #6
0
 private static void SetVisibility(UIElement partHours, UIElement partMinutes, UIElement partSeconds, TimePartVisibility visibility)
 {
     if (partHours != null)
     {
         partHours.Visibility = visibility.HasFlag(TimePartVisibility.Hour) ? Visibility.Visible : Visibility.Collapsed;
     }
     if (partMinutes != null)
     {
         partMinutes.Visibility = visibility.HasFlag(TimePartVisibility.Minute) ? Visibility.Visible : Visibility.Collapsed;
     }
     if (partSeconds != null)
     {
         partSeconds.Visibility = visibility.HasFlag(TimePartVisibility.Second) ? Visibility.Visible : Visibility.Collapsed;
     }
 }