05.04.2022 16:14

This commit is contained in:
marcusferl@weifer.de 2022-04-05 16:14:22 +02:00
parent 14d7cc990a
commit d082b406f2
7 changed files with 57 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -32,22 +32,24 @@
</StackPanel>
<Frame x:Name="frame" Grid.Column="1" Content="" Grid.Row="1" NavigationUIVisibility="Hidden"/>
<Label Grid.Column="1" Content="IHK Prüfungsfragen für Teil 1 FIAE" HorizontalAlignment="Left" VerticalAlignment="Top" Height="65" Width="582" Foreground="White" FontSize="36" FontFamily="Tw Cen MT" Margin="102,10,0,0"/>
<TextBlock Name="website" Margin="20,30,19,17" FontSize="20" Foreground="White" FontFamily="Tw Cen MT" Width="160">
www.marcusferl.de
<TextBlock Name="website" Margin="20,30,19,17" FontSize="20" Foreground="White" FontFamily="Tw Cen MT" Width="130">
© Marcus Ferl
<TextBlock.Triggers>
<EventTrigger RoutedEvent="TextBlock.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="website"
Storyboard.TargetProperty="(TextBlock.Width)"
To="0.0" Duration="0:0:5"
AutoReverse="True" RepeatBehavior="Forever" />
Storyboard.TargetName="website"
Storyboard.TargetProperty="(TextBlock.Width)"
To="0.0" Duration="0:0:5"
AutoReverse="True" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</TextBlock.Triggers>
</TextBlock>
<Label Grid.Column="1" Content="Online Status: " HorizontalAlignment="Left" Margin="684,0,0,0" VerticalAlignment="Center" Background="{x:Null}" Foreground="#FFFDFDFD"/>
<Ellipse x:Name="online_status" Grid.Column="1" HorizontalAlignment="Left" Height="13" Margin="767,0,0,0" Stroke="Black" VerticalAlignment="Center" Width="13"/>
</Grid>
</Border>
</Window>

View File

@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
@ -15,19 +18,26 @@ using System.Windows.Shapes;
namespace Test_App
{
/// <summary>
/// Interaktionslogik für MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public static Ellipse status { get; set; }
public MainWindow()
{
InitializeComponent();
frame.NavigationService.Navigate(new Views.HomeView());
Ping_Url();
status = online_status;
}
// Buttons
private void home_on_click(object sender, RoutedEventArgs e)
{
@ -56,13 +66,30 @@ namespace Test_App
private void Drag_Window(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
this.DragMove();
if (e.ChangedButton == MouseButton.Left)
this.DragMove();
}
private void Ping_Url()
{
var hostUrl = "git.weifer.org";
Ping ping = new Ping();
try
{
PingReply result = ping.Send(hostUrl);
online_status.Fill = Brushes.Green;
}
catch (Exception ex)
{
online_status.Fill = Brushes.Red;
MessageBox.Show("Bitte deine Internetverbindung Prüfen und das Programm neu starten");
}
}
// Json Parser
}
}

View File

@ -14,3 +14,16 @@ und man viel weniger auf externe Bibliotheken wie z.B in Python abhängig ist.
<br>
<br>
![Getting Started](Images/app_datenbank.png)
<h4>#Randnotizen</h4>
Runde Fenster Kanten
Menü Button Hover -> Rahmen und Schriftgröße ändert sich (Style erstelen)
Online Status -> Ping zur webseite -> Unterscheidung Server down oder eigenes Internet down
Copy Right als Laufschrift
Doppelklick auf Item in Datenbank -> öffnet neues Fenster mit der Antwort

View File

@ -40,7 +40,8 @@ namespace Test_App.Views
}
catch (System.Net.WebException e)
{
throw e;
MainWindow.status.Fill = Brushes.Red;
MessageBox.Show("Server nicht erreichbar");
}

View File

@ -10,7 +10,7 @@
Name="MyWipedText"
Margin="20"
Width="480" Height="100" FontSize="48" FontWeight="Bold" Foreground="Maroon">
This is wiped text
Ist in Arbeit
<!-- Animates the text block's width. -->
<TextBlock.Triggers>