添加项目文件。
parent
23638c5a0a
commit
6b425df31d
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Plc\SlnMesnac.Plc.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Rfid\SlnMesnac.Rfid.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,13 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ${NameSpace}.service
|
||||
{
|
||||
public interface I${tableName}Services: IBaseService<${tableName}>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ${NameSpace}.service.Impl
|
||||
{
|
||||
public class ${tableName}ServiceImpl : BaseServiceImpl<${tableName}>, I${tableName}Service
|
||||
{
|
||||
public ${tableName}ServiceImpl(Repository<${tableName}> repository):base(repository)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.134" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="MQTTnet" Version="4.3.3.952" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Serilog\SlnMesnac.Serilog.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HslCommunication" Version="11.8.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Common\SlnMesnac.Common.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Config\SlnMesnac.Config.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Quartz.AspNetCore" Version="3.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Serilog\SlnMesnac.Serilog.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Common\SlnMesnac.Common.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Config\SlnMesnac.Config.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Model\SlnMesnac.Model.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Serilog\SlnMesnac.Serilog.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Common\SlnMesnac.Common.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Model\SlnMesnac.Model.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.TouchSocket\SlnMesnac.TouchSocket.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Serilog" Version="3.1.1" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Config\SlnMesnac.Config.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="TouchSocket" Version="2.0.17" />
|
||||
<PackageReference Include="TouchSocket.WebApi" Version="2.0.17" />
|
||||
<PackageReference Include="TouchSocket.WebApi.Swagger" Version="2.0.17" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Serilog\SlnMesnac.Serilog.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,36 @@
|
||||
<Application x:Class="SlnMesnac.WPF.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:SlnMesnac.WPF">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.LightBlue.xaml" />
|
||||
|
||||
<!--<ResourceDictionary Source="Templates\Languages\StringResource.en-US.xaml" />
|
||||
<ResourceDictionary Source="Templates\Languages\StringResource.zh-CN.xaml" />-->
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<!--重写框架主体色-->
|
||||
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#3b76ee" />
|
||||
|
||||
<!-- DataGrid列标题居中样式 -->
|
||||
<Style x:Key="DataGridColumnHeaderStyle" TargetType="DataGridColumnHeader">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!-- DataGrid单元格居中样式 -->
|
||||
<Style x:Key="DataGridCellCenterStyle" TargetType="DataGridCell">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
@ -0,0 +1,10 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
@ -0,0 +1,268 @@
|
||||
<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"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="1080" Width="1920"
|
||||
WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" Topmost="False">
|
||||
<Window.Background>
|
||||
<ImageBrush ImageSource="/Templates/image/background.jpg" />
|
||||
</Window.Background>
|
||||
|
||||
<Border Margin="5" Background="Transparent" CornerRadius="10">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
|
||||
</Border.Effect>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="0.7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<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>
|
||||
<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>
|
||||
<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 MaterialDesignFlatMidBgButton}" 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 MaterialDesignFlatMidBgButton}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
|
||||
<Button Content="键 盘" Command="{Binding OpenSystemKeyboardCommand}" Style="{StaticResource MaterialDesignFlatMidBgButton}" 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 MaterialDesignFlatMidBgButton}" 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 MaterialDesignFlatMidBgButton}" 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="*"/>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel 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 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">
|
||||
<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>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Window>
|
@ -0,0 +1,56 @@
|
||||
<UserControl x:Class="SlnMesnac.WPF.Page.Generate.GenerateControl"
|
||||
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.Generate"
|
||||
xmlns:local1="clr-namespace:SlnMesnac.WPF.Converter.Generate"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800" Background="Transparent">
|
||||
<Control.Resources>
|
||||
<local1:RowToIndexConverter x:Key="RowToIndexConverter" />
|
||||
</Control.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="Green" BorderThickness="2" CornerRadius="5" Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
|
||||
<TextBlock Text="数据库连接:" FontSize="20" Foreground="White" VerticalAlignment="Center" Margin="10,0,10,0"/>
|
||||
<ComboBox Width="200" Height="35" FontSize="18" VerticalAlignment="Center" Name="comboBox1" ItemsSource="{Binding Options}" SelectedItem="{Binding SelectedOption, Mode=TwoWay}" DisplayMemberPath="."/>
|
||||
|
||||
<TextBlock Text="表名:" FontSize="20" Foreground="White" VerticalAlignment="Center" Margin="30,0,10,0"/>
|
||||
<TextBox x:Name="queryParam" Foreground="White" FontSize="18" Width="200" Height="35"/>
|
||||
|
||||
<Button Content="查 询" FontSize="16" Width="120" Height="35" Background="#007DFA" BorderBrush="#007DFA" Margin="20,0,10,0" Command="{Binding QuerySearchCommand}" CommandParameter="{Binding Text, ElementName=queryParam}" />
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" BorderBrush="Green" BorderThickness="2" CornerRadius="5" Margin="0,0,0,10">
|
||||
<DataGrid x:Name="datagrid" Grid.Row="0" ItemsSource="{Binding TablesDataGrid}" Background="Transparent"
|
||||
FontSize="15" ColumnHeaderHeight="35"
|
||||
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"
|
||||
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False" HorizontalAlignment="Center"
|
||||
Foreground="#FFFFFF" >
|
||||
<!--resourceStyle 399行修改选中字体颜色-->
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding Name}" Header="表名" Width="3*" IsReadOnly="True"/>
|
||||
<DataGridTextColumn Binding="{Binding Description}" Header="说明" Width="3*" IsReadOnly="True"/>
|
||||
<DataGridTemplateColumn Header="操作" Width="2*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="生成代码" CommandParameter="{Binding Name}" Background="#009999" Foreground="White" Margin="10,0,0,0" Height="25" BorderBrush="#009999" BorderThickness="0" Width="100" Command="{Binding DataContext.CreateCodeCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid }}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
@ -0,0 +1,19 @@
|
||||
<Window x:Class="SlnMesnac.WPF.Page.Loading.LoadingWindow"
|
||||
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.Page.Loading"
|
||||
xmlns:gif="http://wpfanimatedgif.codeplex.com"
|
||||
mc:Ignorable="d"
|
||||
Height="200" Width="400"
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
Topmost="True"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
Opacity="0.8">
|
||||
<Grid>
|
||||
<Image gif:ImageBehavior.AnimatedSource="pack://application:,,,/Templates/gif/loading.gif" Height="180"/>
|
||||
</Grid>
|
||||
</Window>
|
@ -0,0 +1,58 @@
|
||||
<Window x:Class="SlnMesnac.WPF.Page.Login.LoginWindow"
|
||||
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.Page.Login"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
Title="{Binding SystemTitle}" Height="600" Width="980">
|
||||
<Window.Background>
|
||||
<ImageBrush ImageSource="/Templates/image/login-background.jpg" />
|
||||
</Window.Background>
|
||||
<Grid>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" Background="Transparent" Height="50" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="50,50">
|
||||
<Label Content="{Binding SystemTitle}" Foreground="#007DFA" FontSize="25"/>
|
||||
</StackPanel>
|
||||
<Border Grid.Column="1" Background="White" Height="300" CornerRadius="10" >
|
||||
<Grid Cursor="">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Foreground="Gray" Text="用户登录" FontSize="20"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<!--<TextBlock Foreground="Gray" Text="账号:" FontSize="16" Margin="0,10,10,0"/>
|
||||
<TextBox x:Name="UserNameStr" Foreground="Gray" FontSize="16" Width="150" Height="35"/>-->
|
||||
<materialDesign:PackIcon Kind="AccountKeyOutline" VerticalAlignment="Bottom" Height="25" Width="25" Margin="0,0,10,0"/>
|
||||
<TextBox x:Name="UserNameStr" Width="150" FontSize="16" VerticalAlignment="Center" materialDesign:HintAssist.Hint="请输入用户名" Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<!--<TextBlock Foreground="Gray" Text="密码:" FontSize="16" Margin="0,10,10,0"/>-->
|
||||
<!--<PasswordBox x:Name="PasswordStr" HorizontalAlignment="Left" VerticalContentAlignment="Center" Width="150" PasswordChar="*" />-->
|
||||
<materialDesign:PackIcon Kind="AccountLockOutline" VerticalAlignment="Bottom" Height="25" Width="25" Margin="0,0,10,0"/>
|
||||
<PasswordBox
|
||||
x:Name="PasswordStr" Width="150" FontSize="16"
|
||||
materialDesign:HintAssist.Foreground="Green"
|
||||
materialDesign:HintAssist.Hint="请输入密码"
|
||||
materialDesign:TextFieldAssist.UnderlineBrush="Green"
|
||||
Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" Cursor="Hand" />
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="3">
|
||||
<Button x:Name="LoginBtn" Content="登录" Background="#007DFA" ToolTip="MaterialDesignFlatMidButton" Margin="10,0,10,0" Style="{StaticResource MaterialDesignFlatMidBgButton}" Foreground="White" FontSize="16" Width="150" Height="30" Click="LoginBtn_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
Binary file not shown.
After Width: | Height: | Size: 370 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
@ -0,0 +1,424 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:SlnMesnac.WPF">
|
||||
<Style x:Key="Window" TargetType="Window">
|
||||
<Setter Property="WindowStyle" Value="None"/>
|
||||
<Setter Property="AllowsTransparency" Value="True"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style x:Key="BUTTON_MENUBAR" TargetType="Button">
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||||
<Grid Name="g" Opacity="0" Background="LightGray"/>
|
||||
<Grid Name="grd" RenderTransformOrigin="0.5,0.5" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" VerticalAlignment="Center" HorizontalAlignment="Center" >
|
||||
<Grid.RenderTransform>
|
||||
<TransformGroup>
|
||||
<!--<RotateTransform x:Name="rotate" Angle="0"-->
|
||||
<ScaleTransform x:Name="scale" ScaleX="0.8" ScaleY="0.8"/>
|
||||
</TransformGroup>
|
||||
</Grid.RenderTransform>
|
||||
</Grid>
|
||||
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0.2" Duration="0:0:0.2" Storyboard.TargetName="g" Storyboard.TargetProperty="Opacity" />
|
||||
<DoubleAnimation To="1" Duration="0:0:0.2" Storyboard.TargetName="scale" Storyboard.TargetProperty="ScaleX" />
|
||||
<DoubleAnimation To="1" Duration="0:0:0.2" Storyboard.TargetName="scale" Storyboard.TargetProperty="ScaleY" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0" Duration="0:0:0.2" Storyboard.TargetName="g" Storyboard.TargetProperty="Opacity" />
|
||||
<DoubleAnimation To="0.8" Duration="0:0:0.2" Storyboard.TargetName="scale" Storyboard.TargetProperty="ScaleX" />
|
||||
<DoubleAnimation To="0.8" Duration="0:0:0.2" Storyboard.TargetName="scale" Storyboard.TargetProperty="ScaleY" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="BUTTON_MENUBAR_PATH" TargetType="Button">
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Foreground" Value="Gray" />
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||||
<Grid Name="g" Background="LightGray" Opacity="0" />
|
||||
<Grid Name="grd" Width="22" Height="22" Background="{TemplateBinding Background}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Path Width="10" Height="30" HorizontalAlignment="Right" VerticalAlignment="Center" Data="M3,10 L7,15 L3,20" Stroke="Gray" StrokeThickness="1"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0.4" Duration="0:0:0.2" Storyboard.TargetName="g" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="g" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="BUTTON_MENUBAR_MINI" TargetType="Button">
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" ClipToBounds="True">
|
||||
<Border Name="bdr" BorderBrush="LightGray" BorderThickness="2" Opacity="0">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect x:Name="effect" BlurRadius="20" Opacity="0.8" ShadowDepth="0" Color="LightGray"/>
|
||||
</Border.Effect>
|
||||
</Border>
|
||||
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" VerticalAlignment="Center" HorizontalAlignment="Center" >
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="1" Duration="0:0:0.3" Storyboard.TargetName="bdr" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0" Duration="0:0:0.3" Storyboard.TargetName="bdr" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BUTTON_AGREE" TargetType="{x:Type Button}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Name="bdr" CornerRadius="3" 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}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0.6" Duration="0:0:0.2" Storyboard.TargetName="bdr" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="1" Duration="0:0:0.2" Storyboard.TargetName="bdr" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="BUTTON_DISAGREE" TargetType="{x:Type Button}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border CornerRadius="3" BorderBrush="#FFEBEBEB" BorderThickness="1">
|
||||
<Grid>
|
||||
<Border Name="bdr" CornerRadius="3" Background="Gray" Opacity="0"/>
|
||||
<Label VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0.2" Duration="0:0:0.2" Storyboard.TargetName="bdr" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0" Duration="0:0:0.2" Storyboard.TargetName="bdr" Storyboard.TargetProperty="Opacity" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="SOLIDCOLORBRUSH_LIGHT" Color="#FF6FD1FF"/>
|
||||
<Color x:Key="COLOR_LIGHT" R="111" G="209" B="255" A="255" />
|
||||
|
||||
|
||||
<Style x:Key="BUTTON_ELLIPSE" TargetType="{x:Type Button}">
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="ToolTip" Value="下一步"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border CornerRadius="15" Width="30" Height="30" Background="{DynamicResource SOLIDCOLORBRUSH_LIGHT}">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect x:Name="effect" BlurRadius="7" Opacity="0.6" ShadowDepth="0" Color="{DynamicResource COLOR_LIGHT}"/>
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Path Name="path" HorizontalAlignment="Left" Margin="0,0,0,0" Data="M5,15 L 15,23 L24,9" Stroke="White" StrokeThickness="1"/>
|
||||
<Path Name="path2" HorizontalAlignment="Left" Opacity="0" Margin="0,0,0,0" Data="M5,15 H25 L17,7 M25,15 L17,22 " Stroke="White" StrokeThickness="1"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation To="0.9" Duration="0:0:0.3" Storyboard.TargetName="effect" Storyboard.TargetProperty="Opacity" />
|
||||
<DoubleAnimation To="15" Duration="0:0:0.3" Storyboard.TargetName="effect" Storyboard.TargetProperty="BlurRadius" />
|
||||
<DoubleAnimation To="0" Duration="0:0:0.5" Storyboard.TargetName="path" Storyboard.TargetProperty="Opacity" />
|
||||
<DoubleAnimation To="1" Duration="0:0:0.5" BeginTime="0:0:0.3" Storyboard.TargetName="path2" Storyboard.TargetProperty="Opacity" />
|
||||
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard >
|
||||
<Storyboard>
|
||||
<DoubleAnimation Duration="0:0:0.3" Storyboard.TargetName="effect" Storyboard.TargetProperty="Opacity" />
|
||||
<DoubleAnimation Duration="0:0:0.3" Storyboard.TargetName="effect" Storyboard.TargetProperty="BlurRadius" />
|
||||
<DoubleAnimation Duration="0:0:0.5" BeginTime="0:0:0.3" Storyboard.TargetName="path" Storyboard.TargetProperty="Opacity" />
|
||||
<DoubleAnimation Duration="0:0:0.5" Storyboard.TargetName="path2" Storyboard.TargetProperty="Opacity" />
|
||||
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
</Style>
|
||||
|
||||
|
||||
<!--DataGrid样式-->
|
||||
<Style TargetType="{x:Type DataGrid}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderBrush" Value="#FF688CAF"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="AutoGenerateColumns" Value="False"/>
|
||||
<Setter Property="ColumnHeaderHeight" Value="50"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="RowHeight" Value="50"/>
|
||||
<Setter Property="AlternationCount" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGrid}">
|
||||
<Grid>
|
||||
<Border Background="Transparent" CornerRadius="0">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFDADADA"/>
|
||||
</Border.Effect>
|
||||
</Border>
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="DG_ScrollViewer" Focusable="false">
|
||||
<ScrollViewer.Template>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="Transparent" Grid.Column="1">
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="270" Color="#FFF3F3F3"/>
|
||||
</Grid.Effect>
|
||||
</Grid>
|
||||
<Button Command="{x:Static DataGrid.SelectAllCommand}" Focusable="false" Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
<DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" Grid.ColumnSpan="2" Grid.Row="1"/>
|
||||
|
||||
<ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
|
||||
<Grid Grid.Column="1" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ScrollViewer.Template>
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsGrouping" Value="true"/>
|
||||
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
||||
</MultiTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridColumnHeader">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<!--<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>-->
|
||||
<ContentPresenter Margin="20 0 0 0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
<!--<TextBlock Grid.Column="1" x:Name="SortArrow" Visibility="Visible" VerticalAlignment="Center" FontFamily="/DataGrid;component/Fonts/#FontAwesome"/>-->
|
||||
</Grid>
|
||||
<!--<ControlTemplate.Triggers>
|
||||
<Trigger Property="SortDirection" Value="Ascending">
|
||||
<Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="SortArrow" Property="Text" Value="" />
|
||||
</Trigger>
|
||||
<Trigger Property="SortDirection" Value="Descending">
|
||||
<Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="SortArrow" Property="Text" Value="" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>-->
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Template" >
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridRow">
|
||||
<Grid >
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" BorderThickness="1" BorderBrush="Transparent"/>
|
||||
<DataGridCellsPresenter />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#00BCD4"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#00BCD4"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ItemsControl.AlternationIndex"
|
||||
Value="0">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Trigger>
|
||||
<Trigger Property="ItemsControl.AlternationIndex"
|
||||
Value="1">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridCell">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Foreground" Value="Gray" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--TextBox样式-->
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Border BorderThickness="1" Width="auto" Height="auto" BorderBrush="CadetBlue">
|
||||
<Grid x:Name="grid" Background="Transparent">
|
||||
<ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
<!--RadioButton样式-->
|
||||
|
||||
</ResourceDictionary>
|
@ -0,0 +1,60 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"AppConfig": {
|
||||
"logPath": "E:\\桌面\\SlnMesnac\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows",
|
||||
"SqlConfig": [
|
||||
{
|
||||
"configId": "mes",
|
||||
"dbType": 1,
|
||||
"connStr": "server=.;uid=sa;pwd=123456;database=JiangYinMENS"
|
||||
},
|
||||
{
|
||||
"configId": "mcs",
|
||||
"dbType": 3,
|
||||
"connStr": "Data Source=175.27.215.92/helowin;User ID=aucma_scada;Password=aucma"
|
||||
}
|
||||
],
|
||||
"PlcConfig": [
|
||||
{
|
||||
"configId": 1,
|
||||
"plcType": "MelsecBinaryPlc",
|
||||
"plcIp": "127.0.0.1",
|
||||
"plcPort": 6000,
|
||||
"plcKey": "mcs",
|
||||
"isFlage": true
|
||||
},
|
||||
{
|
||||
"configId": 2,
|
||||
"plcType": "MelsecBinaryPlc",
|
||||
"plcIp": "127.0.0.1",
|
||||
"plcPort": 6001,
|
||||
"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…
Reference in New Issue