Compare commits

...

13 Commits

Author SHA1 Message Date
杨威 dff59c1f27 merge 7 months ago
杨威 5d8ffffd5e 3wer 7 months ago
frankiecao 767a62f5bf 合并 7 months ago
frankiecao 515200dc49 change -修改其他页 7 months ago
杨威 3145e99c99 Merge branch 'refs/heads/yw' into dev_caoql
# Conflicts:
#	SlnMesnac.Extensions/SlnMesnac.Extensions.csproj
#	SlnMesnac.Plc/SlnMesnac.Plc.csproj
#	SlnMesnac.WPF/Page/HomePage.xaml.cs
#	SlnMesnac.WPF/Startup.cs
#	SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs
7 months ago
frankiecao ec949cf073 合并 7 months ago
杨威 8ee11a0bb6 add -添加WPF第二个界面并修改其他界面 7 months ago
杨威 6af83d8423 add -添加WPF首页界面 7 months ago
杨威 eb11da0d96 mege 7 months ago
杨威 1195e020a7 整理代码 7 months ago
杨威 1f65f29d5e demo 7 months ago
杨威 8e8cc26dcc demo 7 months ago
杨威 fd375ce501 mege 7 months ago

@ -7,6 +7,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="NewLife.Core" Version="10.9.2024.402" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>

@ -72,7 +72,7 @@ namespace SlnMesnac.Ioc
{
//自动注入仓储层的接口实现类
var types = assembly.GetTypes()
.Where(t => t.IsClass && !t.IsAbstract && !t.IsGenericType)
.Where(t => t.IsClass && t is { IsAbstract: false, IsGenericType: false })
.ToList();
foreach (var type in types)
@ -125,7 +125,7 @@ namespace SlnMesnac.Ioc
private static void RegisterTypeTransient(ContainerBuilder builder, Assembly assembly)
{
var types = assembly.GetTypes()
.Where(t => t.IsClass && !t.IsAbstract && !t.IsGenericType)
.Where(t => t.IsClass && t is { IsAbstract: false, IsGenericType: false })
.ToList();
foreach (var type in types)

@ -6,6 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HslCommunication" Version="11.8.2" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>
@ -15,10 +16,4 @@
<ProjectReference Include="..\SlnMesnac.Config\SlnMesnac.Config.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="HslCommunication">
<HintPath>..\SlnMesnac.Library\HslCommunication.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

@ -31,32 +31,6 @@ namespace SlnMesnac.Repository.service
public interface IBaseMaterialService : IBaseService<BaseMaterialInfo>
{
/// <summary>
/// 获取所有的物料信息
/// </summary>
/// <returns></returns>
List<BaseMaterialInfo> GetMaterialInfos();
/// <summary>
/// 通过物料编码获取物料信息
/// </summary>
/// <param name="materialCode"></param>
/// <returns></returns>
BaseMaterialInfo GetMaterialInfoByMaterialCode(string materialCode);
/// <summary>
/// 通过SAP物料编码获取物料信息
/// </summary>
/// <param name="sapMaterialCode"></param>
/// <returns></returns>
BaseMaterialInfo GetMaterialInfoBySapMaterialCode(string sapMaterialCode);
/// <summary>
/// 通过物料类别获取物料信息
/// </summary>
/// <param name="majorTypeId">物料大类</param>
/// <param name="minorTypeId">物料细类</param>
/// <returns></returns>
List<BaseMaterialInfo> GetMaterialInfosByMaterialType(int majorTypeId, string minorTypeId);
}
}

@ -40,92 +40,6 @@ namespace SlnMesnac.Repository.service.Impl
_logger = logger;
}
/// <summary>
/// 通过物料编码获取物料信息
/// </summary>
/// <param name="materialCode"></param>
/// <returns></returns>
public BaseMaterialInfo GetMaterialInfoByMaterialCode(string materialCode)
{
BaseMaterialInfo materialInfo = null;
try
{
materialInfo = base._rep.GetFirst(x => x.MaterialCode == materialCode);
}
catch (Exception ex)
{
_logger.LogError($"根据物料编号获取物料信息异常:{ex.Message}");
}
return materialInfo;
}
/// <summary>
/// 通过SAP物料编码获取物料信息
/// </summary>
/// <param name="sapMaterialCode"></param>
/// <returns></returns>
public BaseMaterialInfo GetMaterialInfoBySapMaterialCode(string sapMaterialCode)
{
BaseMaterialInfo materialInfo = null;
try
{
materialInfo = base._rep.GetFirst(x => x.SAPMaterialCode == sapMaterialCode);
}
catch (Exception ex)
{
_logger.LogError($"根据SAP物料编号获取物料信息异常:{ex.Message}");
}
return materialInfo;
}
/// <summary>
/// 获取所有的物料信息
/// </summary>
/// <returns></returns>
public List<BaseMaterialInfo> GetMaterialInfos()
{
List<BaseMaterialInfo> materialInfos = null;
try
{
materialInfos = base._rep.GetList();
}
catch (Exception ex)
{
_logger.LogError($"获取物料信息异常:{ex.Message}");
}
return materialInfos;
}
/// <summary>
/// 通过物料类别获取物料信息
/// </summary>
/// <param name="majorTypeId">物料大类</param>
/// <param name="minorTypeId">物料细类</param>
/// <returns></returns>
public List<BaseMaterialInfo> GetMaterialInfosByMaterialType(int majorTypeId, string minorTypeId)
{
List<BaseMaterialInfo> materialInfos = null;
try
{
Expression<Func<BaseMaterialInfo, bool>> exp = x => true;
if (majorTypeId != 0)
{
exp = exp.And(x => x.MajorTypeID == majorTypeId);
}
else if (!string.IsNullOrEmpty(minorTypeId))
{
exp = exp.And(x => x.MinorTypeID == minorTypeId);
}
materialInfos = base._rep.GetList(exp);
}
catch (Exception ex)
{
_logger.LogError($"通过物料类型获取物料信息异常:{ex.Message}");
}
return materialInfos;
}
}
}

