WinVecticalPipeCheck.xaml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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="WidthAndHeight"
  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}"></TextBox>
  42. <Button Grid.Row="1" Grid.Column="2" Click="BtnSelectFileUp_OnClick" Content="选择"
  43. ></Button>
  44. <Image Grid.Row="3" Grid.Column="0"
  45. Source="../Image/下一层.png"></Image>
  46. <TextBox Grid.Row="3" Grid.Column="1" Name="TxtDownPath" IsReadOnly="True" Margin="0,0,6,0"
  47. VerticalContentAlignment="Center"
  48. Text="{Binding Path=DownFilePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"></TextBox>
  49. <Button Grid.Row="3" Grid.Column="2" Click="BtnSelectFileDown_OnClick" Content="选择"
  50. ></Button>
  51. </Grid>
  52. </StackPanel>
  53. </Grid>
  54. <Grid Grid.Row="1" Margin="10,0">
  55. <!--虚线-->
  56. <Line X1="0" Y1="15" X2="590" Y2="15" StrokeDashArray="3" Stroke="LightGray" StrokeThickness="2"></Line>
  57. </Grid>
  58. <Grid Grid.Row="2">
  59. <Grid.RowDefinitions>
  60. <RowDefinition></RowDefinition>
  61. <RowDefinition></RowDefinition>
  62. <RowDefinition></RowDefinition>
  63. </Grid.RowDefinitions>
  64. <Grid
  65. Grid.Row="0" Visibility="{Binding Path=ModelCheckState,
  66. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  67. ConverterParameter={x:Static local:ModelCheckState.Prepare}}">
  68. <Grid.RowDefinitions>
  69. <RowDefinition Height="40"></RowDefinition>
  70. <RowDefinition Height="40"></RowDefinition>
  71. <RowDefinition Height="43"></RowDefinition>
  72. </Grid.RowDefinitions>
  73. <Grid Grid.Row="0" Margin="10,0" >
  74. <Label Content="检查结果储存位置:" VerticalAlignment="Center" Foreground="LightGray"></Label>
  75. </Grid>
  76. <Grid Grid.Row="1" Margin="10,0" >
  77. <Grid.ColumnDefinitions>
  78. <ColumnDefinition Width="*"></ColumnDefinition>
  79. <ColumnDefinition Width="83"></ColumnDefinition>
  80. </Grid.ColumnDefinitions>
  81. <TextBox Margin="6,0,6,0" VerticalContentAlignment="Center" Height="25" IsReadOnly="True"
  82. Name="txtPath"
  83. Text="{Binding Path=SaveDir,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
  84. VerticalAlignment="Center"></TextBox>
  85. <Button Grid.Column="1" Content="浏览" Height="25"
  86. Click="SelectDir_OnClick"></Button>
  87. </Grid>
  88. <Grid Grid.Row="2" Background="#F0F0F0">
  89. <Button Width="82" Height="23" Content="开始检查"
  90. HorizontalAlignment="Right" Margin="0,10,10,10"
  91. Command="{Binding Path=Commands.Execute}"
  92. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  93. ></Button>
  94. </Grid>
  95. </Grid>
  96. <Grid Grid.Row="1" Visibility="{Binding Path=ModelCheckState,
  97. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  98. ConverterParameter={x:Static local:ModelCheckState.Progress}}">
  99. <Grid.RowDefinitions>
  100. <RowDefinition Height="40"></RowDefinition>
  101. <RowDefinition Height="40"></RowDefinition>
  102. <RowDefinition Height="43"></RowDefinition>
  103. </Grid.RowDefinitions>
  104. <Grid Grid.Row="0" Margin="10,0">
  105. <Label Content="检查中..." VerticalAlignment="Center" Foreground="LightGray"></Label>
  106. </Grid>
  107. <Grid Grid.Row="1" Margin="10,0">
  108. <Image Height="15" gif:AnimationBehavior.SourceUri="../Image/进度条.gif" />
  109. </Grid>
  110. <Grid Grid.Row="2" Background="#F0F0F0">
  111. <Button Width="82" Height="23"
  112. Content="检查中..." IsEnabled="False"
  113. HorizontalAlignment="Right" Margin="0,10,10,10"
  114. ></Button>
  115. </Grid>
  116. </Grid>
  117. <Grid Grid.Row="2" Visibility="{Binding Path=ModelCheckState,
  118. Converter={StaticResource ItemImageUnEqualVisibleConverter},
  119. ConverterParameter={x:Static local:ModelCheckState.Ending}}">
  120. <Grid.RowDefinitions>
  121. <RowDefinition Height="30"></RowDefinition>
  122. <RowDefinition Height="40"></RowDefinition>
  123. <RowDefinition Height="43"></RowDefinition>
  124. </Grid.RowDefinitions>
  125. <Grid Grid.Row="0" Margin="10,0">
  126. <Label Content="当前校验结果:" VerticalAlignment="Center" Foreground="LightGray"></Label>
  127. </Grid>
  128. <Grid Grid.Row="1" Margin="10,0">
  129. <TextBlock Text="{Binding Path=SavePath}"
  130. VerticalAlignment="Center"></TextBlock>
  131. </Grid>
  132. <Grid Grid.Row="2" Background="#F0F0F0">
  133. <WrapPanel HorizontalAlignment="Right">
  134. <Button Width="83" Height="23" Content="打开文件位置"
  135. HorizontalAlignment="Right" Margin="0,10,6,10" VerticalAlignment="Center"
  136. Command="{Binding Path=Commands.OpenDir}"
  137. ></Button>
  138. <Button Width="83" Height="23" Content="继续检查"
  139. HorizontalAlignment="Right" Margin="0,10,10,10" VerticalAlignment="Center"
  140. Command="{Binding Path=Commands.Execute}" ></Button>
  141. </WrapPanel>
  142. </Grid>
  143. </Grid>
  144. </Grid>
  145. </Grid>
  146. </Window>