WinCreateFacility.xaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <Window x:Class="Saga.PlugIn.ModelCheck.WinCreateFacility"
  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:converter="clr-namespace:SAGA.DotNetUtils.WPF.Converter;assembly=SAGA.DotNetUtils"
  7. xmlns:local="clr-namespace:Saga.PlugIn.ModelCheck"
  8. xmlns:createFacility="clr-namespace:Saga.PlugIn.CreateFacility"
  9. mc:Ignorable="d" Title="待建模设备" WindowStartupLocation="Manual"
  10. ResizeMode="NoResize"
  11. Height="550" Width="400">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="*"></RowDefinition>
  15. <RowDefinition Height="80"></RowDefinition>
  16. <RowDefinition Height="43"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <Grid Margin="10,0">
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="30"></RowDefinition>
  21. <RowDefinition Height="*"></RowDefinition>
  22. <RowDefinition Height="30"></RowDefinition>
  23. </Grid.RowDefinitions>
  24. <Grid Height="30" >
  25. <Label Content="需建模的设备标记码:"></Label>
  26. <Button Width="82" Height="23" Content="从剪切板粘贴"
  27. HorizontalAlignment="Right" VerticalAlignment="Center"
  28. Command="{Binding Path=Commands.PasteTabCode}"
  29. ></Button>
  30. </Grid>
  31. <Grid Grid.Row="1">
  32. <TextBox Text="{Binding Path=TabCode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True">
  33. <TextBox.Resources>
  34. <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left" AlignmentY="Top">
  35. <VisualBrush.Visual>
  36. <TextBlock FontStyle="Normal" FontSize="14" TextWrapping="Wrap" Width="430" Text='请输入需建模的设备标记码'/>
  37. </VisualBrush.Visual>
  38. </VisualBrush>
  39. </TextBox.Resources>
  40. <TextBox.Style>
  41. <Style TargetType="TextBox">
  42. <Setter Property="FontSize" Value="12"/>
  43. <Setter Property="Foreground" Value="#FF333333"/>
  44. <Setter Property="BorderBrush" Value="#8F666666"/>
  45. <Setter Property="TextWrapping" Value="Wrap"/>
  46. <Setter Property="AcceptsReturn" Value="True"/>
  47. <Setter Property="VerticalScrollBarVisibility" Value="Visible"/>
  48. <Style.Triggers>
  49. <Trigger Property="Text" Value="{x:Null}">
  50. <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
  51. </Trigger>
  52. <Trigger Property="Text" Value="">
  53. <Setter Property="Background" Value="{StaticResource HelpBrush}"/>
  54. </Trigger>
  55. </Style.Triggers>
  56. </Style>
  57. </TextBox.Style>
  58. </TextBox>
  59. </Grid>
  60. <WrapPanel Grid.Row="2">
  61. <Label Content="该设备所在:"></Label>
  62. <TextBlock Text="{Binding Path=FacilityLocated}" VerticalAlignment="Center"></TextBlock>
  63. </WrapPanel>
  64. </Grid>
  65. <Grid Grid.Row="1" Margin="10,0">
  66. <Label Content="当前打开的模型文件:" Foreground="DarkGray" ></Label>
  67. <TextBlock Margin="8,15,0,0"
  68. Text="{Binding Path=ModelFilePath}"
  69. VerticalAlignment="Center" TextWrapping="WrapWithOverflow" ></TextBlock>
  70. </Grid>
  71. <Grid Grid.Row="2" Background="#F0F0F0">
  72. <WrapPanel HorizontalAlignment="Right">
  73. <Button Width="82" Height="23" Content="重新输入"
  74. HorizontalAlignment="Right" Margin="0,10,6,10"
  75. Command="{Binding Path=Commands.ClearTabCode}"
  76. ></Button>
  77. <Button Width="82" Height="23" Content="下一步"
  78. HorizontalAlignment="Right" Margin="0,10,10,10"
  79. Command="{Binding Path=Commands.Execute}"
  80. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
  81. IsDefault="True"></Button>
  82. </WrapPanel>
  83. </Grid>
  84. </Grid>
  85. </Window>