This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml
84 lines (77 loc) · 4.25 KB
/
MainWindow.xaml
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
<Window x:Class="Miiverse_PC.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.UI.Xaml.Controls">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" Margin="8" HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="loginStatus" Grid.Column="0" VerticalAlignment="Center" FontSize="16" FontWeight="Bold">
Not logged in
</TextBlock>
<TextBox x:Name="username" Grid.Column="1" Margin="4" KeyDown="MoveToPasswordOnEnter" PlaceholderText="Enter PNID username" />
<PasswordBox x:Name="password" Grid.Column="2" Margin="4" KeyDown="LoginOnEnter" PlaceholderText="Enter PNID password" />
<Button x:Name="loginButton" Grid.Column="3" Margin="4" Click="LoginAsync">
Log in
</Button>
<CheckBox x:Name="saveLoginInfo" Grid.Column="4" Margin="4">
Save login
</CheckBox>
<Button x:Name="downloadButton" Grid.Column="5" Margin="4" Click="DownloadUserProfileDataAsync"
ToolTipService.ToolTip="Download user profile data as XML">
<SymbolIcon Symbol="Download" />
</Button>
<Button x:Name="settingsButton" Grid.Column="6" Click="OpenSettingsDialogAsync" ToolTipService.ToolTip="Open settings">
<SymbolIcon Symbol="Setting" />
</Button>
</Grid>
<Button x:Name="backButton" Grid.Row="1" Grid.Column="0" Click="GoBack" IsEnabled="false">
Back
</Button>
<Button x:Name="forwardButton" Grid.Row="1" Grid.Column="1" Click="GoForward" IsEnabled="false">
Forward
</Button>
<Button x:Name="reloadButton" Grid.Row="1" Grid.Column="2" Click="ReloadOrStop">
Reload
</Button>
<TextBox x:Name="addressBar" Grid.Row="1" Grid.Column="3" IsReadOnly="True" />
<controls:WebView2 x:Name="webView" Grid.Row="2" Grid.ColumnSpan="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Loaded="SetupWebViewHandlersAsync" Source="https://portal.olv.pretendo.cc" />
<StackPanel Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="5" Orientation="Horizontal">
<Button x:Name="uploadImageButton" Click="UploadImage">
<StackPanel Orientation="Horizontal">
<SymbolIcon Margin="0,0,8,0" Symbol="Share" />
<TextBlock Text="Select image to upload" />
</StackPanel>
</Button>
<Button x:Name="userPage" Click="NavigateToPage" Content="Go to User Page" />
<Button x:Name="userMenuPage" Click="NavigateToPage" Content="Go to User Menu" />
<Button x:Name="activityFeedPage" Click="NavigateToPage" Content="Go to Activity Feed" />
<Button x:Name="communitiesPage" Click="NavigateToPage" Content="Go to Communities" />
<Button x:Name="messagesPage" Click="NavigateToPage" Content="Go to Messages" />
<Button x:Name="notificationsPage" Click="NavigateToPage" Content="Go to Notifications" />
</StackPanel>
</Grid>
</Window>