123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <UserControl
- x:Class="ShakerManger.View.SystemPageView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:hc="https://handyorg.github.io/handycontrol"
- xmlns:local="clr-namespace:ShakerManger.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:model="clr-namespace:Shaker.Model;assembly=Shaker"
- xmlns:vm="clr-namespace:ShakerManger.ViewModel"
- d:DataContext="{d:DesignInstance {x:Type vm:SystemPageViewModel}}"
- d:DesignHeight="450"
- d:DesignWidth="800"
- DataContext="{Binding Source={StaticResource MainViewModel}, Path=Data.SystemConfig.SystemPage}"
- IsEnabled="{Binding Source={x:Static vm:LoginViewModel.Default}, Path=IsAnonymous, Converter={StaticResource Boolean2BooleanReConverter}}"
- mc:Ignorable="d">
- <UserControl.Style>
- <Style TargetType="UserControl">
- <Style.Triggers>
- <DataTrigger Binding="{Binding Source={x:Static vm:LoginViewModel.Default}, Path=UserType}" Value="{x:Static model:UserType.SystemAdministrator}">
- <Setter Property="IsEnabled" Value="True" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Source={x:Static vm:LoginViewModel.Default}, Path=UserType}" Value="{x:Static model:UserType.ClientUser}">
- <Setter Property="IsEnabled" Value="False" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Source={x:Static vm:LoginViewModel.Default}, Path=UserType}" Value="{x:Static model:UserType.SystemUser}">
- <Setter Property="IsEnabled" Value="False" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </UserControl.Style>
- <UniformGrid
- Margin="10"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- Columns="1">
- <StackPanel Height="66" Orientation="Horizontal">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- Text="采集间隔时间:" />
- <hc:NumericUpDown
- Width="120"
- Height="32"
- Margin="4,0,0,0"
- Background="Transparent"
- CaretBrush="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Foreground}"
- FontSize="14"
- Minimum="10"
- Value="{Binding LoopTime}" />
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- Text="ms" />
- </StackPanel>
- <StackPanel Margin="0,0,0,0" Orientation="Horizontal">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- Text="权限申请超时时间:" />
- <hc:NumericUpDown
- Width="120"
- Height="32"
- Margin="4,0,0,0"
- Background="Transparent"
- CaretBrush="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Foreground}"
- FontSize="14"
- Minimum="1000"
- Value="{Binding RequestPermissionsTimeout, Mode=TwoWay}" />
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- Text="ms" />
- </StackPanel>
- <StackPanel Margin="0,0,0,0" Orientation="Horizontal">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- Text="振动台启动超时时间:" />
- <hc:NumericUpDown
- Width="120"
- Height="32"
- Margin="4,0,0,0"
- Background="Transparent"
- CaretBrush="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Foreground}"
- FontSize="14"
- Maximum="12000"
- Minimum="10"
- Value="{Binding StartShakerTimeOut, Mode=TwoWay}" />
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- Foreground="White"
- Text="s" />
- </StackPanel>
- <Button
- Height="42"
- hc:IconElement.Geometry="{StaticResource SaveGeometry}"
- hc:IconElement.Height="20"
- hc:IconElement.Width="20"
- Command="{Binding SaveCommand}"
- Content="保存"
- FontSize="16"
- Style="{StaticResource HasIconButton}" />
- </UniformGrid>
- </UserControl>
|