123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <Window x:Class="Saga.PlugIn.ModelCheck.WinModeCheck"
- 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:converter="clr-namespace:SAGA.DotNetUtils.WPF.Converter;assembly=SAGA.DotNetUtils"
- xmlns:local="clr-namespace:Saga.PlugIn.ModelCheck"
- mc:Ignorable="d" Title="模型规范检查" WindowStartupLocation="CenterScreen"
- ResizeMode="NoResize"
- Height="587" 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="80"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="Auto"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <GroupBox Header="当前打开的模型文件" Foreground="DarkGray" Margin="10,10,10,5">
- <TextBlock Margin="5,0" Foreground="Black"
- Text="{Binding Path=ModelFilePath}"
- VerticalAlignment="Center" TextWrapping="WrapWithOverflow" ></TextBlock>
- </GroupBox>
- </Grid>
- <Grid Grid.Row="1" Margin="10,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="30"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <TextBlock Text="包含的检查项:" Foreground="DarkGray" VerticalAlignment="Center"></TextBlock>
- </Grid>
- <Grid Grid.Row="1">
- <ListBox ItemsSource="{Binding Path=CheckItems}" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <WrapPanel >
- <Image Width="30" Visibility="{Binding Path=ModelCheckState,
- Converter={StaticResource ItemImageEqualVisibleConverter},
- ConverterParameter={x:Static local:ModelCheckState.Prepare}}"
- Source="{Binding Path=ModelCheckState,Converter={StaticResource ItemImageConverter}}"></Image>
- <Label Content="{Binding Path=Name}" VerticalContentAlignment="Center"></Label>
- </WrapPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </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="60"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="5,8,0,2">
- <Label Content="检查结果储存位置:" VerticalAlignment="Center" Foreground="LightGray"></Label>
- </Grid>
- <Grid Grid.Row="1" Margin="5,3,0,8">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="100"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBox Margin="10,0,0,0" VerticalContentAlignment="Center" Height="25"
- Name="txtPath"
- Text="{Binding Path=SavePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
- VerticalAlignment="Center"></TextBox>
- <Button Grid.Column="1" Content="浏览" Height="25" Margin="10,0,5,0"
- Click="SelectFile_OnClick"></Button>
- </Grid>
- <Grid Grid.Row="2" Background="LightGray">
- <Button Width="100" Height="25" Background="Black" Foreground="White" Content="开始检查"
- HorizontalAlignment="Right"
- Margin="0,0,5,0" VerticalAlignment="Center"
- Command="{Binding Path=Commands.Execute}"
- ></Button>
- </Grid>
- </Grid>
- <Grid Grid.Row="1" Visibility="{Binding Path=ModelCheckState,
- Converter={StaticResource ItemImageUnEqualVisibleConverter},
- ConverterParameter={x:Static local:ModelCheckState.Progress}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="30"></RowDefinition>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition Height="60"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="5,0">
- <Label Content="建模规范检查进度...(12/12)" VerticalAlignment="Center"></Label>
- </Grid>
- <Grid Grid.Row="1" Margin="15,0">
- <ProgressBar Grid.Column="0" Height="30" Value="12" Maximum="12"></ProgressBar>
- </Grid>
- <Grid Grid.Row="2" Background="LightGray">
- <Button Width="100" Height="25"
- Content="检查中..." IsEnabled="False"
- HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Center"
- ></Button>
- </Grid>
- </Grid>
- <Grid Grid.Row="2" Visibility="{Binding Path=ModelCheckState,
- Converter={StaticResource ItemImageUnEqualVisibleConverter},
- ConverterParameter={x:Static local:ModelCheckState.Ending}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="30"></RowDefinition>
- <RowDefinition Height="40"></RowDefinition>
- <RowDefinition Height="60"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="5,0">
- <Label Content="当前校验结果:" VerticalAlignment="Center" Foreground="LightGray"></Label>
- </Grid>
- <Grid Grid.Row="1" Margin="5,0">
- <TextBlock Margin="10,0" Height="30" Text="{Binding Path=SavePath}"
- VerticalAlignment="Center"></TextBlock>
- </Grid>
- <Grid Grid.Row="2" Background="LightGray">
- <Button Width="120" Height="25" Background="White" Foreground="Black" Content="打开文件位置"
- HorizontalAlignment="Right" Margin="0,0,115,0" VerticalAlignment="Center"
- Command="{Binding Path=Commands.Execute}"
- ></Button>
- <Button Width="100" Height="25" Background="Black" Foreground="White" Content="确认"
- HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Center"
- Click="ButtonNext_OnClick" ></Button>
- </Grid>
- </Grid>
- </Grid>
- </Grid>
- </Window>
|