@@ -4,7 +4,7 @@ using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
namespace BPASmart.Model.用户 | |||||
namespace BPASmart.Model | |||||
{ | { | ||||
public enum UserPower | public enum UserPower | ||||
{ | { | ||||
@@ -56,6 +56,7 @@ | |||||
<None Remove="Image\leftImage.png" /> | <None Remove="Image\leftImage.png" /> | ||||
<None Remove="Image\leftImage1.png" /> | <None Remove="Image\leftImage1.png" /> | ||||
<None Remove="Image\leftImageSub.png" /> | <None Remove="Image\leftImageSub.png" /> | ||||
<None Remove="Image\Login.png" /> | |||||
<None Remove="Image\logo\hbl.ico" /> | <None Remove="Image\logo\hbl.ico" /> | ||||
<None Remove="Image\logo\hbl1.ico" /> | <None Remove="Image\logo\hbl1.ico" /> | ||||
<None Remove="Image\logo\logo-pic.png" /> | <None Remove="Image\logo\logo-pic.png" /> | ||||
@@ -296,6 +297,7 @@ | |||||
<Resource Include="Image\Exp.png" /> | <Resource Include="Image\Exp.png" /> | ||||
<Resource Include="Image\leftback.png" /> | <Resource Include="Image\leftback.png" /> | ||||
<Resource Include="Image\leftImage.png" /> | <Resource Include="Image\leftImage.png" /> | ||||
<Resource Include="Image\Login.png" /> | |||||
<Resource Include="Image\textBox.png" /> | <Resource Include="Image\textBox.png" /> | ||||
<Resource Include="Image\WindowImages.png" /> | <Resource Include="Image\WindowImages.png" /> | ||||
<Resource Include="Image\上箭头.png" /> | <Resource Include="Image\上箭头.png" /> | ||||
@@ -116,6 +116,8 @@ namespace BPASmartClient.CustomResource.Pages.Model | |||||
public Visibility SubMenuVisibility { get { return _mSubMenuVisibility; } set { _mSubMenuVisibility = value; OnPropertyChanged(); } } | public Visibility SubMenuVisibility { get { return _mSubMenuVisibility; } set { _mSubMenuVisibility = value; OnPropertyChanged(); } } | ||||
private Visibility _mSubMenuVisibility = Visibility.Collapsed; | private Visibility _mSubMenuVisibility = Visibility.Collapsed; | ||||
} | } | ||||
} | } |
@@ -227,11 +227,14 @@ | |||||
</Window.Resources> | </Window.Resources> | ||||
<Grid> | <Grid> | ||||
<MediaElement | |||||
<Grid.Background> | |||||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/Login.png"/> | |||||
</Grid.Background> | |||||
<!--<MediaElement | |||||
Name="player" | Name="player" | ||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | VerticalAlignment="Center" | ||||
LoadedBehavior="Manual" /> | |||||
LoadedBehavior="Manual" />--> | |||||
<Grid x:Name="grid" Margin="400,180"> | <Grid x:Name="grid" Margin="400,180"> | ||||
<Grid.RowDefinitions> | <Grid.RowDefinitions> | ||||
@@ -27,8 +27,8 @@ namespace BPASmartClient.CustomResource.Pages.View | |||||
public LoginView() | public LoginView() | ||||
{ | { | ||||
InitializeComponent(); | InitializeComponent(); | ||||
grid.Visibility = Visibility.Collapsed; | |||||
//grid.Visibility = Visibility.Collapsed; | |||||
Username.Focus(); | |||||
Username.SelectionStart = Username.Text.Trim().Length; | Username.SelectionStart = Username.Text.Trim().Length; | ||||
this.Loaded += LoginView_Loaded; | this.Loaded += LoginView_Loaded; | ||||
ActionManage.GetInstance.Register(new Action(() => | ActionManage.GetInstance.Register(new Action(() => | ||||
@@ -47,13 +47,13 @@ namespace BPASmartClient.CustomResource.Pages.View | |||||
string path = $"{AppDomain.CurrentDomain.BaseDirectory}Videos\\Login.mp4"; | string path = $"{AppDomain.CurrentDomain.BaseDirectory}Videos\\Login.mp4"; | ||||
if (File.Exists(path)) | if (File.Exists(path)) | ||||
{ | { | ||||
player.Source = new Uri(path); // 绑定视频文件 | |||||
this.WindowState = WindowState.Maximized; | |||||
player.LoadedBehavior = MediaState.Manual; // 交互式控制 | |||||
player.Loaded += new RoutedEventHandler(media_Loaded); // 添加元素加载完成事件 -- 自动开始播放 | |||||
player.MediaEnded += new RoutedEventHandler(media_MediaEnded); // 添加媒体播放结束事件 -- 重新播放 | |||||
player.Unloaded += new RoutedEventHandler(media_Unloaded);// 添加元素卸载完成事件 -- 停止播放 | |||||
player.MediaOpened += Player_MediaOpened;//已播放事件 | |||||
//player.Source = new Uri(path); // 绑定视频文件 | |||||
//this.WindowState = WindowState.Maximized; | |||||
//player.LoadedBehavior = MediaState.Manual; // 交互式控制 | |||||
//player.Loaded += new RoutedEventHandler(media_Loaded); // 添加元素加载完成事件 -- 自动开始播放 | |||||
//player.MediaEnded += new RoutedEventHandler(media_MediaEnded); // 添加媒体播放结束事件 -- 重新播放 | |||||
//player.Unloaded += new RoutedEventHandler(media_Unloaded);// 添加元素卸载完成事件 -- 停止播放 | |||||
//player.MediaOpened += Player_MediaOpened;//已播放事件 | |||||
} | } | ||||
} | } | ||||
@@ -15,6 +15,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
{ | { | ||||
public LoginViewModel() | public LoginViewModel() | ||||
{ | { | ||||
Config.GetInstance.Init(); | |||||
ActionManage.GetInstance.Register(new Action(() => { Login(); }), "EnterLogin", true); | ActionManage.GetInstance.Register(new Action(() => { Login(); }), "EnterLogin", true); | ||||
LoginCommand = new RelayCommand(() => { Login(); }); | LoginCommand = new RelayCommand(() => { Login(); }); | ||||
@@ -22,12 +23,12 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
{ | { | ||||
ActionManage.GetInstance.Send("ExitAction"); | ActionManage.GetInstance.Send("ExitAction"); | ||||
}); | }); | ||||
} | } | ||||
public static void NfcLogin(string cardId) | public static void NfcLogin(string cardId) | ||||
{ | { | ||||
var res = Global.userManager.userInfos.FirstOrDefault(p => p.CardId == cardId); | var res = Global.userManager.userInfos.FirstOrDefault(p => p.CardId == cardId); | ||||
if (res != null) | if (res != null) | ||||
{ | { | ||||
@@ -80,7 +81,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
if (res != null) | if (res != null) | ||||
{ | { | ||||
Global.userInfo = res; | Global.userInfo = res; | ||||
Global.userInfo.LastLogInTime = DateTime.Now.ToString(); | Global.userInfo.LastLogInTime = DateTime.Now.ToString(); | ||||
res.LastLogInTime = DateTime.Now.ToString(); | res.LastLogInTime = DateTime.Now.ToString(); | ||||
Config.GetInstance.SaveUser(); | Config.GetInstance.SaveUser(); | ||||
@@ -107,10 +108,10 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
//分配后的权限 | //分配后的权限 | ||||
if (res.permission == Enums.Permission.管理员) | if (res.permission == Enums.Permission.管理员) | ||||
{ | { | ||||
foreach( var items in MenuManage.GetInstance.menuModels) | |||||
foreach (var items in MenuManage.GetInstance.menuModels) | |||||
{ | { | ||||
items.MainMenuVisibility = Visibility.Visible; | items.MainMenuVisibility = Visibility.Visible; | ||||
foreach(var item in items.subMenumodels) | |||||
foreach (var item in items.subMenumodels) | |||||
{ | { | ||||
item.SubMenuVisibility = Visibility.Visible; | item.SubMenuVisibility = Visibility.Visible; | ||||
} | } | ||||
@@ -134,13 +135,13 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
} | |||||
} | } | ||||
ActionManage.GetInstance.Send("PermissionChange"); | ActionManage.GetInstance.Send("PermissionChange"); | ||||
ActionManage.GetInstance.Send("LoginOk"); | ActionManage.GetInstance.Send("LoginOk"); | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -168,7 +168,7 @@ namespace BPASmartClient.JXJFoodBigStation | |||||
private void DataInit() | private void DataInit() | ||||
{ | { | ||||
Config.GetInstance.Init(); | |||||
//Config.GetInstance.Init(); | |||||
//Json<LocaPar>.Read(); | //Json<LocaPar>.Read(); | ||||
} | } | ||||
@@ -239,7 +239,7 @@ namespace BPASmartClient.JXJFoodSmallStation | |||||
private void DataInit() | private void DataInit() | ||||
{ | { | ||||
Config.GetInstance.Init(); | |||||
//Config.GetInstance.Init(); | |||||
Json<LocaPar>.Read(); | Json<LocaPar>.Read(); | ||||
Json<DevicePar>.Read(); | Json<DevicePar>.Read(); | ||||
} | } | ||||
@@ -0,0 +1,38 @@ | |||||
<Application | |||||
x:Class="BPASmartClient.SmallBatchingSystem.App" | |||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||||
xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource" | |||||
xmlns:local="clr-namespace:BPASmartClient.SmallBatchingSystem"> | |||||
<Application.Resources> | |||||
<ResourceDictionary> | |||||
<ResourceDictionary.MergedDictionaries> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecCheckBox.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecTitleBarButton.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/GlobalStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecComboBox.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecIcoButtonStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecToggleButton.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/BeveledRadioButtonStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/DatePickeerDictionary.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/TextBoxStyle.xaml" /> | |||||
<ResourceDictionary> | |||||
<con:ColorConverter x:Key="ColorConverter" /> | |||||
<con:TextConverter x:Key="TextConverter" /> | |||||
<con:VisibleTypeConverter x:Key="VisibleTypeConverter" /> | |||||
<con:StatusConverter x:Key="StatusConverter" /> | |||||
<con:StringToIconConverter x:Key="StringToIconConverter" /> | |||||
</ResourceDictionary> | |||||
<ResourceDictionary> | |||||
<ImageBrush x:Key="hbl" ImageSource="/BPASmartClient.CustomResource;component/Image/HBL.png" /> | |||||
<ImageBrush x:Key="dbxt" ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" /> | |||||
</ResourceDictionary> | |||||
</ResourceDictionary.MergedDictionaries> | |||||
</ResourceDictionary> | |||||
</Application.Resources> | |||||
</Application> |
@@ -0,0 +1,229 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Collections.ObjectModel; | |||||
using System.Configuration; | |||||
using System.Data; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using System.Windows; | |||||
using BPASmartClient.CustomResource.Pages.Enums; | |||||
using BPASmartClient.CustomResource.Pages.Model; | |||||
using BPASmartClient.CustomResource.Pages.View; | |||||
namespace BPASmartClient.SmallBatchingSystem | |||||
{ | |||||
/// <summary> | |||||
/// Interaction logic for App.xaml | |||||
/// </summary> | |||||
public partial class App : Application | |||||
{ | |||||
public static Window MainWindow; | |||||
protected override void OnStartup(StartupEventArgs e) | |||||
{ | |||||
base.OnStartup(e); | |||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; | |||||
MenuInit(); | |||||
MainView mv = new MainView(); | |||||
LoginView lv = new LoginView(); | |||||
var res = lv.ShowDialog(); | |||||
if (res != null && res == true) | |||||
{ | |||||
MessageLog.GetInstance.ShowUserLog("用户登录"); | |||||
mv.Show(); | |||||
} | |||||
else | |||||
mv.Close(); | |||||
MainWindow = mv; | |||||
} | |||||
private void MenuInit() | |||||
{ | |||||
#region 配方管理菜单 | |||||
ObservableCollection<SubMenumodel> RecipeManage = new ObservableCollection<SubMenumodel>(); | |||||
RecipeManage.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "配方管理", | |||||
SubMenuPermission = new Permission[] { Permission.管理员 }, | |||||
AssemblyName = "BPASmartClient.DosingSystem", | |||||
ToggleWindowPath = "View.RecipeSettingsView" | |||||
}); | |||||
RecipeManage.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "配方下发", | |||||
SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员 }, | |||||
AssemblyName = "BPASmartClient.DosingSystem", | |||||
ToggleWindowPath = "View.RecipeControlView" | |||||
}); | |||||
MenuManage.GetInstance.menuModels.Add(new MenuModel() | |||||
{ | |||||
MainMenuIcon = "", | |||||
MainMenuName = "配方管理", | |||||
Alias = "Recipe Management", | |||||
subMenumodels = RecipeManage, | |||||
}); | |||||
#endregion | |||||
//#region 参数设置 | |||||
//ObservableCollection<SubMenumodel> ParSet = new ObservableCollection<SubMenumodel>(); | |||||
//ParSet.Add(new SubMenumodel() | |||||
//{ | |||||
// SubMenuName = "原料参数设置", | |||||
// SubMenuPermission = new Permission[] { Permission.管理员 }, | |||||
// AssemblyName = "BPASmartClient.DosingSystem", | |||||
// ToggleWindowPath = "View.DeviceMaterialParView" | |||||
//}); | |||||
//MenuManage.GetInstance.menuModels.Add(new MenuModel() | |||||
//{ | |||||
// MainMenuIcon = "", | |||||
// MainMenuName = "参数设置", | |||||
// Alias = "Parameter Set", | |||||
// subMenumodels = ParSet, | |||||
//}); | |||||
//#endregion | |||||
#region 手动控制 | |||||
ObservableCollection<SubMenumodel> ManualControl = new ObservableCollection<SubMenumodel>(); | |||||
ManualControl.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "手动控制", | |||||
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.DosingSystem", | |||||
ToggleWindowPath = "View.ManualControlView" | |||||
}); | |||||
MenuManage.GetInstance.menuModels.Add(new MenuModel() | |||||
{ | |||||
MainMenuIcon = "", | |||||
MainMenuName = "手动控制", | |||||
Alias = "Parameter Set", | |||||
subMenumodels = ManualControl, | |||||
}); | |||||
#endregion | |||||
#region 消息日志 | |||||
ObservableCollection<SubMenumodel> InfoLog = new ObservableCollection<SubMenumodel>(); | |||||
InfoLog.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "操作日志", | |||||
SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.UserLogView" | |||||
}); | |||||
InfoLog.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "运行日志", | |||||
SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.RunLogView" | |||||
}); | |||||
InfoLog.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "报警记录", | |||||
SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.AlarmView" | |||||
}); | |||||
InfoLog.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "调试日志", | |||||
SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员, Permission.技术员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.DebugLogView" | |||||
}); | |||||
InfoLog.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "报表数据", | |||||
SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员, Permission.技术员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.ReportView" | |||||
}); | |||||
MenuManage.GetInstance.menuModels.Add(new MenuModel() | |||||
{ | |||||
MainMenuIcon = "", | |||||
MainMenuName = "消息日志", | |||||
Alias = "Message Log", | |||||
subMenumodels = InfoLog, | |||||
}); | |||||
#endregion | |||||
#region 硬件设备监控 | |||||
ObservableCollection<SubMenumodel> DeviceMonitor = new ObservableCollection<SubMenumodel>(); | |||||
DeviceMonitor.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "原料设备列表", | |||||
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.DosingSystem", | |||||
ToggleWindowPath = "View.DeviceListView" | |||||
}); | |||||
DeviceMonitor.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "设备状态", | |||||
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.DosingSystem", | |||||
ToggleWindowPath = "View.HardwareStatusView" | |||||
}); | |||||
MenuManage.GetInstance.menuModels.Add(new MenuModel() | |||||
{ | |||||
MainMenuIcon = "", | |||||
MainMenuName = "设备监控", | |||||
Alias = "Device Monitor", | |||||
subMenumodels = DeviceMonitor, | |||||
}); | |||||
#endregion | |||||
#region 用户管理 | |||||
ObservableCollection<SubMenumodel> UserManager = new ObservableCollection<SubMenumodel>(); | |||||
UserManager.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "用户登录", | |||||
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.SubPagLoginView" | |||||
}); | |||||
UserManager.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "密码修改", | |||||
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.PasswordChangeView" | |||||
}); | |||||
UserManager.Add(new SubMenumodel() | |||||
{ | |||||
SubMenuName = "用户管理", | |||||
SubMenuPermission = new Permission[] { Permission.管理员 }, | |||||
AssemblyName = "BPASmartClient.CustomResource", | |||||
ToggleWindowPath = "Pages.View.UserManagerView" | |||||
}); | |||||
MenuManage.GetInstance.menuModels.Add(new MenuModel() | |||||
{ | |||||
MainMenuIcon = "", | |||||
MainMenuName = "用户管理", | |||||
Alias = "User Management", | |||||
subMenumodels = UserManager, | |||||
}); | |||||
#endregion | |||||
} | |||||
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) | |||||
{ | |||||
throw new NotImplementedException(); | |||||
} | |||||
protected override void OnExit(ExitEventArgs e) | |||||
{ | |||||
base.OnExit(e); | |||||
} | |||||
} | |||||
} |
@@ -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,26 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<OutputType>WinExe</OutputType> | |||||
<TargetFramework>net6.0-windows</TargetFramework> | |||||
<Nullable>enable</Nullable> | |||||
<UseWPF>true</UseWPF> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Folder Include="Images\" /> | |||||
<Folder Include="ViewModels\" /> | |||||
<Folder Include="Views\" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<PackageReference Include="BPA.Communication" Version="1.0.19" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.15" /> | |||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\BPASmartClient.CustomResource\BPASmartClient.CustomResource.csproj" /> | |||||
</ItemGroup> | |||||
</Project> |
@@ -0,0 +1,15 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace BPASmartClient.SmallBatchingSystem.Models | |||||
{ | |||||
public class CommunicationPar | |||||
{ | |||||
public string Host { get; set; } | |||||
public int Port { get; set; } = 502; | |||||
} | |||||
} |
@@ -0,0 +1,12 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace BPASmartClient.SmallBatchingSystem.Models | |||||
{ | |||||
public class PLCModel | |||||
{ | |||||
} | |||||
} |
@@ -0,0 +1,28 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
using BPA.Communication; | |||||
using BPA.Helper; | |||||
using BPASmartClient.SmallBatchingSystem.Models; | |||||
namespace BPASmartClient.SmallBatchingSystem.Services | |||||
{ | |||||
public class PlcServer | |||||
{ | |||||
private volatile static PlcServer _Instance; | |||||
public static PlcServer GetInstance => _Instance ?? (_Instance = new PlcServer()); | |||||
private PlcServer() { } | |||||
ModbusTcp Communication = new ModbusTcp(); | |||||
public void Connect() | |||||
{ | |||||
Communication.ModbusTcpConnect(Json<CommunicationPar>.Data.Host,Json<CommunicationPar>.Data.Port); | |||||
} | |||||
} | |||||
} |
@@ -166,7 +166,7 @@ namespace BPASmartClient.ZhuoDian | |||||
private void DataInit() | private void DataInit() | ||||
{ | { | ||||
Config.GetInstance.Init(); | |||||
//Config.GetInstance.Init(); | |||||
} | } | ||||
} | } | ||||
@@ -245,7 +245,7 @@ namespace BPASmartClient.DosingSystem | |||||
private void DataInit() | private void DataInit() | ||||
{ | { | ||||
Config.GetInstance.Init(); | |||||
//Config.GetInstance.Init(); | |||||
Json<LocaPar>.Read(); | Json<LocaPar>.Read(); | ||||
Json<DevicePar>.Read(); | Json<DevicePar>.Read(); | ||||
Json<LocaMaterial>.Read(); | Json<LocaMaterial>.Read(); | ||||
@@ -281,7 +281,7 @@ namespace FryPot_DosingSystem | |||||
} | } | ||||
private void LoginDataInite() | private void LoginDataInite() | ||||
{ | { | ||||
Config.GetInstance.Init();//用户数据初始化 | |||||
//Config.GetInstance.Init();//用户数据初始化 | |||||
Json<RecipeManage>.Read(); | Json<RecipeManage>.Read(); | ||||
} | } | ||||
} | } | ||||
@@ -176,6 +176,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.UserManagement", " | |||||
EndProject | EndProject | ||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.PageLoad", "BPASmart.PageLoad\BPASmart.PageLoad.csproj", "{2DB084E8-B951-4D71-A203-FD0902EBA2C6}" | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.PageLoad", "BPASmart.PageLoad\BPASmart.PageLoad.csproj", "{2DB084E8-B951-4D71-A203-FD0902EBA2C6}" | ||||
EndProject | EndProject | ||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.SmallBatchingSystem", "BPASmartClient.SmallBatchingSystem\BPASmartClient.SmallBatchingSystem.csproj", "{BA588F22-87FB-4124-AF62-CA8DC492ED7D}" | |||||
EndProject | |||||
Global | Global | ||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||
Debug|Any CPU = Debug|Any CPU | Debug|Any CPU = Debug|Any CPU | ||||
@@ -1630,6 +1632,26 @@ Global | |||||
{2DB084E8-B951-4D71-A203-FD0902EBA2C6}.Release|x64.Build.0 = Release|Any CPU | {2DB084E8-B951-4D71-A203-FD0902EBA2C6}.Release|x64.Build.0 = Release|Any CPU | ||||
{2DB084E8-B951-4D71-A203-FD0902EBA2C6}.Release|x86.ActiveCfg = Release|Any CPU | {2DB084E8-B951-4D71-A203-FD0902EBA2C6}.Release|x86.ActiveCfg = Release|Any CPU | ||||
{2DB084E8-B951-4D71-A203-FD0902EBA2C6}.Release|x86.Build.0 = Release|Any CPU | {2DB084E8-B951-4D71-A203-FD0902EBA2C6}.Release|x86.Build.0 = Release|Any CPU | ||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|ARM.ActiveCfg = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|ARM.Build.0 = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|ARM64.ActiveCfg = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|ARM64.Build.0 = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|x64.ActiveCfg = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|x64.Build.0 = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|x86.ActiveCfg = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|x86.Build.0 = Debug|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|ARM.ActiveCfg = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|ARM.Build.0 = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|ARM64.ActiveCfg = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|ARM64.Build.0 = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|x64.ActiveCfg = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|x64.Build.0 = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|x86.ActiveCfg = Release|Any CPU | |||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Release|x86.Build.0 = Release|Any CPU | |||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(SolutionProperties) = preSolution | GlobalSection(SolutionProperties) = preSolution | ||||
HideSolutionNode = FALSE | HideSolutionNode = FALSE | ||||
@@ -1711,6 +1733,7 @@ Global | |||||
{897F8379-3301-4CBE-9BCA-AF7FD2F963A9} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | {897F8379-3301-4CBE-9BCA-AF7FD2F963A9} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | ||||
{06F30619-AD37-4CA0-838F-0431867E0932} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | {06F30619-AD37-4CA0-838F-0431867E0932} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | ||||
{2DB084E8-B951-4D71-A203-FD0902EBA2C6} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | {2DB084E8-B951-4D71-A203-FD0902EBA2C6} = {CDC1E762-5E1D-4AE1-9DF2-B85761539086} | ||||
{BA588F22-87FB-4124-AF62-CA8DC492ED7D} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} | |||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(ExtensibilityGlobals) = postSolution | GlobalSection(ExtensibilityGlobals) = postSolution | ||||
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC} | SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC} | ||||