@ -42,7 +42,7 @@ namespace SlnMesnac.Serilog
#region 通过配置文件读取日志存放位置
var appConfig = app.ApplicationServices.GetService<AppConfig>();
var logPath = $"{appConfig.logPath}/Logs/{DateTime.UtcNow:yyyy-MM-dd}/";
var logPath = $"Logs/{DateTime.UtcNow:yyyy-MM-dd}/";
#endregion
Log.Logger = new LoggerConfiguration().MinimumLevel.Information().WriteTo.Console()

@ -1,11 +1,13 @@
<Window x:Class="SlnMesnac.WPF.MainWindow"
<Window
x:Class="SlnMesnac.WPF.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SlnMesnac.WPF"
xmlns:local="clr-namespace:SlnMesnac.WPF" xmlns:viewmodel="clr-namespace:SlnMesnac.WPF.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
mc:Ignorable="d"
Title="MainWindow" Height="1080" Width="1920"
Title="MainWindow" Height="950" Width="1620"
WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" Topmost="False">
<Window.Background>
<ImageBrush ImageSource="/Templates/image/background.jpg" />
@ -13,256 +15,158 @@
<Border Margin="5" Background="Transparent" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="7*"/>
<RowDefinition Height="0.7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<!--<Grid.ColumnDefinitions>
<ColumnDefinition Width="8.6*"/>
<ColumnDefinition Width="1.4*"/>
</Grid.ColumnDefinitions>-->
<Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="生产控制系统" FontSize="50" Foreground="White" FontWeight="Bold"/>
</StackPanel>
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="白班" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/>
<TextBlock Grid.Column="1" Text="|" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/>
<TextBlock Grid.Column="2" Text="SCADA" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,10,0"/>
</Grid>
</StackPanel>
</Grid>
<Border Grid.Column="1">
<TextBlock TextWrapping="Wrap" Text="RFID合层及裁切设备" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="40" Margin="16"/>
</Border>
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,25,2,2">
<ContentControl Content="{Binding UserContent}"/>
</Border>
<Border Grid.Row="2" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5" Background="Transparent" Margin="6,2,6,7">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<Border Grid.Column="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
<Button Content="首 页" x:Name="Index" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="10,0,10,0"/>
<Button Content="代码生成" x:Name="Generate" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Generate}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="键 盘" Command="{Binding OpenSystemKeyboardCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
<!--多行状态显示-->
<!--<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="0,0,0,0" VerticalAlignment="Center">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1">
<TextBlock Text="连接状态" FontSize="15" Foreground="Black" Margin="2,0,10,0"/>
</StackPanel>
<StackPanel Grid.Column="0">
<Ellipse Width="20" Height="20">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding PresentColor}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</StackPanel>
<Border Grid.Column="0">
<Label Content="yyyy-MM-dd-HH-mm" FontSize="21" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,8"/>
<StackPanel Grid.Row="1" Margin="0,10,0,0" VerticalAlignment="Center">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1">
<TextBlock Text="连接状态" FontSize="15" Foreground="Black" Margin="2,0,10,0"/>
</StackPanel>
<StackPanel Grid.Column="0">
<Ellipse Width="20" Height="20">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding PresentColor}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
</Grid>
</StackPanel>
</Border>
<Border Grid.Column="1">
<dx:SimpleButton Content="时间设置" FontSize="26" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" Height="60" Width="160" Margin="0,0,0,8" CornerRadius="6">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF004DF4" Offset="1"/>
<GradientStop Color="#FF62C6FF" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
</Grid>
</StackPanel>
</Grid>-->
<!--单行状态显示-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Ellipse Width="30" Height="30">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding ShellScannerStatus}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding ShellScannerStatus}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding ShellScannerStatus}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="箱壳扫码器" FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
</StackPanel>
</Border>
</Grid>
</StackPanel>
</Border>
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="10">
<StackPanel Grid.Column="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="8.6*"/>
<ColumnDefinition Width="1.4*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Ellipse Width="30" Height="30">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding BoldScannerStatus}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding BoldScannerStatus}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding BoldScannerStatus}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="内胆扫码器" FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
</StackPanel>
</Grid>
</StackPanel>
<StackPanel Grid.Column="2">
<Border Grid.Column="0" BorderBrush="#FF1655B4" BorderThickness="3" CornerRadius="8">
<ContentControl Content="{Binding UserContent}"/>
</Border>
<Border Grid.Column="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Ellipse Width="30" Height="30">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding PlcStatus}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding PlcStatus}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding PlcStatus}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="PLC状态" FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
</StackPanel>
</Grid>
</StackPanel>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<dx:SimpleButton Content="主画面" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF002C6E" Offset="1"/>
<GradientStop Color="#FF1655B4" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="1">
<dx:SimpleButton Content="层合手动画面" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF002C6E" Offset="1"/>
<GradientStop Color="#FF1655B4" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="2">
<dx:SimpleButton Content="裁切手动画面" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF002C6E" Offset="1"/>
<GradientStop Color="#FF1655B4" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="3">
<dx:SimpleButton Content="数据记录" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF002C6E" Offset="1"/>
<GradientStop Color="#FF1655B4" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="4">
<dx:SimpleButton Content="参数画面" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF002C6E" Offset="1"/>
<GradientStop Color="#FF1655B4" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="5">
<dx:SimpleButton Content="报警记录" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF002C6E" Offset="1"/>
<GradientStop Color="#FF1655B4" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="6">
<dx:SimpleButton Content="设备内照明" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0AA397" Offset="1"/>
<GradientStop Color="#FF8AE6E0" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="7">
<dx:SimpleButton Content="消音" FontSize="26" Foreground="White" VerticalAlignment="Center" Height="80" Width="180" CornerRadius="8" Margin="15,0,0,0">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
</Grid>
</StackPanel>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Window>

