Migrate.xaml 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <UserControl x:Class="ConfigFileManager.Views.Dialog.Migrate"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:ConfigFileManager.Views.Dialog"
  7. xmlns:contorls="clr-namespace:ConfigFileManager.Controls"
  8. xmlns:cycle="clr-namespace:UICommon;assembly=UICommon"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.Resources>
  12. <ResourceDictionary Source="/UICommon;component/Resources.xaml"/>
  13. </UserControl.Resources>
  14. <Grid Margin="8">
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="auto"/>
  17. <RowDefinition Height="8"/>
  18. <RowDefinition/>
  19. </Grid.RowDefinitions>
  20. <GroupBox Header="设备信息">
  21. <Grid Margin="8">
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="120"/>
  24. <ColumnDefinition Width="16"/>
  25. <ColumnDefinition Width="100"/>
  26. <ColumnDefinition Width="16"/>
  27. <ColumnDefinition Width="180"/>
  28. <ColumnDefinition Width="16"/>
  29. <ColumnDefinition Width="100"/>
  30. </Grid.ColumnDefinitions>
  31. <TextBlock Text="{Binding Source.DeviceName}" FontSize="14" VerticalAlignment="Center"></TextBlock>
  32. <TextBlock Grid.Column="2" FontSize="14" VerticalAlignment="Center" Margin="4,0" Text="{Binding Source.DeviceModel}"/>
  33. <TextBlock Grid.Column="4" FontSize="14" VerticalAlignment="Center" Margin="4,0" Text="{Binding Source.DeviceSubModel}"/>
  34. <TextBlock Grid.Column="6" FontSize="14" VerticalAlignment="Center" Margin="4,0" >
  35. <Run>Ver:</Run>
  36. <Run Text="{Binding Source.SoftwareVersion}"/>
  37. </TextBlock>
  38. </Grid>
  39. </GroupBox>
  40. <GroupBox Grid.Row="2" Header="设备列表">
  41. <ScrollViewer>
  42. <ItemsControl ItemsSource="{Binding Sources}">
  43. <ItemsControl.ItemTemplate>
  44. <DataTemplate>
  45. <contorls:HarewareCompare Margin="8" Target="{Binding}"
  46. MigrateCommand="{Binding RelativeSource={RelativeSource AncestorType=local:Migrate,Mode=FindAncestor}, Path=DataContext.MigrateCommand}"
  47. MigrateRecipeCommand="{Binding RelativeSource={RelativeSource AncestorType=local:Migrate,Mode=FindAncestor}, Path=DataContext.MigrateRecipeCommand}"
  48. Source="{Binding RelativeSource={RelativeSource AncestorType=local:Migrate, Mode=FindAncestor}, Path=DataContext.Source}" />
  49. </DataTemplate>
  50. </ItemsControl.ItemTemplate>
  51. </ItemsControl>
  52. </ScrollViewer>
  53. </GroupBox>
  54. <Grid Grid.RowSpan="3" Background="#50ffffff" Visibility="{Binding Running}">
  55. <Grid VerticalAlignment="Center">
  56. <Grid.RowDefinitions>
  57. <RowDefinition Height="auto"/>
  58. <RowDefinition Height="64"/>
  59. <RowDefinition Height="auto"/>
  60. </Grid.RowDefinitions>
  61. <cycle:CycleRingLoading Width="60" />
  62. <TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Panel.ZIndex="1">
  63. <Run Text="{Binding Progress}"></Run>
  64. <Run > %</Run>
  65. </TextBlock>
  66. <ProgressBar Grid.Row="2" Style="{StaticResource ThemeProgressBar}" VerticalAlignment="Center" Height="16" Margin="64,0" Value="{Binding Progress}"/>
  67. </Grid>
  68. </Grid>
  69. </Grid>
  70. </UserControl>