עליך להתחבר בכדי להוריד קבצים מהאתר
על מנת להבטיח שמשאבינו לא ינוצלו לרעה.
1: <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
2: <TextBlock Name="txtDate" HorizontalAlignment="Center"></TextBlock>
3: <TextBlock Name="txtTime" HorizontalAlignment="Center"></TextBlock>
4: <Button Name="btnDateTime" Content="Get Time" Click="btnDateTime_Click" HorizontalAlignment="Center"></Button>
5: </StackPanel>
1: private void btnDateTime_Click(object sender, RoutedEventArgs e)
2: {
3: CultureInfo he_il = new CultureInfo("he-IL");
4: txtDate.Text = DateTime.Now.ToString("d", he_il);
5: txtTime.Text = DateTime.Now.ToString("t", he_il);
6: }
#if WINDOWS_APP . . . #endif |
#if WINDOWS_PHONE_APP . . . #endif |
1: protected override void OnNavigatedTo(NavigationEventArgs e)
2: {
3: #if WINDOWS_APP
4: btnDateTime.FontSize = 45;
5: #endif
6: #if WINDOWS_PHONE_APP
7: btnDateTime.FontSize = 30;
8: #endif
9: }
1: private void btnDateTime_Click(object sender, RoutedEventArgs e)
2: {
3: CultureInfo he_il = new CultureInfo("he-IL");
4: txtDate.Text = DateTime.Now.ToString("d", he_il);
5: txtTime.Text = DateTime.Now.ToString("t", he_il);
6: #if WINDOWS_APP
7: txtDate.Foreground = new SolidColorBrush(Colors.Green);
8: txtTime.Foreground = new SolidColorBrush(Colors.Green);
9: txtDate.FontSize = 250;
10: txtTime.FontSize = 250;
11: #endif
12: #if WINDOWS_PHONE_APP
13: txtDate.Foreground = new SolidColorBrush(Colors.Yellow);
14: txtTime.Foreground = new SolidColorBrush(Colors.Yellow);
15: txtDate.FontSize = 50;
16: txtTime.FontSize = 50;
17: #endif
18: }