Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 60ed10ffef | |||
| d62139afc9 | |||
| 2b8ed17f52 |
3 changed files with 38 additions and 16 deletions
|
|
@ -6,11 +6,11 @@
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
Topmost="True"
|
Topmost="False"
|
||||||
SizeToContent="WidthAndHeight">
|
SizeToContent="WidthAndHeight">
|
||||||
<Border Background="#AA000000" CornerRadius="8" Padding="20,10">
|
<Border Background="#AA000000" CornerRadius="8" Padding="20,10">
|
||||||
<TextBlock x:Name="TxtClock"
|
<TextBlock x:Name="TxtClock"
|
||||||
Foreground="White" FontSize="48" FontWeight="Light"
|
Foreground="White" FontSize="48" FontWeight="Light"
|
||||||
FontFamily="Segoe UI"/>
|
FontFamily="Consolas"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@
|
||||||
IsHitTestVisible="False">
|
IsHitTestVisible="False">
|
||||||
<TextBlock x:Name="TxtClock"
|
<TextBlock x:Name="TxtClock"
|
||||||
Foreground="White" FontSize="48" FontWeight="Light"
|
Foreground="White" FontSize="48" FontWeight="Light"
|
||||||
FontFamily="Segoe UI"/>
|
FontFamily="Consolas"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Radio-Cover bei Audio-Streams -->
|
<!-- Radio-Cover bei Audio-Streams -->
|
||||||
|
|
|
||||||
|
|
@ -105,12 +105,14 @@ public partial class MainWindow : Window
|
||||||
var time = DateTime.Now.ToString("HH:mm:ss");
|
var time = DateTime.Now.ToString("HH:mm:ss");
|
||||||
TxtClock.Text = time;
|
TxtClock.Text = time;
|
||||||
_clockWindow?.UpdateTime(time);
|
_clockWindow?.UpdateTime(time);
|
||||||
PositionClockWindow();
|
// Nur neu positionieren wenn Hauptfenster bewegt wurde - nicht jede Sekunde
|
||||||
};
|
};
|
||||||
|
|
||||||
Loaded += MainWindow_Loaded;
|
Loaded += MainWindow_Loaded;
|
||||||
Closing += MainWindow_Closing;
|
Closing += MainWindow_Closing;
|
||||||
KeyDown += MainWindow_KeyDown;
|
KeyDown += MainWindow_KeyDown;
|
||||||
|
LocationChanged += (_, _) => PositionClockWindow();
|
||||||
|
SizeChanged += (_, _) => PositionClockWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnVideoDoubleClick(object sender, MouseButtonEventArgs e)
|
private void OnVideoDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
|
|
@ -425,6 +427,14 @@ public partial class MainWindow : Window
|
||||||
WebView.Visibility = Visibility.Collapsed;
|
WebView.Visibility = Visibility.Collapsed;
|
||||||
VideoView.Visibility = Visibility.Visible;
|
VideoView.Visibility = Visibility.Visible;
|
||||||
VideoOverlay.Visibility = Visibility.Visible;
|
VideoOverlay.Visibility = Visibility.Visible;
|
||||||
|
// Uhr: separates Fenster -> WPF-Overlay wenn WebView deaktiviert wird
|
||||||
|
if (_clockVisible && _clockWindow != null)
|
||||||
|
{
|
||||||
|
_clockWindow.Close();
|
||||||
|
_clockWindow = null;
|
||||||
|
TxtClock.Text = DateTime.Now.ToString("HH:mm:ss");
|
||||||
|
ClockOverlay.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
if (_libVLC == null || _player == null) return;
|
if (_libVLC == null || _player == null) return;
|
||||||
try
|
try
|
||||||
|
|
@ -463,6 +473,16 @@ public partial class MainWindow : Window
|
||||||
RadioCover.Visibility = Visibility.Collapsed;
|
RadioCover.Visibility = Visibility.Collapsed;
|
||||||
VideoOverlay.Visibility = Visibility.Collapsed;
|
VideoOverlay.Visibility = Visibility.Collapsed;
|
||||||
WebView.Visibility = Visibility.Visible;
|
WebView.Visibility = Visibility.Visible;
|
||||||
|
// Uhr: WPF-Overlay -> separates Fenster wenn WebView aktiv wird
|
||||||
|
if (_clockVisible && _clockWindow == null)
|
||||||
|
{
|
||||||
|
ClockOverlay.Visibility = Visibility.Collapsed;
|
||||||
|
_clockWindow = new ClockWindow { Owner = this };
|
||||||
|
_clockWindow.UpdateTime(DateTime.Now.ToString("HH:mm:ss"));
|
||||||
|
_clockWindow.Show();
|
||||||
|
_clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(),
|
||||||
|
System.Windows.Threading.DispatcherPriority.Render);
|
||||||
|
}
|
||||||
// Titelleiste via ApplySidebarLayout gesetzt
|
// Titelleiste via ApplySidebarLayout gesetzt
|
||||||
|
|
||||||
TxtEpgNow.Text = "🌐 Browser";
|
TxtEpgNow.Text = "🌐 Browser";
|
||||||
|
|
@ -728,18 +748,20 @@ public partial class MainWindow : Window
|
||||||
var time = DateTime.Now.ToString("HH:mm:ss");
|
var time = DateTime.Now.ToString("HH:mm:ss");
|
||||||
if (_clockVisible)
|
if (_clockVisible)
|
||||||
{
|
{
|
||||||
// WPF-Overlay (fuer TV-Modus innerhalb VideoView)
|
|
||||||
TxtClock.Text = time;
|
TxtClock.Text = time;
|
||||||
ClockOverlay.Visibility = Visibility.Visible;
|
// WPF-Overlay fuer TV/Radio, separates Fenster nur fuer WebView
|
||||||
|
if (WebView.Visibility == Visibility.Visible)
|
||||||
// Separates Fenster (fuer WebView-Modus, schwebt ueber allem)
|
{
|
||||||
_clockWindow = new ClockWindow { Owner = this };
|
_clockWindow = new ClockWindow { Owner = this };
|
||||||
_clockWindow.UpdateTime(time);
|
_clockWindow.UpdateTime(time);
|
||||||
_clockWindow.Show();
|
_clockWindow.Show();
|
||||||
// Nach Show() ist ActualWidth bekannt
|
|
||||||
_clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(),
|
_clockWindow.Dispatcher.BeginInvoke(() => PositionClockWindow(),
|
||||||
System.Windows.Threading.DispatcherPriority.Render);
|
System.Windows.Threading.DispatcherPriority.Render);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ClockOverlay.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
_clockTimer.Start();
|
_clockTimer.Start();
|
||||||
BtnClock.Foreground = new System.Windows.Media.SolidColorBrush(
|
BtnClock.Foreground = new System.Windows.Media.SolidColorBrush(
|
||||||
System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4));
|
System.Windows.Media.Color.FromRgb(0x00, 0x78, 0xD4));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue