This commit is contained in:
Administrator committed 2026-06-08 01:13:43 +08:00
commit 06bbb5c8be
3 files changed
+368 -29

No files matched your search

+34 -22
View File
@@ -3,7 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SunlightAggregationTerminal.InfoDetail"
xmlns:converters="clr-namespace:SunlightAggregationTerminal.Converters"
Title="细节信息">
Title="细节信息"
Loaded="ContentPage_Loaded">
<ContentPage.Resources>
<ResourceDictionary>
<converters:StringToImageConverter x:Key="StringToImageConverter" />
@@ -44,23 +45,25 @@
<Button Text="远程控制" Clicked="Button_control" BackgroundColor="Transparent" TextColor="Black"/>
</HorizontalStackLayout>
</Grid>
<Grid x:Name="_real" Grid.Row="2" Grid.Column="0" >
<VerticalStackLayout VerticalOptions="Center">
<!-- 设备信息 -->
<Label Text="{Binding ModelA}" FontAttributes="Bold" FontSize="22" TextColor="Black"
IsVisible="{Binding Path=ModelA, Converter={StaticResource StringToBoolConverter}}"/>
<Label Text="{Binding ModelB}" FontAttributes="Bold" FontSize="22" TextColor="Black"
IsVisible="{Binding Path=ModelB, Converter={StaticResource StringToBoolConverter}}"/>
<Label Text="{Binding ModelC}" FontAttributes="Bold" FontSize="22" TextColor="Black"
IsVisible="{Binding Path=ModelC, Converter={StaticResource StringToBoolConverter}}"/>
<Label Text="{Binding ModelD}" FontAttributes="Bold" FontSize="22" TextColor="Black"
IsVisible="{Binding Path=ModelD, Converter={StaticResource StringToBoolConverter}}"/>
<Label Text="{Binding ModelE}" FontAttributes="Bold" FontSize="22" TextColor="Black"
IsVisible="{Binding Path=ModelE, Converter={StaticResource StringToBoolConverter}}"/>
<Label Text="{Binding ModelF}" FontAttributes="Bold" FontSize="22" TextColor="Black"
IsVisible="{Binding Path=ModelF, Converter={StaticResource StringToBoolConverter}}"/>
<Label Text="{Binding Information}" FontAttributes="Bold" FontSize="22" TextColor="Black"/>
</VerticalStackLayout>
<Grid x:Name="_real" Grid.Row="2" Grid.Column="0" BackgroundColor="#F0F0F0">
<!-- 设备信息 -->
<RefreshView x:Name="myCardCollectionView_" >
<CollectionView x:Name="CardCollectionView_inf" RemainingItemsThreshold="5">
<CollectionView.ItemTemplate>
<DataTemplate>
<Border BackgroundColor="White" Stroke="#CCCCCC"
StrokeThickness="2" Margin="10,0,10,10" StrokeShape="RoundRectangle 10">
<VerticalStackLayout VerticalOptions="Center">
<HorizontalStackLayout>
<Label Text="{Binding inf}" FontAttributes="Bold"
FontSize="22" TextColor="Black"/>
</HorizontalStackLayout>
</VerticalStackLayout>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</RefreshView>
</Grid>
<!-- 设备内容 -->
@@ -89,10 +92,7 @@
<Label Text="{Binding ProductState}" FontAttributes="Bold"
FontSize="22" TextColor="Black"/>
</HorizontalStackLayout>
<BoxView HeightRequest="3" Color="#CCCCCC" />
<HorizontalStackLayout>
<Label Text="信息: " FontAttributes="Bold"
FontSize="22" TextColor="Black"/>
<Label Text="{Binding ProductInf}" FontAttributes="Bold"
FontSize="22" TextColor="Black"/>
</HorizontalStackLayout>
@@ -156,6 +156,18 @@
<Grid x:Name="_control" IsVisible="False" Grid.Row="2" Grid.Column="0" BackgroundColor="#F0F0F0">
</Grid>
<Grid x:Name="LoadingIndicator" Grid.Row="2" Grid.Column="0"
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>