WinModeCheck.xaml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <Window x:Class="Saga.PlugIn.ModelCheck.WinModeCheck"
  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:converter="clr-namespace:SAGA.DotNetUtils.WPF.Converter;assembly=SAGA.DotNetUtils"
  7. xmlns:local="clr-namespace:Saga.PlugIn.ModelCheck"
  8. mc:Ignorable="d" Title="模型规范检查" WindowStartupLocation="CenterScreen"
  9. ResizeMode="NoResize"
  10. Height="587" Width="600">
  11. <Window.Resources>
  12. <local:ItemImageVisibleConverter x:Key="ItemImageEqualVisibleConverter" IsEqualCollapsed="True"></local:ItemImageVisibleConverter>
  13. <local:ItemImageVisibleConverter x:Key="ItemImageUnEqualVisibleConverter" IsEqualCollapsed="False"></local:ItemImageVisibleConverter>
  14. <local:ItemImageConverter x:Key="ItemImageConverter" ></local:ItemImageConverter>
  15. </Window.Resources>
  16. <Grid>
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="80"></RowDefinition>
  19. <RowDefinition Height="*"></RowDefinition>
  20. <RowDefinition Height="Auto"></RowDefinition>
  21. </Grid.RowDefinitions>
  22. <Grid Grid.Row="0">
  23. <GroupBox Header="当前打开的模型文件" Foreground="DarkGray" Margin="10,10,10,5">
  24. <TextBlock Margin="5,0" Foreground="Black"
  25. Text="{Binding Path=ModelFilePath}"
  26. VerticalAlignment="Center" TextWrapping="WrapWithOverflow" ></TextBlock>
  27. </GroupBox>
  28. </Grid>
  29. <Grid Grid.Row="1" Margin="10,0">
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="30"></RowDefinition>
  32. <RowDefinition Height="*"></RowDefinition>
  33. </Grid.RowDefinitions>
  34. <Grid Grid.Row="0">
  35. <TextBlock Text="包含的检查项:" Foreground="DarkGray" VerticalAlignment="Center"></TextBlock>
  36. </Grid>
  37. <Grid Grid.Row="1">
  38. <ListBox ItemsSource="{Binding Path=CheckItems}" >
  39. <ListBox.ItemTemplate>
  40. <DataTemplate>
  41. <WrapPanel >
  42. <Image Width="30" Visibility="{Binding Path=ModelCheckState,
  43. Converter={StaticResource ItemImageEqualVisibleConverter},
  44. ConverterParameter={x:Static local:ModelCheckState.Prepare}}"
  45. Source="{Binding Path=ModelCheckState,Converter={StaticResource ItemImageConverter}}"></Image>
  46. <Label Content="{Binding Path=Name}" VerticalContentAlignment="Center"></Label>
  47. </WrapPanel>
  48. </DataTemplate>
  49. </ListBox.ItemTemplate>
  50. </ListBox>
  51. </Grid>
  52. </Grid>
  53. <Grid Grid.Row="2" >
  54. <Grid.RowDefinitions>
  55. <RowDefinition></RowDefinition>
  56. <RowDefinition></RowDefinition>
  57. <RowDefinition></RowDefinition>
  58. </Grid.RowDefinitions>
  59. <Grid Grid.Row="0" Visibility="{Binding Path=ModelCheckState,
  60. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  61. ConverterParameter={x:Static local:ModelCheckState.Prepare}}">
  62. <Grid.RowDefinitions>
  63. <RowDefinition Height="40"></RowDefinition>
  64. <RowDefinition Height="40"></RowDefinition>
  65. <RowDefinition Height="60"></RowDefinition>
  66. </Grid.RowDefinitions>
  67. <Grid Grid.Row="0" Margin="5,8,0,2">
  68. <Label Content="检查结果储存位置:" VerticalAlignment="Center" Foreground="LightGray"></Label>
  69. </Grid>
  70. <Grid Grid.Row="1" Margin="5,3,0,8">
  71. <Grid.ColumnDefinitions>
  72. <ColumnDefinition Width="*"></ColumnDefinition>
  73. <ColumnDefinition Width="100"></ColumnDefinition>
  74. </Grid.ColumnDefinitions>
  75. <TextBox Margin="10,0,0,0" VerticalContentAlignment="Center" Height="25"
  76. Name="txtPath"
  77. Text="{Binding Path=SavePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
  78. VerticalAlignment="Center"></TextBox>
  79. <Button Grid.Column="1" Content="浏览" Height="25" Margin="10,0,5,0"
  80. Click="SelectFile_OnClick"></Button>
  81. </Grid>
  82. <Grid Grid.Row="2" Background="LightGray">
  83. <Button Width="100" Height="25" Background="Black" Foreground="White" Content="开始检查"
  84. HorizontalAlignment="Right"
  85. Margin="0,0,5,0" VerticalAlignment="Center"
  86. Command="{Binding Path=Commands.Execute}"
  87. ></Button>
  88. </Grid>
  89. </Grid>
  90. <Grid Grid.Row="1" Visibility="{Binding Path=ModelCheckState,
  91. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  92. ConverterParameter={x:Static local:ModelCheckState.Progress}}">
  93. <Grid.RowDefinitions>
  94. <RowDefinition Height="30"></RowDefinition>
  95. <RowDefinition Height="40"></RowDefinition>
  96. <RowDefinition Height="60"></RowDefinition>
  97. </Grid.RowDefinitions>
  98. <Grid Grid.Row="0" Margin="5,0">
  99. <Label Content="建模规范检查进度...(12/12)" VerticalAlignment="Center"></Label>
  100. </Grid>
  101. <Grid Grid.Row="1" Margin="15,0">
  102. <ProgressBar Grid.Column="0" Height="30" Value="12" Maximum="12"></ProgressBar>
  103. </Grid>
  104. <Grid Grid.Row="2" Background="LightGray">
  105. <Button Width="100" Height="25"
  106. Content="检查中..." IsEnabled="False"
  107. HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Center"
  108. ></Button>
  109. </Grid>
  110. </Grid>
  111. <Grid Grid.Row="2" Visibility="{Binding Path=ModelCheckState,
  112. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  113. ConverterParameter={x:Static local:ModelCheckState.Ending}}">
  114. <Grid.RowDefinitions>
  115. <RowDefinition Height="30"></RowDefinition>
  116. <RowDefinition Height="40"></RowDefinition>
  117. <RowDefinition Height="60"></RowDefinition>
  118. </Grid.RowDefinitions>
  119. <Grid Grid.Row="0" Margin="5,0">
  120. <Label Content="当前校验结果:" VerticalAlignment="Center" Foreground="LightGray"></Label>
  121. </Grid>
  122. <Grid Grid.Row="1" Margin="5,0">
  123. <TextBlock Margin="10,0" Height="30" Text="{Binding Path=SavePath}"
  124. VerticalAlignment="Center"></TextBlock>
  125. </Grid>
  126. <Grid Grid.Row="2" Background="LightGray">
  127. <Button Width="120" Height="25" Background="White" Foreground="Black" Content="打开文件位置"
  128. HorizontalAlignment="Right" Margin="0,0,115,0" VerticalAlignment="Center"
  129. Command="{Binding Path=Commands.Execute}"
  130. ></Button>
  131. <Button Width="100" Height="25" Background="Black" Foreground="White" Content="确认"
  132. HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Center"
  133. Click="ButtonNext_OnClick" ></Button>
  134. </Grid>
  135. </Grid>
  136. </Grid>
  137. </Grid>
  138. </Window>