123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <Window x:Class="Saga.PlugIn.VerticalPipeCheck.WinVecticalPipeCheck"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:Saga.PlugIn.ModelCheck"
- xmlns:gif="https://github.com/XamlAnimatedGif/XamlAnimatedGif"
- mc:Ignorable="d" Title="立管检查" WindowStartupLocation="CenterScreen"
- ResizeMode="NoResize" SizeToContent="Height"
- Height="Auto" Width="600">
- <Window.Resources>
- <local:ItemImageVisibleConverter x:Key="ItemImageEqualVisibleConverter" IsEqualCollapsed="True"></local:ItemImageVisibleConverter>
- <local:ItemImageVisibleConverter x:Key="ItemImageUnEqualVisibleConverter" IsEqualCollapsed="False"></local:ItemImageVisibleConverter>
- <local:ItemImageConverter x:Key="ItemImageConverter" ></local:ItemImageConverter>
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"></RowDefinition>
- <RowDefinition Height="Auto"></RowDefinition>
- <RowDefinition Height="Auto"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="10,0">
- <StackPanel>
- <Label Margin="0,10,0,0" Content="请选择相邻两层模型,进行立管连接检查"></Label>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="25"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="83"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="10" ></RowDefinition>
- <RowDefinition Height="25" ></RowDefinition>
- <RowDefinition Height="10" ></RowDefinition>
- <RowDefinition Height="25"></RowDefinition>
- </Grid.RowDefinitions>
- <Image Grid.Row="1" Grid.Column="0"
- Source="../Image/上一层.png"></Image>
- <TextBox Grid.Row="1" Grid.Column="1" Name="TxtUpPath" IsReadOnly="True" Margin="0,0,6,0"
- VerticalContentAlignment="Center"
- Text="{Binding Path=UpFilePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
- <TextBox.Resources>
- <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left" AlignmentY="Center">
- <VisualBrush.Visual>
- <TextBlock FontStyle="Normal" FontSize="14" TextWrapping="Wrap" Width="430" Text='请选择上层模型文件'/>
- </VisualBrush.Visual>
- </VisualBrush>
- </TextBox.Resources>
- <TextBox.Style>
- <Style TargetType="TextBox">
- <Setter Property="FontSize" Value="12"/>
- <Setter Property="Foreground" Value="#FF333333"/>
- <Setter Property="BorderBrush" Value="#8F666666"/>
- <Setter Property="TextWrapping" Value="Wrap"/>
- <Setter Property="AcceptsReturn" Value="True"/>
- <Style.Triggers>
- <Trigger Property="Text" Value="{x:Null}">
- <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
- </Trigger>
- <Trigger Property="Text" Value="">
- <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </TextBox.Style>
- </TextBox>
- <Button Grid.Row="1" Grid.Column="2" Click="BtnSelectFileUp_OnClick" Content="选择"
- ></Button>
- <Image Grid.Row="3" Grid.Column="0"
- Source="../Image/下一层.png"></Image>
- <TextBox Grid.Row="3" Grid.Column="1" Name="TxtDownPath" IsReadOnly="True" Margin="0,0,6,0"
- VerticalContentAlignment="Center"
- Text="{Binding Path=DownFilePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
- <TextBox.Resources>
- <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left" AlignmentY="Center">
- <VisualBrush.Visual>
- <TextBlock FontStyle="Normal" FontSize="14" TextWrapping="Wrap" Width="430" Text='请选择下层模型文件'/>
- </VisualBrush.Visual>
- </VisualBrush>
- </TextBox.Resources>
- <TextBox.Style>
- <Style TargetType="TextBox">
- <Setter Property="FontSize" Value="12"/>
- <Setter Property="Foreground" Value="#FF333333"/>
- <Setter Property="BorderBrush" Value="#8F666666"/>
- <Setter Property="TextWrapping" Value="Wrap"/>
- <Setter Property="AcceptsReturn" Value="True"/>
- <Style.Triggers>
- <Trigger Property="Text" Value="{x:Null}">
- <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
- </Trigger>
- <Trigger Property="Text" Value="">
- <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </TextBox.Style>
- </TextBox>
- <Button Grid.Row="3" Grid.Column="2" Click="BtnSelectFileDown_OnClick" Content="选择"
- ></Button>
- </Grid>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1" Margin="10,0">
- <!--虚线-->
- <Line X1="0" Y1="15" X2="590" Y2="15" StrokeDashArray="3" Stroke="LightGray" StrokeThickness="2"></Line>
- </Grid>
- <Grid Grid.Row="2">
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid
- Grid.Row="0" Visibility="{Binding Path=ModelCheckState,
- Converter={StaticResource ItemImageUnEqualVisibleConverter},
- ConverterParameter={x:Static local:ModelCheckState.Prepare}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition Height="43"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="10,0" >
- <Label Content="检查结果储存位置:" VerticalAlignment="Center" Foreground="LightGray"></Label>
- </Grid>
- <Grid Grid.Row="1" Margin="10,0" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="83"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBox Margin="6,0,6,0" VerticalContentAlignment="Center" Height="25" IsReadOnly="True"
- Name="txtPath"
- Text="{Binding Path=SaveDir,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
- VerticalAlignment="Center"></TextBox>
- <Button Grid.Column="1" Content="浏览" Height="25"
- Click="SelectDir_OnClick"></Button>
- </Grid>
- <Grid Grid.Row="2" Background="#F0F0F0">
- <Button Width="82" Height="23" Content="开始检查"
- HorizontalAlignment="Right" Margin="0,10,10,10"
- Command="{Binding Path=Commands.Execute}"
- CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- ></Button>
- </Grid>
- </Grid>
- <Grid Grid.Row="1" Visibility="{Binding Path=ModelCheckState,
- Converter={StaticResource ItemImageUnEqualVisibleConverter},
- ConverterParameter={x:Static local:ModelCheckState.Progress}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition Height="43"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="10,0">
- <Label Content="检查中..." VerticalAlignment="Center" Foreground="LightGray"></Label>
- </Grid>
- <Grid Grid.Row="1" Margin="10,0">
- <Image Height="15" gif:AnimationBehavior.SourceUri="../Image/进度条.gif" />
- </Grid>
- <Grid Grid.Row="2" Background="#F0F0F0">
- <Button Width="82" Height="23"
- Content="检查中..." IsEnabled="False"
- HorizontalAlignment="Right" Margin="0,10,10,10"
- ></Button>
- </Grid>
- </Grid>
- <Grid Grid.Row="2" Visibility="{Binding Path=ModelCheckState,
- Converter={StaticResource ItemImageUnEqualVisibleConverter},
- ConverterParameter={x:Static local:ModelCheckState.Ending}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="24"></RowDefinition>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition Height="43"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="10,0">
- <Label Content="当前校验结果:" VerticalAlignment="Center" Foreground="LightGray"></Label>
- </Grid>
- <Grid Grid.Row="1" Margin="16,0">
- <TextBlock Text="{Binding Path=SavePath}"
- VerticalAlignment="Center"></TextBlock>
- </Grid>
- <Grid Grid.Row="2" Background="#F0F0F0">
- <WrapPanel HorizontalAlignment="Right">
- <Button Width="83" Height="23" Content="打开文件位置"
- HorizontalAlignment="Right" Margin="0,10,6,10" VerticalAlignment="Center"
- Command="{Binding Path=Commands.OpenDir}"
- ></Button>
- <Button Width="83" Height="23" Content="继续检查"
- HorizontalAlignment="Right" Margin="0,10,10,10" VerticalAlignment="Center"
- Command="{Binding Path=Commands.Execute}" ></Button>
- </WrapPanel>
-
- </Grid>
- </Grid>
- </Grid>
- </Grid>
- </Window>
|