SystemSettingsView.xaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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="1000"
  11. d:DesignWidth="1000">
  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. <Button Content="仅启动本地服务"
  47. Style="{StaticResource SuccessButtonStyle}"
  48. Width="90"
  49. IsEnabled="{Binding StartServiceEnable}"
  50. Command="{Binding StartLocalhostServiceCommand}" />
  51. </StackPanel>
  52. <TextBlock Foreground="{Binding Servicebrushes}"
  53. Text="{Binding ServiceStatus}"
  54. Margin="0,5" />
  55. </StackPanel>
  56. </GroupBox>
  57. <GroupBox Grid.Row="1"
  58. Header="API客户端设置"
  59. Margin="0,12,0,0">
  60. <StackPanel>
  61. <StackPanel Orientation="Horizontal"
  62. Margin="0,5">
  63. <TextBlock Text="API地址:"
  64. Width="80"
  65. VerticalAlignment="Center" />
  66. <TextBox Width="320"
  67. Text="{Binding ApiUrl}" />
  68. </StackPanel>
  69. <StackPanel Orientation="Horizontal"
  70. Margin="0,5">
  71. <TextBlock Text="App Key:"
  72. Width="80"
  73. VerticalAlignment="Center" />
  74. <TextBox Width="220"
  75. Text="{Binding AppKey}" />
  76. </StackPanel>
  77. <StackPanel Orientation="Horizontal"
  78. Margin="0,5">
  79. <TextBlock Text="Token:"
  80. Width="80"
  81. VerticalAlignment="Center" />
  82. <TextBox Width="220"
  83. Text="{Binding Token}" />
  84. </StackPanel>
  85. <Button Content="保存设置"
  86. Style="{StaticResource SecondaryButtonStyle}"
  87. Width="90"
  88. Margin="0,10,0,0"
  89. Command="{Binding SaveSettingsCommand}" />
  90. </StackPanel>
  91. </GroupBox>
  92. <GroupBox Grid.Row="2"
  93. Header="外观主题"
  94. Margin="0,12,0,0">
  95. <StackPanel Orientation="Horizontal">
  96. <TextBlock Text="深色模式:"
  97. Width="80"
  98. VerticalAlignment="Center" />
  99. <CheckBox IsChecked="{Binding IsDarkTheme}"
  100. VerticalAlignment="Center" />
  101. <TextBlock Text="(切换后立即生效)"
  102. Margin="8,0,0,0"
  103. VerticalAlignment="Center"
  104. Opacity="0.8" />
  105. </StackPanel>
  106. </GroupBox>
  107. <GroupBox Grid.Row="3"
  108. Header="接口地址"
  109. Margin="0,12,0,0">
  110. <StackPanel>
  111. <TextBlock Text="1. 工单下发接口: /api/mes/receiveWorkOrder"
  112. Margin="0,2" />
  113. <TextBlock Text="2. SN打印请求接口: /api/mes/requestSnPrint"
  114. Margin="0,2" />
  115. <TextBlock Text="3. SN关键件绑定接口: /api/mes/receiveSnComponent"
  116. Margin="0,2" />
  117. <TextBlock Text="4. 加工参数上报接口: /api/mes/receiveProcessParameters"
  118. Margin="0,2" />
  119. </StackPanel>
  120. </GroupBox>
  121. <GroupBox Grid.Row="4"
  122. Header="工单状态说明"
  123. Margin="0,12,0,0">
  124. <StackPanel>
  125. <TextBlock Text="0:已创建、1:已排产、2:已发布、3:关闭、4:已锁定、5:已开工、6:已完成、7:异常完工"
  126. Margin="0,2"
  127. TextWrapping="Wrap" />
  128. <TextBlock Text="冻结状态: 0:否、1:是"
  129. Margin="0,2" />
  130. <TextBlock Text="下发状态: 0:未下发、1:已下发"
  131. Margin="0,2" />
  132. </StackPanel>
  133. </GroupBox>
  134. </Grid>
  135. </UserControl>