|
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
|
|
|
x:Class="SunlightAggregationTerminal.View.LogPage"
|
|
|
|
|
Title="登录">
|
|
|
|
|
<Grid>
|
|
|
|
|
<VerticalStackLayout Padding="30" Spacing="10"
|
|
|
|
|
VerticalOptions="Center"
|
|
|
|
|
HorizontalOptions="Center"
|
|
|
|
|
MaximumWidthRequest="550">
|
|
|
|
|
<Grid>
|
|
|
|
|
<VerticalStackLayout Spacing="-20" >
|
|
|
|
|
<Grid RowDefinitions="Auto, *" ColumnDefinitions="*, Auto" >
|
|
|
|
|
<HorizontalStackLayout VerticalOptions="Center" Spacing="15">
|
|
|
|
|
<!-- 信息 -->
|
|
|
|
|
<VerticalStackLayout Grid.Row="0" Grid.Column="0" VerticalOptions="Center">
|
|
|
|
|
<HorizontalStackLayout VerticalOptions="Center">
|
|
|
|
|
<Entry Text="服务器:" FontSize="26" TextColor="Black" IsReadOnly="True"/>
|
|
|
|
|
<Picker x:Name="SERVER"
|
|
|
|
|
FontSize="24"
|
|
|
|
|
TextColor="Gray"
|
|
|
|
|
WidthRequest="200"
|
|
|
|
|
MaximumWidthRequest="200"
|
|
|
|
|
SelectedIndexChanged="SERVER_SelectedIndexChanged">
|
|
|
|
|
<Picker.ItemDisplayBinding>
|
|
|
|
|
<Binding Path="SERVER"/>
|
|
|
|
|
</Picker.ItemDisplayBinding>
|
|
|
|
|
</Picker>
|
|
|
|
|
</HorizontalStackLayout>
|
|
|
|
|
</VerticalStackLayout>
|
|
|
|
|
</HorizontalStackLayout>
|
|
|
|
|
<Button Grid.Row="0" Grid.Column="1"
|
|
|
|
|
Clicked="OnScanButtonClicked"
|
|
|
|
|
BackgroundColor="Transparent"
|
|
|
|
|
WidthRequest="60"
|
|
|
|
|
HeightRequest="60" >
|
|
|
|
|
<Button.ImageSource>
|
|
|
|
|
<!-- 设置图标 -->
|
|
|
|
|
<FileImageSource File="lucidescanline.png" />
|
|
|
|
|
</Button.ImageSource>
|
|
|
|
|
</Button>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Entry x:Name="SERVERIP" FontSize="26" TextColor="Gray"
|
|
|
|
|
WidthRequest="350" MaximumWidthRequest="350"/>
|
|
|
|
|
</VerticalStackLayout>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<HorizontalStackLayout VerticalOptions="Center">
|
|
|
|
|
<Entry Text="用户:" FontSize="26" TextColor="Black"
|
|
|
|
|
IsReadOnly="True"/>
|
|
|
|
|
<!-- 用户名输入 -->
|
|
|
|
|
<Entry x:Name="UsernameEntry"
|
|
|
|
|
Placeholder="请输入用户名"
|
|
|
|
|
FontSize="26"
|
|
|
|
|
WidthRequest="250"
|
|
|
|
|
MaximumWidthRequest="250"/>
|
|
|
|
|
</HorizontalStackLayout>
|
|
|
|
|
<HorizontalStackLayout VerticalOptions="Center">
|
|
|
|
|
<Entry Text="密码:" FontSize="26" TextColor="Black"
|
|
|
|
|
IsReadOnly="True"/>
|
|
|
|
|
<!-- 密码输入 -->
|
|
|
|
|
<Entry x:Name="PasswordEntry"
|
|
|
|
|
Placeholder="请输入密码"
|
|
|
|
|
IsPassword="True"
|
|
|
|
|
FontSize="26"
|
|
|
|
|
WidthRequest="250"
|
|
|
|
|
MaximumWidthRequest="250"/>
|
|
|
|
|
</HorizontalStackLayout>
|
|
|
|
|
<!-- 登录按钮 -->
|
|
|
|
|
<Button Text="登 录"
|
|
|
|
|
BackgroundColor="#512BD4"
|
|
|
|
|
TextColor="White"
|
|
|
|
|
HeightRequest="50"
|
|
|
|
|
WidthRequest="100"
|
|
|
|
|
CornerRadius="10"
|
|
|
|
|
Margin="0,10,0,0"
|
|
|
|
|
Clicked="Log_Clicked"/>
|
|
|
|
|
</VerticalStackLayout>
|
|
|
|
|
<Grid x:Name="LoadingIndicator" BackgroundColor="Gray"
|
|
|
|
|
IsVisible="False" Opacity="0.9">
|
|
|
|
|
<VerticalStackLayout Padding="30" Spacing="10"
|
|
|
|
|
VerticalOptions="Center"
|
|
|
|
|
HorizontalOptions="Center">
|
|
|
|
|
<ActivityIndicator IsRunning="True"
|
|
|
|
|
Color="#512BD4"
|
|
|
|
|
HorizontalOptions="Center"
|
|
|
|
|
VerticalOptions="Center" />
|
|
|
|
|
<Label Text="登录中..."
|
|
|
|
|
FontAttributes="Bold"
|
|
|
|
|
FontSize="24"
|
|
|
|
|
TextColor="Black"/>
|
|
|
|
|
</VerticalStackLayout>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</ContentPage>
|