SettingView.xaml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <UserControl x:Class="DefaultEdit.Views.SettingView"
  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:DefaultEdit.Views"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. mc:Ignorable="d"
  10. d:DesignHeight="700"
  11. d:DesignWidth="1000">
  12. <UserControl.Resources>
  13. <Style x:Key="textborder"
  14. TargetType="Border">
  15. <Setter Property="BorderThickness"
  16. Value="2" />
  17. <Setter Property="Background"
  18. Value="#548CC5" />
  19. <Setter Property="VerticalAlignment"
  20. Value="Center" />
  21. <Setter Property="BorderBrush"
  22. Value="#7DB1EC" />
  23. <Setter Property="CornerRadius"
  24. Value="5" />
  25. <Setter Property="Effect">
  26. <Setter.Value>
  27. <DropShadowEffect BlurRadius="10"
  28. Direction="0"
  29. ShadowDepth="0"
  30. Color="White" />
  31. </Setter.Value>
  32. </Setter>
  33. </Style>
  34. <Style x:Key="buttonborder"
  35. TargetType="Border">
  36. <Setter Property="BorderThickness"
  37. Value="2" />
  38. <Setter Property="Background"
  39. Value="Transparent" />
  40. <Setter Property="VerticalAlignment"
  41. Value="Center" />
  42. <Setter Property="BorderBrush"
  43. Value="White" />
  44. <Setter Property="CornerRadius"
  45. Value="5" />
  46. <Setter Property="Effect">
  47. <Setter.Value>
  48. <DropShadowEffect BlurRadius="10"
  49. Direction="0"
  50. ShadowDepth="0"
  51. Color="#D4D8DD" />
  52. </Setter.Value>
  53. </Setter>
  54. </Style>
  55. </UserControl.Resources>
  56. <Grid Margin="20">
  57. <Grid>
  58. <StackPanel>
  59. <StackPanel Margin="30"
  60. Orientation="Horizontal"
  61. HorizontalAlignment="Left"
  62. VerticalAlignment="Center">
  63. <TextBlock Text="PlcIP:"
  64. Margin="5,5,58,5"
  65. FontSize="20"
  66. FontWeight="Bold" />
  67. <TextBox Text="{Binding Management.CurentApplicationSettings.PlcIP}"
  68. Width="280"
  69. FontSize="20"
  70. HorizontalContentAlignment="Center"
  71. VerticalContentAlignment="Center" />
  72. </StackPanel>
  73. <StackPanel Margin="30"
  74. Orientation="Horizontal"
  75. HorizontalAlignment="Left"
  76. VerticalAlignment="Center">
  77. <TextBlock Text="打印机:"
  78. Margin="5,5,45,5"
  79. FontSize="20"
  80. FontWeight="Bold" />
  81. <TextBox Text="{Binding Management.CurentApplicationSettings.PrinterName}"
  82. FontSize="20"
  83. Width="280"
  84. HorizontalContentAlignment="Center"
  85. VerticalContentAlignment="Center" />
  86. </StackPanel>
  87. <StackPanel Margin="30"
  88. Orientation="Horizontal"
  89. HorizontalAlignment="Left"
  90. VerticalAlignment="Center">
  91. <TextBlock Text="MES地址:"
  92. Margin="5,5,25,5"
  93. FontSize="20"
  94. FontWeight="Bold" />
  95. <TextBox Text="{Binding Management.CurentApplicationSettings.Url}"
  96. FontSize="20"
  97. Width="280"
  98. HorizontalContentAlignment="Center"
  99. VerticalContentAlignment="Center" />
  100. </StackPanel>
  101. <StackPanel Margin="30"
  102. Orientation="Horizontal"
  103. HorizontalAlignment="Left"
  104. VerticalAlignment="Center">
  105. <TextBlock Text="设备编号:"
  106. Margin="5,5,25,5"
  107. FontSize="20"
  108. FontWeight="Bold" />
  109. <TextBox Text="{Binding Management.CurentApplicationSettings.DeviceId}"
  110. FontSize="20"
  111. Width="300"
  112. HorizontalContentAlignment="Center"
  113. VerticalContentAlignment="Center" />
  114. </StackPanel>
  115. <StackPanel Margin="30"
  116. Orientation="Horizontal"
  117. HorizontalAlignment="Center"
  118. VerticalAlignment="Center">
  119. <Border Style="{StaticResource buttonborder}">
  120. <Button Content="保存"
  121. VerticalAlignment="Top"
  122. Padding="30,5,30,5"
  123. BorderBrush="Black"
  124. FontSize="20"
  125. Command="{Binding SaveSettingsCommand}"
  126. WindowChrome.IsHitTestVisibleInChrome="True"
  127. Background="Transparent" />
  128. </Border>
  129. </StackPanel>
  130. </StackPanel>
  131. </Grid>
  132. </Grid>
  133. </UserControl>