SystemSettingsView.xaml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <UserControl x:Class="LocalhostMES.Views.Tabs.SystemSettingsView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. mc:Ignorable="d"
  10. d:DesignHeight="480"
  11. d:DesignWidth="780">
  12. <Grid Margin="10">
  13. <b:Interaction.Triggers>
  14. <b:EventTrigger EventName="Loaded">
  15. <b:InvokeCommandAction Command="{Binding ViewLoadedCommand}" />
  16. </b:EventTrigger>
  17. </b:Interaction.Triggers>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="Auto" />
  20. <RowDefinition Height="Auto" />
  21. <RowDefinition Height="Auto" />
  22. <RowDefinition Height="Auto" />
  23. <RowDefinition Height="Auto" />
  24. <RowDefinition Height="*" />
  25. </Grid.RowDefinitions>
  26. <GroupBox Grid.Row="0"
  27. Header="Web API服务设置">
  28. <StackPanel>
  29. <StackPanel Orientation="Horizontal"
  30. Margin="0,5">
  31. <TextBlock Text="服务端口:"
  32. Width="80"
  33. VerticalAlignment="Center" />
  34. <TextBox Width="100"
  35. Text="{Binding ServerPort}" />
  36. <Button Content="启动服务"
  37. Style="{StaticResource SuccessButtonStyle}"
  38. Width="90"
  39. IsEnabled="{Binding StartServiceEnable}"
  40. Command="{Binding StartServiceCommand}" />
  41. <Button Content="停止服务"
  42. Style="{StaticResource DangerButtonStyle}"
  43. Width="90"
  44. IsEnabled="{Binding StopServiceEnable}"
  45. Command="{Binding StopServiceCommand}" />
  46. </StackPanel>
  47. <TextBlock Foreground="{Binding Servicebrushes}"
  48. Text="{Binding ServiceStatus}"
  49. Margin="0,5" />
  50. </StackPanel>
  51. </GroupBox>
  52. <GroupBox Grid.Row="1"
  53. Header="API客户端设置"
  54. Margin="0,12,0,0">
  55. <StackPanel>
  56. <StackPanel Orientation="Horizontal"
  57. Margin="0,5">
  58. <TextBlock Text="API地址:"
  59. Width="80"
  60. VerticalAlignment="Center" />
  61. <TextBox Width="320"
  62. Text="{Binding ApiUrl}" />
  63. </StackPanel>
  64. <StackPanel Orientation="Horizontal"
  65. Margin="0,5">
  66. <TextBlock Text="App Key:"
  67. Width="80"
  68. VerticalAlignment="Center" />
  69. <TextBox Width="220"
  70. Text="{Binding AppKey}" />
  71. </StackPanel>
  72. <StackPanel Orientation="Horizontal"
  73. Margin="0,5">
  74. <TextBlock Text="Token:"
  75. Width="80"
  76. VerticalAlignment="Center" />
  77. <TextBox Width="220"
  78. Text="{Binding Token}" />
  79. </StackPanel>
  80. <Button Content="保存设置"
  81. Style="{StaticResource SecondaryButtonStyle}"
  82. Width="90"
  83. Margin="0,10,0,0"
  84. Command="{Binding SaveSettingsCommand}" />
  85. </StackPanel>
  86. </GroupBox>
  87. <GroupBox Grid.Row="2"
  88. Header="外观主题"
  89. Margin="0,12,0,0">
  90. <StackPanel Orientation="Horizontal">
  91. <TextBlock Text="深色模式:"
  92. Width="80"
  93. VerticalAlignment="Center" />
  94. <CheckBox IsChecked="{Binding IsDarkTheme}"
  95. VerticalAlignment="Center" />
  96. <TextBlock Text="(切换后立即生效)"
  97. Margin="8,0,0,0"
  98. VerticalAlignment="Center"
  99. Opacity="0.8" />
  100. </StackPanel>
  101. </GroupBox>
  102. <GroupBox Grid.Row="3"
  103. Header="接口地址"
  104. Margin="0,12,0,0">
  105. <StackPanel>
  106. <TextBlock Text="1. 工单下发接口: /api/mes/receiveWorkOrder"
  107. Margin="0,2" />
  108. <TextBlock Text="2. SN打印请求接口: /api/mes/requestSnPrint"
  109. Margin="0,2" />
  110. <TextBlock Text="3. SN关键件绑定接口: /api/mes/receiveSnComponent"
  111. Margin="0,2" />
  112. <TextBlock Text="4. 加工参数上报接口: /api/mes/receiveProcessParameters"
  113. Margin="0,2" />
  114. </StackPanel>
  115. </GroupBox>
  116. <GroupBox Grid.Row="4"
  117. Header="工单状态说明"
  118. Margin="0,12,0,0">
  119. <StackPanel>
  120. <TextBlock Text="0:已创建、1:已排产、2:已发布、3:关闭、4:已锁定、5:已开工、6:已完成、7:异常完工"
  121. Margin="0,2"
  122. TextWrapping="Wrap" />
  123. <TextBlock Text="冻结状态: 0:否、1:是"
  124. Margin="0,2" />
  125. <TextBlock Text="下发状态: 0:未下发、1:已下发"
  126. Margin="0,2" />
  127. </StackPanel>
  128. </GroupBox>
  129. </Grid>
  130. </UserControl>