WinVecticalPipeCheck.xaml 8.5 KB

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