@ -0,0 +1,374 @@
<UserControl x:Class="SlnMesnac.WPF.Page.HomePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="20"/>
</Style>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>-->
<!--<Setter Property="Background" Value="#dddddd"/>
<Setter Property="Foreground" Value="Black"/>-->
<!--<Setter Property="BorderThickness" Value="1" />-->
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<!--<Setter Property="Foreground" Value="#dddddd"/>-->
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1.2*"/>
<RowDefinition/>
<RowDefinition Height="1.6*"/>
</Grid.RowDefinitions>
<Border x:Name="上部" Grid.Row="0" Margin="4" BorderBrush="#C0C0C0" BorderThickness="2" CornerRadius="6">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="0.6*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border x:Name="层合总数" Grid.Column="0" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="层合总数" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="裁切总数" Grid.Column="1" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="裁切总数" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="一号收料卷" Grid.Column="2" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="一号收料卷" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="二号收料卷" Grid.Column="3" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="二号收料卷" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="一号刀温" Grid.Column="4" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="一号刀温" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="二号刀温" Grid.Column="5" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="二号刀温" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="层合节拍" Grid.Column="6" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="层合节拍" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="裁切节拍" Grid.Column="7" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="裁切节拍" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Row="1">
<!--<Label Content="Label" FontSize="20" VerticalAlignment="Center" />-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<TextBlock Text="设备状态" FontSize="21" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Grid.Column="1">
<dxe:TextEdit Margin="6" CornerRadius="8"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border x:Name="中部" Grid.Row="1" Margin="4" BorderBrush="#C0C0C0" BorderThickness="2" CornerRadius="6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<dx:SimpleButton Content="登 录" Width="300" Height="120" FontSize="26" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" CornerRadius="8">
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF002C6E" Offset="1"/>
<GradientStop Color="#FF1655B4" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Column="1">
<TextBlock TextWrapping="Wrap" Text="用户等级" FontSize="26" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Grid.Column="2">
<dxe:TextEdit Margin="3,50,3,50" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<dx:SimpleButton Content="裁切刀1工位" FontSize="26" Height="66" Width="240" VerticalAlignment="Center" CornerRadius="6">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0AA397" Offset="1"/>
<GradientStop Color="#FF8AE6E0" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="1">
<dx:SimpleButton Content="裁切刀2工位" FontSize="26" Height="66" Width="240" VerticalAlignment="Center" CornerRadius="6">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0AA397" Offset="1"/>
<GradientStop Color="#FF8AE6E0" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border x:Name="下部" Grid.Row="2" Margin="4" BorderBrush="#C0C0C0" BorderThickness="2" CornerRadius="6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2.6*"/>
<ColumnDefinition/>
<ColumnDefinition Width="2.6*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.8*"/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock TextWrapping="Wrap" Text="合层工位" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="26"/>
</Border>
<Border Grid.Row="1">
<dx:SimpleButton Content="启 动" FontSize="26" Foreground="White" Height="100" Width="320" VerticalAlignment="Center" CornerRadius="8">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="2">
<dx:SimpleButton Content="回 零" FontSize="26" Foreground="White" Height="100" Width="320" VerticalAlignment="Center" CornerRadius="8">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
</Grid>
</Border>
<Border Grid.Column="1">
<dx:SimpleButton Content="脱 机" FontSize="26" Foreground="White" Height="220" Width="220" CornerRadius="110" Margin="0,40,0,0">
<dx:SimpleButton.Background>
<RadialGradientBrush>
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</RadialGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Column="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.8*"/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock TextWrapping="Wrap" Text="裁切工位" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="26"/>
</Border>
<Border Grid.Row="1">
<dx:SimpleButton Content="启 动" FontSize="26" Foreground="White" Height="100" Width="320" VerticalAlignment="Center" CornerRadius="8">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
<Border Grid.Row="2">
<dx:SimpleButton Content="回 零" FontSize="26" Foreground="White" Height="100" Width="320" VerticalAlignment="Center" CornerRadius="8">
<dx:SimpleButton.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</dx:SimpleButton.Background>
</dx:SimpleButton>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</UserControl>

