-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
156 lines (142 loc) · 6.68 KB
/
MainWindow.xaml
File metadata and controls
156 lines (142 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<Window x:Class="PiPCrunchy.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
mc:Ignorable="d"
Title="PiPStream - Multi-Platform Picture-in-Picture Viewer"
Style="{StaticResource ModernWindow}"
Height="720" Width="1280"
MinHeight="480" MinWidth="640"
WindowStartupLocation="CenterScreen">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Menu Bar -->
<Menu Grid.Row="0" Background="{StaticResource SecondaryBackground}">
<MenuItem Header="_Help" Foreground="{StaticResource TextPrimaryColor}">
<MenuItem Header="Check for Updates..." Click="CheckForUpdates_Click"/>
<Separator/>
<MenuItem Header="About PiPStream" Click="About_Click"/>
</MenuItem>
</Menu>
<!-- Top Control Bar -->
<Border Grid.Row="1"
Background="{StaticResource SecondaryBackground}"
BorderBrush="{StaticResource BorderColor}"
BorderThickness="0,0,0,1"
Padding="12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- URL Display -->
<TextBlock Grid.Column="0"
x:Name="UrlTextBlock"
Text="Select a streaming service below"
Foreground="{StaticResource TextSecondaryColor}"
VerticalAlignment="Center"
Margin="0,0,16,0"
TextTrimming="CharacterEllipsis"/>
<!-- Open PiP Button -->
<Button Grid.Column="1"
x:Name="OpenPipButton"
Content="Open Picture-in-Picture"
Style="{StaticResource ModernButton}"
Padding="16,6"
Click="OpenPipButton_Click"
ToolTip="Open a picture-in-picture window that stays on top"/>
</Grid>
</Border>
<!-- Streaming Service Navigation Bar -->
<Border Grid.Row="2"
Background="{StaticResource PrimaryBackground}"
BorderBrush="{StaticResource BorderColor}"
BorderThickness="0,0,0,1"
Padding="16,12">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<!-- Crunchyroll -->
<Button x:Name="CrunchyrollButton"
Content="Crunchyroll"
Style="{StaticResource StreamingServiceButton}"
Click="CrunchyrollButton_Click"
Tag="#F47521"
Margin="4"
ToolTip="Watch anime on Crunchyroll"/>
<!-- Netflix -->
<Button x:Name="NetflixButton"
Content="Netflix"
Style="{StaticResource StreamingServiceButton}"
Click="NetflixButton_Click"
Tag="#E50914"
Margin="4"
ToolTip="Watch shows and movies on Netflix"/>
<!-- Disney+ -->
<Button x:Name="DisneyButton"
Content="Disney+"
Style="{StaticResource StreamingServiceButton}"
Click="DisneyButton_Click"
Tag="#113CCF"
Margin="4"
ToolTip="Watch Disney, Pixar, Marvel, and Star Wars"/>
<!-- Prime Video -->
<Button x:Name="PrimeVideoButton"
Content="Prime Video"
Style="{StaticResource StreamingServiceButton}"
Click="PrimeVideoButton_Click"
Tag="#00A8E1"
Margin="4"
ToolTip="Watch on Amazon Prime Video"/>
<!-- YouTube -->
<Button x:Name="YouTubeButton"
Content="YouTube"
Style="{StaticResource StreamingServiceButton}"
Click="YouTubeButton_Click"
Tag="#FF0000"
Margin="4"
ToolTip="Watch videos on YouTube"/>
<!-- Twitch -->
<Button x:Name="TwitchButton"
Content="Twitch"
Style="{StaticResource StreamingServiceButton}"
Click="TwitchButton_Click"
Tag="#9146FF"
Margin="4"
ToolTip="Watch live streams on Twitch"/>
<!-- Flixtor -->
<Button x:Name="FlixtorButton"
Content="Flixtor"
Style="{StaticResource StreamingServiceButton}"
Click="FlixtorButton_Click"
Tag="#E74C3C"
Margin="4"
ToolTip="Browse Flixtor"/>
</WrapPanel>
</Border>
<!-- WebView2 Browser -->
<Border Grid.Row="3"
Background="{StaticResource PrimaryBackground}">
<Grid>
<!-- Loading/Welcome Message -->
<TextBlock x:Name="WelcomeMessage"
Text="👋 Welcome to PiPStream!

Select a streaming service above to get started."
FontSize="24"
Foreground="{StaticResource TextSecondaryColor}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextAlignment="Center"
Visibility="Visible"/>
<wv2:WebView2 x:Name="MainWebView"
NavigationStarting="MainWebView_NavigationStarting"
NavigationCompleted="MainWebView_NavigationCompleted"
Visibility="Collapsed"/>
</Grid>
</Border>
</Grid>
</Window>