|
|
|
@ -9,141 +9,144 @@ |
|
|
|
<converters:StringToImageConverter x:Key="StringToImageConverter" /> |
|
|
|
</ResourceDictionary> |
|
|
|
</ContentPage.Resources> |
|
|
|
<VerticalStackLayout> |
|
|
|
<Grid> |
|
|
|
<Grid> |
|
|
|
<VerticalStackLayout> |
|
|
|
<Grid BackgroundColor="#CCCCCC" Padding="10"> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<!-- 图片 --> |
|
|
|
<Image WidthRequest="150" HeightRequest="150" |
|
|
|
<Grid RowDefinitions="Auto, *, *" ColumnDefinitions="*, Auto" > |
|
|
|
<Grid BackgroundColor="#CCCCCC" Padding="10" Grid.Row="0" Grid.Column="0" > |
|
|
|
<HorizontalStackLayout> |
|
|
|
<!-- 图片 --> |
|
|
|
<Image WidthRequest="150" HeightRequest="150" |
|
|
|
Source="{Binding Path=Model, Converter={StaticResource StringToImageConverter}}"/> |
|
|
|
<!-- 设备状态 --> |
|
|
|
<VerticalStackLayout> |
|
|
|
<Label Text="{Binding Name}" FontAttributes="Bold" |
|
|
|
<!-- 设备状态 --> |
|
|
|
<VerticalStackLayout> |
|
|
|
<Label Text="{Binding Name}" FontAttributes="Bold" |
|
|
|
FontSize="24" TextColor="Black" Padding="5"/> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="状态: " FontAttributes="Bold" |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="状态: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="机台: " FontAttributes="Bold" |
|
|
|
</HorizontalStackLayout> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="机台: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding Machine}" FontAttributes="Bold" |
|
|
|
<Label Text="{Binding Machine}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
</VerticalStackLayout> |
|
|
|
</HorizontalStackLayout> |
|
|
|
</Grid> |
|
|
|
<BoxView HeightRequest="3" Color="#CCCCCC" /> |
|
|
|
<HorizontalStackLayout BackgroundColor="#F0F0F0" HeightRequest="50"> |
|
|
|
<Button Text="实时信息" Clicked="Button_real" BackgroundColor="Transparent" TextColor="Black"/> |
|
|
|
<Button Text="设备信息" Clicked="Button_machine" BackgroundColor="Transparent" TextColor="Black"/> |
|
|
|
<Button Text="执行历史" Clicked="Button_history" BackgroundColor="Transparent" TextColor="Black"/> |
|
|
|
<Button Text="远程控制" Clicked="Button_control" BackgroundColor="Transparent" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
|
|
|
|
<Grid x:Name="_real" > |
|
|
|
<!-- 设备信息 --> |
|
|
|
<Label Text="{Binding ModelA}" FontAttributes="Bold" FontSize="22" TextColor="Black" |
|
|
|
</VerticalStackLayout> |
|
|
|
</HorizontalStackLayout> |
|
|
|
</Grid> |
|
|
|
<!-- 选项 --> |
|
|
|
<Grid Grid.Row="1" Grid.Column="0" HeightRequest="50"> |
|
|
|
<HorizontalStackLayout BackgroundColor="#F0F0F0" HeightRequest="50"> |
|
|
|
<Button Text="实时信息" Clicked="Button_real" BackgroundColor="Transparent" TextColor="Black"/> |
|
|
|
<Button Text="设备信息" Clicked="Button_machine" BackgroundColor="Transparent" TextColor="Black"/> |
|
|
|
<Button Text="执行历史" Clicked="Button_history" BackgroundColor="Transparent" TextColor="Black"/> |
|
|
|
<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" |
|
|
|
<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" |
|
|
|
<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" |
|
|
|
<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" |
|
|
|
<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" |
|
|
|
<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"/> |
|
|
|
</Grid> |
|
|
|
<Label Text="{Binding Information}" FontAttributes="Bold" FontSize="22" TextColor="Black"/> |
|
|
|
</VerticalStackLayout> |
|
|
|
</Grid> |
|
|
|
|
|
|
|
<!-- 设备内容 --> |
|
|
|
<Grid x:Name="_machine" IsVisible="False"> |
|
|
|
<CollectionView x:Name="CardCollectionView_machine" |
|
|
|
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="名称: " FontAttributes="Bold" |
|
|
|
<!-- 设备内容 --> |
|
|
|
<Grid x:Name="_machine" IsVisible="False" Grid.Row="2" Grid.Column="0" BackgroundColor="#F0F0F0"> |
|
|
|
<CollectionView x:Name="CardCollectionView_machine" 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="名称: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding ProductName}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
</HorizontalStackLayout> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="代码: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
|
|
|
|
<Label Text="代码: " FontAttributes="Bold" |
|
|
|
<Label Text="{Binding ProductCode}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
</HorizontalStackLayout> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="状态: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
|
|
|
|
<Label Text="状态: " FontAttributes="Bold" |
|
|
|
<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 State}" FontAttributes="Bold" |
|
|
|
<Label Text="{Binding ProductInf}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
</VerticalStackLayout> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</CollectionView.ItemTemplate> |
|
|
|
</CollectionView> |
|
|
|
</Grid> |
|
|
|
|
|
|
|
<Label Text="信息: " FontAttributes="Bold" |
|
|
|
<!-- 历史 --> |
|
|
|
<Grid x:Name="_history" IsVisible="False" Grid.Row="2" Grid.Column="0" BackgroundColor="#F0F0F0"> |
|
|
|
<CollectionView x:Name="CardCollectionView_history" 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="工单: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
<Label Text="{Binding Dyelot}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
</VerticalStackLayout> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</CollectionView.ItemTemplate> |
|
|
|
</CollectionView> |
|
|
|
</Grid> |
|
|
|
|
|
|
|
<!-- 历史 --> |
|
|
|
<Grid x:Name="_history" IsVisible="False"> |
|
|
|
<CollectionView x:Name="CardCollectionView_history" |
|
|
|
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="工单: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="染机: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="时间: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="信息: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding State}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
</VerticalStackLayout> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</CollectionView.ItemTemplate> |
|
|
|
</CollectionView> |
|
|
|
</Grid> |
|
|
|
|
|
|
|
</HorizontalStackLayout> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="染机: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding Machine}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="时间: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding EndTime}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
<BoxView HeightRequest="3" Color="#CCCCCC" /> |
|
|
|
<HorizontalStackLayout> |
|
|
|
<Label Text="信息: " FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
<Label Text="{Binding Information}" FontAttributes="Bold" |
|
|
|
FontSize="22" TextColor="Black"/> |
|
|
|
</HorizontalStackLayout> |
|
|
|
</VerticalStackLayout> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</CollectionView.ItemTemplate> |
|
|
|
</CollectionView> |
|
|
|
</Grid> |
|
|
|
|
|
|
|
<!-- 远程 --> |
|
|
|
<Grid x:Name="_control" IsVisible="False"> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
<!-- 远程 --> |
|
|
|
<Grid x:Name="_control" IsVisible="False" Grid.Row="2" Grid.Column="0" BackgroundColor="#F0F0F0"> |
|
|
|
|
|
|
|
</VerticalStackLayout> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</VerticalStackLayout> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
</ContentPage> |