@ -0,0 +1,415 @@
<UserControl x:Class="SlnMesnac.WPF.Page.LaminatePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1.2*"/>
<RowDefinition Height="2.6*"/>
</Grid.RowDefinitions>
<Border x:Name="上部" Grid.Row="0" Margin="4" BorderBrush="#C0C0C0" BorderThickness="2" CornerRadius="6">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="0.6*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border x:Name="层合总数" Grid.Column="0" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="层合总数" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="裁切总数" Grid.Column="1" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="裁切总数" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="一号收料卷" Grid.Column="2" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="一号收料卷" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="二号收料卷" Grid.Column="3" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="二号收料卷" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="一号刀温" Grid.Column="4" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="一号刀温" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="二号刀温" Grid.Column="5" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="二号刀温" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="层合节拍" Grid.Column="6" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="层合节拍" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
<Border x:Name="裁切节拍" Grid.Column="7" Margin="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.9*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="裁切节拍" FontSize="21" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1">
<dxe:TextEdit Margin="3" CornerRadius="6"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Row="1">
<!--<Label Content="Label" FontSize="20" VerticalAlignment="Center" />-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<TextBlock Text="设备状态" FontSize="21" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Border Grid.Column="1">
<dxe:TextEdit Margin="6" CornerRadius="8"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border x:Name="下部" Grid.Row="1" Margin="4" BorderBrush="#c0c0c0" BorderThickness="2" CornerRadius="6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0">
<TextBlock Text="取料气缸1" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="0" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="0" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="吸料气缸1" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="取料气缸2" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="2" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="3" Grid.Column="0">
<TextBlock Text="吸料气缸2" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="3" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="3" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="4" Grid.Column="0">
<TextBlock Text="旋转电机" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="4" Grid.Column="1">
<Button Content="正转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="4" Grid.Column="2">
<Button Content="反转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="5" Grid.Column="0">
<TextBlock Text="层合电机" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="5" Grid.Column="1">
<Button Content="正转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="5" Grid.Column="2">
<Button Content="反转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
</Grid>
</Border>
<Border Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0">
<TextBlock Text="供料电机" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="0" Grid.Column="1">
<Button Content="正转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="0" Grid.Column="2">
<Button Content="反转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="上胶辊气缸" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="1">
<Button Content="前进" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="2">
<Button Content="回收" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="下胶辊气缸" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="2" Grid.Column="1">
<Button Content="前进" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="2">
<Button Content="回收" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</UserControl>

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SlnMesnac.WPF.Page
{
/// <summary>
/// LaminatePage.xaml 的交互逻辑
/// </summary>
public partial class LaminatePage : UserControl
{
public LaminatePage()
{
InitializeComponent();
}
}
}

