WinCreateFacility.xaml 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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="CenterScreen"
  10. ResizeMode="NoResize"
  11. Height="587" Width="600">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="*"></RowDefinition>
  15. <RowDefinition Height="80"></RowDefinition>
  16. <RowDefinition Height="60"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <Grid Margin="5,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="120" Height="25" Background="White" Foreground="Black" Content="从剪切板粘贴"
  27. HorizontalAlignment="Right" Margin="0,0,5,0" 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}">
  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="14"/>
  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="5,0">
  66. <Label Content="当前打开的模型文件:" Foreground="DarkGray" ></Label>
  67. <TextBlock Margin="5,15,0,0" Foreground="Black"
  68. Text="{Binding Path=ModelFilePath}"
  69. VerticalAlignment="Center" TextWrapping="WrapWithOverflow" ></TextBlock>
  70. </Grid>
  71. <Grid Grid.Row="2" Background="LightGray">
  72. <Button Width="120" Height="25" Background="White" Foreground="Black" Content="重新输入"
  73. HorizontalAlignment="Right" Margin="0,0,115,0" VerticalAlignment="Center"
  74. Command="{Binding Path=Commands.ClearTabCode}"
  75. ></Button>
  76. <Button Width="100" Height="25" Background="Black" Foreground="White" Content="下一步"
  77. HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Center"
  78. Command="{Binding Path=Commands.Execute}"
  79. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
  80. ></Button>
  81. </Grid>
  82. </Grid>
  83. </Window>