| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <hc:Window x:Class="TeamAAS.Views.SearchDeviceWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:loc="clr-namespace:TeamAAS.Localization"
- Title="{loc:Translate '搜索相机设备'}" Width="560" Height="480"
- WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
- Background="{DynamicResource RegionBrush}"
- Closing="Window_Closing"
- ShowInTaskbar="False">
- <Grid Margin="16">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <!-- 品牌选择 + 搜索 -->
- <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,12">
- <TextBlock Text="{loc:Translate '相机品牌:'}" FontSize="14" VerticalAlignment="Center"
- Foreground="{DynamicResource PrimaryTextBrush}"/>
- <ComboBox x:Name="BrandComboBox" Width="200" Margin="8,0,0,0" FontSize="13"
- DisplayMemberPath="DisplayName" SelectedValuePath="Brand"/>
- <Button Content="{loc:Translate '搜索'}" Click="Search_Click" Margin="12,0,0,0" Padding="20,6"
- Style="{StaticResource ButtonPrimary}"/>
- </StackPanel>
- <!-- 搜索状态 -->
- <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,8">
- <TextBlock x:Name="StatusText" FontSize="12"
- Foreground="{DynamicResource SecondaryTextBrush}" VerticalAlignment="Center"/>
- <hc:LoadingCircle x:Name="LoadingIndicator" Width="16" Height="16" Margin="8,0,0,0"
- Visibility="Collapsed"/>
- </StackPanel>
- <!-- 搜索结果 -->
- <Border Grid.Row="2" Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="8">
- <ListBox x:Name="ResultListBox" Background="Transparent" BorderThickness="0"
- Margin="8" SelectionChanged="Result_SelectionChanged">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border Padding="12,8" CornerRadius="6"
- Background="{DynamicResource SecondaryRegionBrush}" Margin="0,2">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding CameraBrandDisplay}" FontSize="12"
- FontWeight="Bold" Foreground="{DynamicResource PrimaryBrush}"/>
- <TextBlock Text="{Binding Model}" FontSize="12" Margin="8,0,0,0"
- Foreground="{DynamicResource PrimaryTextBrush}"/>
- </StackPanel>
- <TextBlock FontSize="11" Margin="0,4,0,0"
- Foreground="{DynamicResource SecondaryTextBrush}">
- <Run Text="IP: "/><Run Text="{Binding CameraIp, Mode=OneWay}"/>
- <Run Text=" SN: "/><Run Text="{Binding SerialNumber, Mode=OneWay}"/>
- </TextBlock>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Border>
- <!-- 底部按钮 -->
- <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,12,0,0">
- <Button Content="{loc:Translate '添加选中设备'}" Click="Add_Click" Padding="20,6" Margin="0,0,8,0"
- Style="{StaticResource ButtonPrimary}" x:Name="AddButton" IsEnabled="False"/>
- <Button Content="{loc:Translate '关闭'}" Click="Close_Click" Padding="20,6"
- Style="{StaticResource ButtonDefault}"/>
- </StackPanel>
- </Grid>
- </hc:Window>
|