@ -0,0 +1 @@
DevExpress.Xpf.Editors.TextEdit, DevExpress.Xpf.Core.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

@ -7,9 +7,15 @@
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<Compile Remove="ViewModel\Generate\**" />
<EmbeddedResource Remove="ViewModel\Generate\**" />
<None Remove="ViewModel\Generate\**" />
<Page Remove="ViewModel\Generate\**" />
</ItemGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="Templates\image\background.jpg" />
</ItemGroup>
<ItemGroup>
@ -18,6 +24,11 @@
</Content>
</ItemGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="Templates\image\background.jpg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SlnMesnac.Business\SlnMesnac.Business.csproj" />
<ProjectReference Include="..\SlnMesnac.Common\SlnMesnac.Common.csproj" />
@ -32,6 +43,7 @@
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="devexpress.wpf.core" Version="22.1.5" />
<PackageReference Include="Lierda.WPFHelper" Version="1.0.3" />
<PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
<PackageReference Include="NVelocity" Version="1.2.0" />
@ -39,7 +51,9 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Templates\image\background.jpg" />
<Resource Include="Templates\image\background.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<ItemGroup>

@ -39,9 +39,15 @@ namespace SlnMesnac.WPF
//注册ORM
services.AddSqlSugarSetup();
if (!HslCommunication.Authorization.SetAuthorizationCode("b980977c-3323-4876-b633-c0bef93d75c1"))
{
Console.WriteLine( "active failed" );
Console.ReadLine( );
}
//注册PLC工厂
services.AddPlcFactorySetup();
services.AddHttpClient();
}
/// <summary>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 1.7 MiB

@ -131,7 +131,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Name="bdr" CornerRadius="3" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
<Border Name="bdr" CornerRadius="4" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
<!--可使用ContentPresenter代替-->
<!--Foreground的值White可以替换为{TemplateBinding Foreground}-->
<Label VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Foreground="White" Content="{TemplateBinding Content}"/>

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SlnMesnac.WPF.ViewModel
{
public class HomePageViewModel
{
public System.Windows.Controls.UserControl _content;
public System.Windows.Controls.UserControl UserContent
{
get { return _content; }
set
{
_content = value;
//RaisePropertyChanged(nameof(UserContent));
}
}
}
}

@ -3,6 +3,8 @@ using GalaSoft.MvvmLight.Command;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using SlnMesnac.WPF.Page;
using System;
using System.Windows;
@ -12,6 +14,8 @@ namespace SlnMesnac.WPF.ViewModel
{
private readonly ILogger<MainWindowViewModel> _logger;
private HomePage homePage = new HomePage();
private LaminatePage laminatePage = new LaminatePage();
#region 参数定义
@ -77,7 +81,8 @@ namespace SlnMesnac.WPF.ViewModel
public MainWindowViewModel()
{
//UserContent = homePage;
UserContent = laminatePage;
_logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>();
ControlOnClickCommand = new RelayCommand<object>(obj => ControlOnClick(obj));

@ -8,7 +8,6 @@
},
"AllowedHosts": "*",
"AppConfig": {
"logPath": "E:\\桌面\\SlnMesnac\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows",
"SqlConfig": [
{
"configId": "mes",
@ -38,23 +37,7 @@
"plcKey": "cwss",
"isFlage": true
}
],
"RfidConfig": [
{
"configId": 1,
"equipIp": "127.0.0.1",
"equipPort": 6003,
"equipKey": "test1",
"isFlage": true
},
{
"configId": 2,
"equipIp": "127.0.0.1",
"equipPort": 6004,
"equipKey": "test2",
"isFlage": true
}
],
"redisConfig": "175.27.215.92:6379,password=redis@2023"
]
}
}

Loading…
Cancel
Save