WinVecticalPipeCheck.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <Window x:Class="Saga.PlugIn.VerticalPipeCheck.WinVecticalPipeCheck"
  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:Saga.PlugIn.ModelCheck"
  7. xmlns:gif="https://github.com/XamlAnimatedGif/XamlAnimatedGif"
  8. mc:Ignorable="d" Title="立管检查" WindowStartupLocation="CenterScreen"
  9. ResizeMode="NoResize" SizeToContent="Height"
  10. Height="Auto" 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="Auto"></RowDefinition>
  19. <RowDefinition Height="Auto"></RowDefinition>
  20. <RowDefinition Height="Auto"></RowDefinition>
  21. </Grid.RowDefinitions>
  22. <Grid Grid.Row="0" Margin="10,0">
  23. <StackPanel>
  24. <Label Margin="0,10,0,0" Content="请选择相邻两层模型,进行立管连接检查"></Label>
  25. <Grid>
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition Width="25"></ColumnDefinition>
  28. <ColumnDefinition Width="*"></ColumnDefinition>
  29. <ColumnDefinition Width="83"></ColumnDefinition>
  30. </Grid.ColumnDefinitions>
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="10" ></RowDefinition>
  33. <RowDefinition Height="25" ></RowDefinition>
  34. <RowDefinition Height="10" ></RowDefinition>
  35. <RowDefinition Height="25"></RowDefinition>
  36. </Grid.RowDefinitions>
  37. <Image Grid.Row="1" Grid.Column="0"
  38. Source="../Image/上一层.png"></Image>
  39. <TextBox Grid.Row="1" Grid.Column="1" Name="TxtUpPath" IsReadOnly="True" Margin="0,0,6,0"
  40. VerticalContentAlignment="Center"
  41. Text="{Binding Path=UpFilePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
  42. <TextBox.Resources>
  43. <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left" AlignmentY="Center">
  44. <VisualBrush.Visual>
  45. <TextBlock FontStyle="Normal" FontSize="14" TextWrapping="Wrap" Width="430" Text='请选择上层模型文件'/>
  46. </VisualBrush.Visual>
  47. </VisualBrush>
  48. </TextBox.Resources>
  49. <TextBox.Style>
  50. <Style TargetType="TextBox">
  51. <Setter Property="FontSize" Value="12"/>
  52. <Setter Property="Foreground" Value="#FF333333"/>
  53. <Setter Property="BorderBrush" Value="#8F666666"/>
  54. <Setter Property="TextWrapping" Value="Wrap"/>
  55. <Setter Property="AcceptsReturn" Value="True"/>
  56. <Style.Triggers>
  57. <Trigger Property="Text" Value="{x:Null}">
  58. <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
  59. </Trigger>
  60. <Trigger Property="Text" Value="">
  61. <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
  62. </Trigger>
  63. </Style.Triggers>
  64. </Style>
  65. </TextBox.Style>
  66. </TextBox>
  67. <Button Grid.Row="1" Grid.Column="2" Click="BtnSelectFileUp_OnClick" Content="选择"
  68. ></Button>
  69. <Image Grid.Row="3" Grid.Column="0"
  70. Source="../Image/下一层.png"></Image>
  71. <TextBox Grid.Row="3" Grid.Column="1" Name="TxtDownPath" IsReadOnly="True" Margin="0,0,6,0"
  72. VerticalContentAlignment="Center"
  73. Text="{Binding Path=DownFilePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
  74. <TextBox.Resources>
  75. <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left" AlignmentY="Center">
  76. <VisualBrush.Visual>
  77. <TextBlock FontStyle="Normal" FontSize="14" TextWrapping="Wrap" Width="430" Text='请选择下层模型文件'/>
  78. </VisualBrush.Visual>
  79. </VisualBrush>
  80. </TextBox.Resources>
  81. <TextBox.Style>
  82. <Style TargetType="TextBox">
  83. <Setter Property="FontSize" Value="12"/>
  84. <Setter Property="Foreground" Value="#FF333333"/>
  85. <Setter Property="BorderBrush" Value="#8F666666"/>
  86. <Setter Property="TextWrapping" Value="Wrap"/>
  87. <Setter Property="AcceptsReturn" Value="True"/>
  88. <Style.Triggers>
  89. <Trigger Property="Text" Value="{x:Null}">
  90. <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
  91. </Trigger>
  92. <Trigger Property="Text" Value="">
  93. <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
  94. </Trigger>
  95. </Style.Triggers>
  96. </Style>
  97. </TextBox.Style>
  98. </TextBox>
  99. <Button Grid.Row="3" Grid.Column="2" Click="BtnSelectFileDown_OnClick" Content="选择"
  100. ></Button>
  101. </Grid>
  102. </StackPanel>
  103. </Grid>
  104. <Grid Grid.Row="1" Margin="10,0">
  105. <!--虚线-->
  106. <Line X1="0" Y1="15" X2="590" Y2="15" StrokeDashArray="3" Stroke="LightGray" StrokeThickness="2"></Line>
  107. </Grid>
  108. <Grid Grid.Row="2">
  109. <Grid.RowDefinitions>
  110. <RowDefinition></RowDefinition>
  111. <RowDefinition></RowDefinition>
  112. <RowDefinition></RowDefinition>
  113. </Grid.RowDefinitions>
  114. <Grid
  115. Grid.Row="0" Visibility="{Binding Path=ModelCheckState,
  116. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  117. ConverterParameter={x:Static local:ModelCheckState.Prepare}}">
  118. <Grid.RowDefinitions>
  119. <RowDefinition Height="40"></RowDefinition>
  120. <RowDefinition Height="40"></RowDefinition>
  121. <RowDefinition Height="43"></RowDefinition>
  122. </Grid.RowDefinitions>
  123. <Grid Grid.Row="0" Margin="10,0" >
  124. <Label Content="检查结果储存位置:" VerticalAlignment="Center" Foreground="LightGray"></Label>
  125. </Grid>
  126. <Grid Grid.Row="1" Margin="10,0" >
  127. <Grid.ColumnDefinitions>
  128. <ColumnDefinition Width="*"></ColumnDefinition>
  129. <ColumnDefinition Width="83"></ColumnDefinition>
  130. </Grid.ColumnDefinitions>
  131. <TextBox Margin="6,0,6,0" VerticalContentAlignment="Center" Height="25" IsReadOnly="True"
  132. Name="txtPath"
  133. Text="{Binding Path=SaveDir,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
  134. VerticalAlignment="Center"></TextBox>
  135. <Button Grid.Column="1" Content="浏览" Height="25"
  136. Click="SelectDir_OnClick"></Button>
  137. </Grid>
  138. <Grid Grid.Row="2" Background="#F0F0F0">
  139. <Button Width="82" Height="23" Content="开始检查"
  140. HorizontalAlignment="Right" Margin="0,10,10,10"
  141. Command="{Binding Path=Commands.Execute}"
  142. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  143. ></Button>
  144. </Grid>
  145. </Grid>
  146. <Grid Grid.Row="1" Visibility="{Binding Path=ModelCheckState,
  147. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  148. ConverterParameter={x:Static local:ModelCheckState.Progress}}">
  149. <Grid.RowDefinitions>
  150. <RowDefinition Height="40"></RowDefinition>
  151. <RowDefinition Height="40"></RowDefinition>
  152. <RowDefinition Height="43"></RowDefinition>
  153. </Grid.RowDefinitions>
  154. <Grid Grid.Row="0" Margin="10,0">
  155. <Label Content="检查中..." VerticalAlignment="Center" Foreground="LightGray"></Label>
  156. </Grid>
  157. <Grid Grid.Row="1" Margin="10,0">
  158. <Image Height="15" gif:AnimationBehavior.SourceUri="../Image/进度条.gif" />
  159. </Grid>
  160. <Grid Grid.Row="2" Background="#F0F0F0">
  161. <Button Width="82" Height="23"
  162. Content="检查中..." IsEnabled="False"
  163. HorizontalAlignment="Right" Margin="0,10,10,10"
  164. ></Button>
  165. </Grid>
  166. </Grid>
  167. <Grid Grid.Row="2" Visibility="{Binding Path=ModelCheckState,
  168. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  169. ConverterParameter={x:Static local:ModelCheckState.Ending}}">
  170. <Grid.RowDefinitions>
  171. <RowDefinition Height="24"></RowDefinition>
  172. <RowDefinition Height="40"></RowDefinition>
  173. <RowDefinition Height="43"></RowDefinition>
  174. </Grid.RowDefinitions>
  175. <Grid Grid.Row="0" Margin="10,0">
  176. <Label Content="当前校验结果:" VerticalAlignment="Center" Foreground="LightGray"></Label>
  177. </Grid>
  178. <Grid Grid.Row="1" Margin="16,0">
  179. <TextBlock Text="{Binding Path=SavePath}"
  180. VerticalAlignment="Center"></TextBlock>
  181. </Grid>
  182. <Grid Grid.Row="2" Background="#F0F0F0">
  183. <WrapPanel HorizontalAlignment="Right">
  184. <Button Width="83" Height="23" Content="打开文件位置"
  185. HorizontalAlignment="Right" Margin="0,10,6,10" VerticalAlignment="Center"
  186. Command="{Binding Path=Commands.OpenDir}"
  187. ></Button>
  188. <Button Width="83" Height="23" Content="继续检查"
  189. HorizontalAlignment="Right" Margin="0,10,10,10" VerticalAlignment="Center"
  190. Command="{Binding Path=Commands.Execute}" ></Button>
  191. </WrapPanel>
  192. </Grid>
  193. </Grid>
  194. </Grid>
  195. </Grid>
  196. </Window>