Browse Source

冲突解决

reconfiguration
pry 3 months ago
parent
commit
cf94c64797
5 changed files with 141 additions and 3 deletions
  1. +3
    -2
      BPASmartClient.Academy/App.xaml
  2. +1
    -1
      BPASmartClient.Academy/App.xaml.cs
  3. +91
    -0
      BPASmartClient.Academy/View/DeviceMotionView.xaml
  4. +45
    -0
      BPASmartClient.CustomResource/RecDictionarys/BeveledRadioButtonStyle.xaml
  5. +1
    -0
      BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj

+ 3
- 2
BPASmartClient.Academy/App.xaml View File

@@ -18,7 +18,8 @@
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/DatePickeerDictionary.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/TextBoxStyle.xaml" />

<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
<ResourceDictionary>
<con:ColorConverter x:Key="ColorConverter" />
<con:TextConverter x:Key="TextConverter" />
@@ -35,8 +36,8 @@
<ImageBrush x:Key="hbl" ImageSource="/BPASmartClient.CustomResource;component/Image/HBL.png" />
<ImageBrush x:Key="dbxt" ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
</ResourceDictionary>

</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

+ 1
- 1
BPASmartClient.Academy/App.xaml.cs View File

@@ -167,7 +167,7 @@ namespace BPASmartClient.Academy
ObservableCollection<SubMenumodel> DeviceMonitor = new ObservableCollection<SubMenumodel>();
DeviceMonitor.Add(new SubMenumodel()
{
SubMenuName = "设备状态",
SubMenuName = "设备控制",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
AssemblyName = "BPASmartClient.Academy",
ToggleWindowPath = "View.DeviceMotionView"


+ 91
- 0
BPASmartClient.Academy/View/DeviceMotionView.xaml View File

@@ -7,6 +7,97 @@
xmlns:local="clr-namespace:BPASmartClient.Academy.View"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="checkBox" TargetType="{x:Type CheckBox}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Border x:Name="bord" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<ContentControl Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="bord">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/红色圆角矩形背景.png"/>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter Property="Background" TargetName="bord">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/buttonOff.png"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="radiobutton" TargetType="{x:Type RadioButton}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border x:Name="bord" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<ContentControl Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="bord">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/红色圆角矩形背景.png"/>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter Property="Background" TargetName="bord">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/buttonOff.png"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid Margin="10,2">
<Grid.Background>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/背景边框4.png"/>
</Grid.Background>
</Grid>
<Grid Grid.Column="1" Margin="0,2,10,2">
<Grid.Background>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/背景边框4.png"/>
</Grid.Background>
<UniformGrid Rows="4" >
<CheckBox Style="{StaticResource Beveledcheck}" Content="系统启动" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,20"/>
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="阀门开关:" HorizontalAlignment="Left" Foreground="White" VerticalAlignment="Top"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<RadioButton Content="配料搅拌:开" Style="{StaticResource radiobutton}" GroupName="1" Width="120" Foreground="Black" Height="40" BorderThickness="0"/>
<RadioButton Content="配料搅拌:关" IsChecked="True" Style="{StaticResource radiobutton}" GroupName="1" Width="120" Foreground="Black" Height="40" BorderThickness="0"/>
</StackPanel>
</StackPanel>
</UniformGrid>
</Grid>
</Grid>
<Grid>

</Grid>


+ 45
- 0
BPASmartClient.CustomResource/RecDictionarys/BeveledRadioButtonStyle.xaml View File

@@ -45,6 +45,51 @@
</Style>
<!--#endregion-->

<!--#region 右斜边按钮1-->
<Style x:Key="Beveledcheck" TargetType="{x:Type CheckBox}">
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="Width" Value="100" />
<Setter Property="Height" Value="30" />
<Setter Property="IsChecked" Value="False" />
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Grid x:Name="gr" SnapsToDevicePixels="True">

<pry:BeveledButton
x:Name="bb"
FillColor="#4B8EC4"
IsParallelogram="False"
StrokeThickness="1" />

<ContentPresenter
x:Name="contentPresenter"
Margin="0,0,10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Focusable="False"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="bb" Property="FillColor" Value="#4B8EC4" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="bb" Property="FillColor" Value="#50EB53" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->

<!--#region 平行四边形按钮-->
<Style x:Key="ParallelogramRadioButtonStyle" TargetType="{x:Type RadioButton}">
<Setter Property="FontFamily" Value="楷体" />


+ 1
- 0
BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj View File

@@ -19,6 +19,7 @@

<ItemGroup>
<ProjectReference Include="..\BPASmartClient.CustomResource\BPASmartClient.CustomResource.csproj" />
<ProjectReference Include="..\BPASmartClient.JXJFoodBigStation\BPASmartClient.JXJFoodBigStation.csproj" />
<ProjectReference Include="..\BPASmartClient.Modbus\BPASmartClient.Modbus.csproj" />
<ProjectReference Include="..\BPASmartClient.S7Net\BPASmartClient.S7Net.csproj" />
</ItemGroup>


Loading…
Cancel
Save