Browse Source

临时数据提交

样式分支
taoye 2 years ago
parent
commit
b09165a13b
49 changed files with 230 additions and 3742 deletions
  1. +29
    -2
      BPASmartClient.AGV/Feedback/AGVToUpSystem.cs
  2. +0
    -41
      BPASmartClient.AGV/Feedback/AGVToUpSystemBody.cs
  3. +41
    -3
      BPASmartClient.AGV/Feedback/Upstreamrequest.cs
  4. +0
    -54
      BPASmartClient.AGV/Feedback/UpstreamrequestBody.cs
  5. +2
    -289
      BPASmartClient.CustomResource/Pages/View/LoginView.xaml
  6. +0
    -37
      BPASmartClient.DosingSystem/App.xaml
  7. +0
    -188
      BPASmartClient.DosingSystem/App.xaml.cs
  8. +0
    -10
      BPASmartClient.DosingSystem/AssemblyInfo.cs
  9. +0
    -28
      BPASmartClient.DosingSystem/BPASmartClient.DosingSystem.csproj
  10. +0
    -28
      BPASmartClient.DosingSystem/Model/ActionMenu.cs
  11. +0
    -44
      BPASmartClient.DosingSystem/Model/DeviceAddress.cs
  12. +0
    -221
      BPASmartClient.DosingSystem/Model/DeviceInquire.cs
  13. +0
    -15
      BPASmartClient.DosingSystem/Model/LocaPar.cs
  14. +0
    -45
      BPASmartClient.DosingSystem/Model/RawMaterialDeviceStatus.cs
  15. +0
    -88
      BPASmartClient.DosingSystem/Model/RawMaterialModel.cs
  16. +0
    -51
      BPASmartClient.DosingSystem/Model/RecipeModel.cs
  17. +0
    -380
      BPASmartClient.DosingSystem/View/AlarmRecordView.xaml
  18. +0
    -28
      BPASmartClient.DosingSystem/View/AlarmRecordView.xaml.cs
  19. +0
    -122
      BPASmartClient.DosingSystem/View/ChangeDeviceNameView.xaml
  20. +0
    -31
      BPASmartClient.DosingSystem/View/ChangeDeviceNameView.xaml.cs
  21. +0
    -143
      BPASmartClient.DosingSystem/View/DeviceListView.xaml
  22. +0
    -28
      BPASmartClient.DosingSystem/View/DeviceListView.xaml.cs
  23. +0
    -27
      BPASmartClient.DosingSystem/View/HardwareStatusView.xaml
  24. +0
    -28
      BPASmartClient.DosingSystem/View/HardwareStatusView.xaml.cs
  25. +0
    -251
      BPASmartClient.DosingSystem/View/MainWindow.xaml
  26. +0
    -48
      BPASmartClient.DosingSystem/View/MainWindow.xaml.cs
  27. +0
    -222
      BPASmartClient.DosingSystem/View/NewRecipeView.xaml
  28. +0
    -32
      BPASmartClient.DosingSystem/View/NewRecipeView.xaml.cs
  29. +0
    -188
      BPASmartClient.DosingSystem/View/RecipeControlView.xaml
  30. +0
    -28
      BPASmartClient.DosingSystem/View/RecipeControlView.xaml.cs
  31. +0
    -246
      BPASmartClient.DosingSystem/View/RecipeSettingsView.xaml
  32. +0
    -28
      BPASmartClient.DosingSystem/View/RecipeSettingsView.xaml.cs
  33. +0
    -18
      BPASmartClient.DosingSystem/ViewModel/AlarmRecordViewModel.cs
  34. +0
    -71
      BPASmartClient.DosingSystem/ViewModel/ChangeDeviceNameViewModel.cs
  35. +0
    -45
      BPASmartClient.DosingSystem/ViewModel/DeviceListViewModel.cs
  36. +0
    -18
      BPASmartClient.DosingSystem/ViewModel/HardwareStatusViewModel.cs
  37. +0
    -161
      BPASmartClient.DosingSystem/ViewModel/MainViewModel.cs
  38. +0
    -131
      BPASmartClient.DosingSystem/ViewModel/NewRecipeViewModel.cs
  39. +0
    -92
      BPASmartClient.DosingSystem/ViewModel/RecipeControlViewModel.cs
  40. +0
    -63
      BPASmartClient.DosingSystem/ViewModel/RecipeSettingsViewModel.cs
  41. +0
    -79
      BPASmartClient.DosingSystem/app.manifest
  42. BIN
     
  43. +23
    -7
      FryPot_DosingSystem/App.xaml.cs
  44. +19
    -19
      FryPot_DosingSystem/Control/DosingLogicControl.cs
  45. +1
    -1
      FryPot_DosingSystem/View/MainWindow.xaml.cs
  46. +0
    -7
      HubHelper/HubHelper.cs
  47. +0
    -9
      HubHelper/HubHelper.csproj
  48. +113
    -45
      SmartClient.sln
  49. +2
    -2
      TestDemo/Form1.cs

+ 29
- 2
BPASmartClient.AGV/Feedback/AGVToUpSystem.cs View File

@@ -8,7 +8,34 @@ namespace BPASmartClient.AGV.Feedback
{
public class AGVToUpSystem
{
public AGVUpReportHeader? head { get; set; }
public AGVToUpSystemBody? body { get; set; }
/// <summary>
/// 上游系统任务号,全局唯一
/// </summary>
public string robotJobId { get; set; }

/// <summary>
/// 仓库编号
/// </summary>
public int warehouseId { get; set; }

/// <summary>
/// 任务快仓系统编号
/// </summary>
public string jobId { get; set; }

/// <summary>
/// 任务状态
/// </summary>
public string state { get; set; }

/// <summary>
/// 内部任务类型
/// </summary>
public string jobType { get; set; }

/// <summary>
/// 数据字段
/// </summary>
public JobData jobData { get; set; } = new JobData();
}
}

+ 0
- 41
BPASmartClient.AGV/Feedback/AGVToUpSystemBody.cs View File

@@ -1,41 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.AGV.Feedback
{
public class AGVToUpSystemBody
{
/// <summary>
/// 上游系统任务号,全局唯一
/// </summary>
public string robotJobId { get; set; }

/// <summary>
/// 仓库编号
/// </summary>
public int warehouseId { get; set; }

/// <summary>
/// 任务快仓系统编号
/// </summary>
public string jobId { get; set; }

/// <summary>
/// 任务状态
/// </summary>
public string state { get; set; }

/// <summary>
/// 内部任务类型
/// </summary>
public string jobType { get; set; }

/// <summary>
/// 数据字段
/// </summary>
public JobData jobData { get; set; } = new JobData();
}
}

+ 41
- 3
BPASmartClient.AGV/Feedback/Upstreamrequest.cs View File

@@ -6,10 +6,48 @@ using System.Threading.Tasks;

namespace BPASmartClient.AGV.Feedback
{
public class UpStreamrequest
public class Upstreamrequest
{
public AGVUpReportHeader? head { get; set; }
/// <summary>
/// AGV编号
/// </summary>
public string agvCode { get; set; }

public UpstreamrequestBody? body { get; set; }
/// <summary>
/// 容器编号,如果一次上/下多个容器,则多个容器用英文逗号分隔
/// </summary>
public string containerCode { get; set; }

/// <summary>
/// 上游设备ID 本字段适用于只有一个辊筒设备的时候使用
/// </summary>
public long equipmentId { get; set; }

/// <summary>
/// 上游设备ID,多个用英文逗号分隔 本字段适用于多辊筒同时上下料的时候使用
/// </summary>
public string equipmentIds { get; set; }

/// <summary>
/// 快仓任务编号
/// </summary>
public string jobId { get; set; }

/// <summary>
/// 消息ID
/// </summary>
public string msgId { get; set; }

/// <summary>
/// 交互阶段
/// LOAD:上料阶段
/// UNLOAD:下料阶段
/// </summary>
public string command { get; set; }

/// <summary>
/// 上游任务号
/// </summary>
public string robotJobId { get; set; }
}
}

+ 0
- 54
BPASmartClient.AGV/Feedback/UpstreamrequestBody.cs View File

@@ -1,54 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.AGV.Feedback
{
public class UpstreamrequestBody
{
/// <summary>
/// AGV编号
/// </summary>
public string agvCode { get; set; }

/// <summary>
/// 容器编号,如果一次上/下多个容器,则多个容器用英文逗号分隔
/// </summary>
public string containerCode { get; set; }

/// <summary>
/// 上游设备ID 本字段适用于只有一个辊筒设备的时候使用
/// </summary>
public long equipmentId { get; set; }

/// <summary>
/// 上游设备ID,多个用英文逗号分隔 本字段适用于多辊筒同时上下料的时候使用
/// </summary>
public string equipmentIds { get; set; }

/// <summary>
/// 快仓任务编号
/// </summary>
public string jobId { get; set; }

/// <summary>
/// 消息ID
/// </summary>
public string msgId { get; set; }

/// <summary>
/// 交互阶段
/// LOAD:上料阶段
/// UNLOAD:下料阶段
/// </summary>
public string command { get; set; }

/// <summary>
/// 上游任务号
/// </summary>
public string robotJobId { get; set; }

}
}

+ 2
- 289
BPASmartClient.CustomResource/Pages/View/LoginView.xaml View File

@@ -233,28 +233,6 @@
VerticalAlignment="Center"
LoadedBehavior="Manual" />

<!--<MediaElement
Name="player"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Source="../../Videos/Login.mp4"
LoadedBehavior="Play">
<MediaElement.Triggers>
<EventTrigger RoutedEvent="MediaElement.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<MediaTimeline
RepeatBehavior="Forever"
Source="../../Videos/Login.mp4"
Storyboard.TargetName="player" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</MediaElement.Triggers>
</MediaElement>-->

<Grid x:Name="grid" Margin="400,180">
<Grid.RowDefinitions>
<RowDefinition />
@@ -280,10 +258,10 @@
Text="{Binding ErrorInfo}" />

<TextBox
Name="Username"
Grid.Row="1"
Margin="20,20"
BorderBrush="#009DFF"
Name="Username"
BorderThickness="3"
FontSize="30"
Foreground="#009DFF"
@@ -295,7 +273,6 @@
<PasswordBox
Name="pb"
Grid.Row="2"
KeyDown="pb_KeyDown"
Margin="20,20"
common:PasswordHelper.Attach="True"
common:PasswordHelper.Password="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
@@ -303,6 +280,7 @@
BorderThickness="3"
FontSize="30"
Foreground="#009DFF"
KeyDown="pb_KeyDown"
PasswordChanged="PasswordBox_PasswordChanged"
Style="{DynamicResource PasswordBoxStyle}"
TabIndex="2" />
@@ -338,271 +316,6 @@
TabIndex="3" />

</Grid>

</Grid>


</Grid>


<!--<Border
x:Name="br"
BorderBrush="#009dff"
BorderThickness="2">
<Border.Effect>
<DropShadowEffect
BlurRadius="10"
ShadowDepth="1"
Color="#009DFF" />
</Border.Effect>
<Grid>
-->
<!--<Image Source="../../Image/登录界面背景1.jpg" Stretch="Fill" />
<Image Source="../../Image/阴影边框.png" Stretch="Fill" />-->
<!--
<Border
Width="400"
Height="260"
Margin="0,0,0,250"
BorderBrush="#009dff"
BorderThickness="2">
<Border.Effect>
<DropShadowEffect
BlurRadius="10"
ShadowDepth="1"
Color="#009DFF" />
</Border.Effect>

<Grid Width="400" Height="260">
-->
<!--<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>-->









<!--<TextBlock
Margin="0,10,0,0"
HorizontalAlignment="Center"
FontSize="20"
Foreground="#ddd"
Text="用户登录" />

<TextBlock
Margin="20,10,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
FontSize="16"
Foreground="#FFEF2020"
Text="{Binding ErrorInfo}" />

<TextBox
Grid.Row="1"
Height="40"
Margin="20,0"
BorderBrush="#009DFF"
FontSize="16"
Foreground="#009DFF"
Style="{DynamicResource UserTextBoxStyle}"
TabIndex="1"
Text="{Binding UserName}" />

<PasswordBox
Name="pb"
Grid.Row="2"
Height="40"
Margin="20,0"
common:PasswordHelper.Attach="True"
common:PasswordHelper.Password="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
BorderBrush="#009DFF"
FontSize="16"
Foreground="#009DFF"
PasswordChanged="PasswordBox_PasswordChanged"
Style="{DynamicResource PasswordBoxStyle}"
TabIndex="2" />

<TextBlock
Name="markText"
Grid.Row="2"
Margin="70,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="20"
Foreground="#88009dff"
IsHitTestVisible="False"
Text="请输入账号密码"
Visibility="Visible" />




<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>

<Button
Margin="20,10"
Background="#009DFF"
BorderThickness="0"
Command="{Binding ExitCommand}"
Content="退 出"
FontSize="20"
Foreground="White" />

<Button
Grid.Column="1"
Margin="20,10"
Background="#009DFF"
BorderThickness="0"
Command="{Binding LoginCommand}"
Content="登 录"
FontSize="20"
Foreground="White"
TabIndex="3" />

</Grid>-->
<!--

</Grid>
</Border>
</Grid>

</Border>

-->
<!--<Grid x:Name="gr">
<Grid.Background>
<ImageBrush Opacity="0.8" ImageSource="../../Image/登录界面背景.jpg" />
</Grid.Background>

<Image
Margin="201 101"
Source="../../Image/阴影边框.png"
Stretch="Fill" />

<Border
Margin="200 100"
BorderBrush="#009dff"
BorderThickness="1">
<Border.Effect>
<DropShadowEffect
BlurRadius="10"
ShadowDepth="1"
Color="#009DFF" />
</Border.Effect>
-->
<!--<Border.Background>
<ImageBrush ImageSource="../../Image/矩形样式.png"/>
</Border.Background>-->
<!--

<Grid>

<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>

<TextBlock
Margin="0,10,0,0"
HorizontalAlignment="Center"
FontSize="20"
Foreground="#ddd"
Text="用户登录" />

<TextBlock
Margin="20,10,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
FontSize="16"
Foreground="#FFEF2020"
Text="{Binding ErrorInfo}" />

<TextBox
Grid.Row="1"
Height="40"
Margin="20,0"
BorderBrush="#009DFF"
FontSize="16"
Foreground="#aadddddd"
Style="{DynamicResource UserTextBoxStyle}"
Text="{Binding UserName}" />

<PasswordBox
Name="pb"
Grid.Row="2"
Height="40"
Margin="20,0"
common:PasswordHelper.Attach="True"
common:PasswordHelper.Password="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
BorderBrush="#009DFF"
FontSize="16"
Foreground="#aadddddd"
PasswordChanged="PasswordBox_PasswordChanged"
Style="{DynamicResource PasswordBoxStyle}" />

<TextBlock
Name="markText"
Grid.Row="2"
Margin="70,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="20"
Foreground="#88009dff"
IsHitTestVisible="False"
Text="请输入账号密码"
Visibility="Visible" />


<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>

<Button
Margin="20,10"
Background="#009DFF"
BorderThickness="0"
Command="{Binding ExitCommand}"
Content="退 出"
FontSize="20"
Foreground="White" />

<Button
Grid.Column="1"
Margin="20,10"
Background="#009DFF"
BorderThickness="0"
Command="{Binding LoginCommand}"
Content="登 录"
FontSize="20"
Foreground="White" />

</Grid>

</Grid>

</Border>




</Grid>-->



</Window>

+ 0
- 37
BPASmartClient.DosingSystem/App.xaml View File

@@ -1,37 +0,0 @@
<Application
x:Class="BPASmartClient.DosingSystem.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.DosingSystem">
<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>
<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
- 188
BPASmartClient.DosingSystem/App.xaml.cs View File

@@ -1,188 +0,0 @@
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;
using BPASmartClient.DosingSystem.Model;
using BPASmartClient.DosingSystem.View;
using BPASmartClient.Helper;

namespace BPASmartClient.DosingSystem
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
MenuInit();
DataInit();

MainView mv = new MainView();
LoginView lv = new LoginView();
var res = lv.ShowDialog();
if (res != null && res == true)
mv.Show();
else
mv.Close();



//MainWindow mw = new MainWindow();
//LoginView lv = new LoginView();
//var res = lv.ShowDialog();
//if (res != null && res == true)
// mw.Show();
//else
// mw.Close();
}

protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
Json<LocaPar>.Save();
MessageLog.GetInstance.LogSave();
}

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.操作员 },
AssemblyName = "BPASmartClient.DosingSystem",
ToggleWindowPath = "View.RecipeControlView"
});

MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe683;",
MainMenuName = "配方管理",
Alias = "Recipe Management",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员 },
subMenumodels = RecipeManage,
});
#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"
});

MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe668;",
MainMenuName = "消息日志",
Alias = "Message Log",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },
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 = "&#xe603;",
MainMenuName = "设备监控",
Alias = "Device Monitor",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },
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.LoginView"
});

UserManager.Add(new SubMenumodel()
{
SubMenuName = "密码修改",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },
AssemblyName = "BPASmartClient.CustomResource",
ToggleWindowPath = "Pages.View.PasswordChangeView"
});


MenuManage.GetInstance.menuModels.Add(new MenuModel()
{
MainMenuIcon = "&#xe66d;",
MainMenuName = "用户管理",
Alias = "User Management",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },
subMenumodels = UserManager,
});
#endregion
}

private void DataInit()
{
Config.GetInstance.Init();
Json<LocaPar>.Read();
}

}
}

+ 0
- 10
BPASmartClient.DosingSystem/AssemblyInfo.cs View File

@@ -1,10 +0,0 @@
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
- 28
BPASmartClient.DosingSystem/BPASmartClient.DosingSystem.csproj View File

@@ -1,28 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>hbl.ico</ApplicationIcon>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<Content Include="hbl.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BPA.Message" Version="1.0.46" />
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

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

</Project>

+ 0
- 28
BPASmartClient.DosingSystem/Model/ActionMenu.cs View File

@@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using Microsoft.Toolkit.Mvvm.Input;

namespace BPASmartClient.DosingSystem.Model
{
public class ActionMenu : ObservableObject
{
public string CommandParameter { get { return _mCommandParameter; } set { _mCommandParameter = value; OnPropertyChanged(); } }
private string _mCommandParameter;

//public Permission[] permission { get { return _mpermission; } set { _mpermission = value; OnPropertyChanged(); } }
//private Permission[] _mpermission;

public string MenuName { get { return _mMenuName; } set { _mMenuName = value; OnPropertyChanged(); } }
private string _mMenuName;


//public string NameSpace { get { return _mNameSpace; } set { _mNameSpace = value; OnPropertyChanged(); } }
//private string _mNameSpace;


}
}

+ 0
- 44
BPASmartClient.DosingSystem/Model/DeviceAddress.cs View File

@@ -1,44 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.DosingSystem.Model
{
public class DeviceAddress
{
/// <summary>
/// 设备名称起始地址
/// </summary>
public static string DeviceName { get; set; } = "LW0";

/// <summary>
/// 料仓重量反馈起始地址
/// </summary>
public static string WeightFeedback { get; set; } = "LW204";

/// <summary>
/// 重量设置地址
/// </summary>
public static string WeightSet { get; set; } = "LW200";

/// <summary>
/// 启动信号地址
/// </summary>
public static string Start { get; set; } = "LW210";

/// <summary>
/// 下料重量反馈地址
/// </summary>
public static string CutWeightFeedback { get; set; } = "LW202";

/// <summary>
/// 设备运行状态地址
/// </summary>
public static string RunStatus { get; set; } = "LW206";
}



}

+ 0
- 221
BPASmartClient.DosingSystem/Model/DeviceInquire.cs View File

@@ -1,221 +0,0 @@
using BPASmartClient.Helper;
using BPASmartClient.Message;
using BPASmartClient.Modbus;
using BPASmartClient.DosingSystem.ViewModel;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.DosingSystem.Model
{
public class DeviceInquire
{
private volatile static DeviceInquire _Instance;
public static DeviceInquire GetInstance => _Instance ?? (_Instance = new DeviceInquire());
private DeviceInquire() { }

string IPSegment = "192.168.0.";

ConcurrentDictionary<string, DeviceStatus> DeviceLists = new ConcurrentDictionary<string, DeviceStatus>();
List<string> InvalidIP = new List<string>();//无效 IP 集合
List<string> IPLists = new List<string>();//启动 Ping 任务IP集合
ConcurrentQueue<string> IPQueues = new ConcurrentQueue<string>();//pincomplete 完成队列

public void Init()
{
IpAddressLines();
ThreadManage.GetInstance().StartLong(new Action(() =>
{
if (IPQueues.Count >= IPLists.Count)
IpAddressLines();
Thread.Sleep(5000);
}), "配料机设备上线监听", true);
}

public void Rescan()
{
InvalidIP.Clear();
}

public DeviceStatus GetDevice(string ip)
{
if (ip != null)
{
var res = DeviceLists.Values.FirstOrDefault(p => p.IpAddress == ip);
if (res != null) return res;
}
return new DeviceStatus();
}

private void IpAddressLines()
{
IPLists.Clear();
IPQueues.Clear();
for (int i = 1; i <= 255; i++)
{
if (!InvalidIP.Contains($"{IPSegment}{i}") && !DeviceLists.ContainsKey($"{IPSegment}{i}"))
{
IPLists.Add($"{IPSegment}{i}");
}
}

IPLists.ForEach((item) =>
{
Ping myPing = new Ping();
myPing.PingCompleted += new PingCompletedEventHandler(_myPing_PingCompleted);
myPing.SendAsync(item, 1000, null);
});
}

private void _myPing_PingCompleted(object sender, PingCompletedEventArgs e)
{
if (e.Reply.Status == IPStatus.Success)
{
string ip = e.Reply.Address.ToString();
if (!DeviceLists.ContainsKey(ip))
{
DeviceStatus DS = new DeviceStatus();
DS.modbusTcp.IsReconnect = false;

DS.modbusTcp.ConnectOk = new Action(() =>
{
string DeviceName = DS.modbusTcp.GetString(DeviceAddress.DeviceName, 20);
if (DeviceName.Length > 0)
{
DeviceLists.TryAdd(ip, DS);
DeviceLists[ip].Init(DeviceName);
DeviceLists[ip].modbusTcp.IsReconnect = false;
App.Current.Dispatcher.Invoke(new Action(() =>
{
DeviceListViewModel.devices.Add(new Devices()
{
DeviceName = DeviceName,
IpAddress = ip
});

for (int i = 0; i < Json<LocaPar>.Data.Recipes.Count; i++)
{
for (int m = 0; m < Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.Count; m++)
{
if (Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.ElementAt(m).DeviceIp == ip)
{
Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.ElementAt(m).RawMaterialName = DeviceName;
}
}
}

if (!NewRecipeViewModel.RawMaterialNames.Contains(DeviceName))
NewRecipeViewModel.RawMaterialNames.Add(DeviceName);

}));
}
else
{
if (!InvalidIP.Contains(ip)) InvalidIP.Add(ip);
}
});

DS.modbusTcp.ConnectFail = new Action(() =>
{
if (!InvalidIP.Contains(ip)) InvalidIP.Add(ip);
MessageLog.GetInstance.Show($"{ip}连接失败");
});

DS.modbusTcp.Disconnect = new Action(() =>
{
if (InvalidIP.Contains(ip)) InvalidIP.Remove(ip);
var res = DeviceListViewModel.devices.FirstOrDefault(P => P.IpAddress == ip);
if (res != null && DeviceListViewModel.devices.Contains(res))
App.Current.Dispatcher.Invoke(new Action(() =>
{
DeviceListViewModel.devices.Remove(res);
if (!NewRecipeViewModel.RawMaterialNames.Contains(res.DeviceName))
NewRecipeViewModel.RawMaterialNames.Remove(res.DeviceName);
}));
if (DeviceLists.ContainsKey(ip)) DeviceLists[ip].Dispose();
});

Task.Run(new Action(() =>
{
DS.modbusTcp.ModbusTcpConnect(ip, 502);
IPQueues.Enqueue(e.Reply.Address.ToString());
}));
}
else IPQueues.Enqueue(e.Reply.Address.ToString());
}
else IPQueues.Enqueue(e.Reply.Address.ToString());
}
}

public class DeviceStatus
{

#region 对象属性声明
public string DeviceName = String.Empty;
public string IpAddress => modbusTcp.IPAdress;

/// <summary>
/// 设备状态
/// </summary>
public RawMaterialDeviceStatus deviceStatus { get; set; } = new RawMaterialDeviceStatus();

public ModbusTcp modbusTcp = new ModbusTcp();

public bool IsConnected => modbusTcp.Connected;
#endregion

public void Init(string DeviceName)
{
this.DeviceName = DeviceName;
if (modbusTcp.Connected)
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
//获取设备运行状态
var res = this.modbusTcp.Read(DeviceAddress.RunStatus);
if (res != null && res is ushort[] ushortValue)
{
if (ushortValue.Length >= 1) deviceStatus.RunStatus = ushortValue[0];
}

//获取设备料仓剩余重量
deviceStatus.WeightFeedback = this.modbusTcp.GetUint(DeviceAddress.WeightFeedback) * 10;

Thread.Sleep(100);
}), $"{DeviceName} 开始监听", true);
}
}

public void SetDeviceName(string name)
{
this.modbusTcp.Write(DeviceAddress.DeviceName, new ushort[20]);
this.modbusTcp.SetString(DeviceAddress.DeviceName, name);
}

public void StatusReset()
{
this.modbusTcp.Write(DeviceAddress.RunStatus, (ushort)0);
}

public void Dispose()
{
ThreadManage.GetInstance().StopTask($"{DeviceName} 开始监听");
}

public void Start(uint Value)
{
if (modbusTcp.Connected)
{
modbusTcp.SetUint(DeviceAddress.WeightSet, Value);//写入配方量
modbusTcp.Write(DeviceAddress.Start, (ushort)1);//设备启动写入
}
}
}

}

+ 0
- 15
BPASmartClient.DosingSystem/Model/LocaPar.cs View File

@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using BPASmartClient.DosingSystem.ViewModel;

namespace BPASmartClient.DosingSystem.Model
{
public class LocaPar
{
public ObservableCollection<RecipeModel> Recipes { get; set; } = new ObservableCollection<RecipeModel>();
}
}

+ 0
- 45
BPASmartClient.DosingSystem/Model/RawMaterialDeviceStatus.cs View File

@@ -1,45 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.DosingSystem.Model
{
public class RawMaterialDeviceStatus
{

/// <summary>
/// 原料类型
/// 1:液体
/// 2:膏体
/// 3:粉体
/// </summary>
public ushort RawMaterialType { get; set; }

/// <summary>
/// 料仓重量反馈
/// </summary>
public float WeightFeedback { get; set; }

/// <summary>
/// 上限反馈
/// </summary>
public bool UpLimitFeedback { get; set; }

/// <summary>
/// 下限反馈
/// </summary>
public bool DownLimitFeedback { get; set; }

/// <summary>
/// 下料重量反馈
/// </summary>
public float CutWeightFeedback { get; set; }

/// <summary>
/// 设备运行状态
/// </summary>
public ushort RunStatus { get; set; }
}
}

+ 0
- 88
BPASmartClient.DosingSystem/Model/RawMaterialModel.cs View File

@@ -1,88 +0,0 @@
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.DosingSystem.Model
{
/// <summary>
/// 原料模块
/// </summary>
public class RawMaterialModel : ObservableObject
{
/// <summary>
/// 原料名称
/// </summary>
public string RawMaterialName { get { return _mRawMaterialName; } set { _mRawMaterialName = value; OnPropertyChanged(); } }
private string _mRawMaterialName;

/// <summary>
/// 原料设备IP
/// </summary>
public string DeviceIp { get; set; }

/// <summary>
/// 原料重量设置
/// </summary>
public uint RawMaterialWeight { get { return _mRawMaterialWeight; } set { _mRawMaterialWeight = value; OnPropertyChanged(); } }
private uint _mRawMaterialWeight;

/// <summary>
/// 原料类型 MW18
/// 1:液体
/// 2:膏体
/// 3:粉体
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public ushort RawMaterialType { get { return _mRawMaterialType; } set { _mRawMaterialType = value; OnPropertyChanged(); } }
private ushort _mRawMaterialType;

/// <summary>
/// 料仓重量反馈 MD40
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public float WeightFeedback { get { return _mWeightFeedback; } set { _mWeightFeedback = value; OnPropertyChanged(); } }
private float _mWeightFeedback;

/// <summary>
/// 上限反馈
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public bool UpLimtFeedback { get { return _mUpLimtFeedback; } set { _mUpLimtFeedback = value; OnPropertyChanged(); } }
private bool _mUpLimtFeedback;

/// <summary>
/// 下限反馈
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public bool DownLimtFeedback { get { return _mDownLimtFeedback; } set { _mDownLimtFeedback = value; OnPropertyChanged(); } }
private bool _mDownLimtFeedback;

/// <summary>
/// 下料重量反馈 MD52
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public float UpLimtWeightFeedback { get { return _mUpLimtWeightFeedback; } set { _mUpLimtWeightFeedback = value; OnPropertyChanged(); } }
private float _mUpLimtWeightFeedback;


/// <summary>
/// 原料ID
/// </summary>
public string RawMaterialId { get { return _mRawMaterialId; } set { _mRawMaterialId = value; OnPropertyChanged(); } }
private string _mRawMaterialId;

/// <summary>
/// 原料设备执行状态
/// 1:空闲状态
/// 2:下料中
/// 3:下料完成
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public ushort RecipeStatus { get { return _mRecipeStatus; } set { _mRecipeStatus = value; OnPropertyChanged(); } }
private ushort _mRecipeStatus = 1;

}
}

+ 0
- 51
BPASmartClient.DosingSystem/Model/RecipeModel.cs View File

@@ -1,51 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BPASmartClient.DosingSystem.ViewModel;
using Microsoft.Toolkit.Mvvm.ComponentModel;

namespace BPASmartClient.DosingSystem.Model
{
/// <summary>
/// 配方模块
/// </summary>
public class RecipeModel : ObservableObject
{
[Newtonsoft.Json.JsonIgnore]
public bool IsEnable { get { return _mIsEnable; } set { _mIsEnable = value; OnPropertyChanged(); } }
private bool _mIsEnable = true;

/// <summary>
/// 序号
/// </summary>
public int SerialNum { get { return _mSerialNum; } set { _mSerialNum = value; OnPropertyChanged(); } }
private int _mSerialNum;

/// <summary>
/// 配方名称
/// </summary>
public string RecipeName { get { return _mRecipeName; } set { _mRecipeName = value; OnPropertyChanged(); } }
private string _mRecipeName;

/// <summary>
/// 配方编码
/// </summary>
public string RecipCode { get { return _mRecipCode; } set { _mRecipCode = value; OnPropertyChanged(); } }
private string _mRecipCode;

[Newtonsoft.Json.JsonIgnore]
public AutoResetEvent Are { get; set; } = new AutoResetEvent(false);

/// <summary>
/// 原料集合
/// </summary>
public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel>();



}
}

+ 0
- 380
BPASmartClient.DosingSystem/View/AlarmRecordView.xaml View File

@@ -1,380 +0,0 @@
<UserControl
x:Class="BPASmartClient.DosingSystem.View.AlarmRecordView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">

<UserControl.DataContext>
<vm:AlarmRecordViewModel />
</UserControl.DataContext>

<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<!--<convert:TextDisplayConvert x:Key="textDisplayConvert" />
<convert:IsEnableConvert x:Key="isEnableConvert" />
<convert:AnalogAlarmConvert x:Key="analogAlarmConvert" />
<convert:DiscreteAlarmConvert x:Key="discreteAlarmConvert" />
<convert:AlarmTypeTextConvert x:Key="alarmTypeTextConvert" />-->
<SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
<SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
<SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
<SolidColorBrush x:Key="CursorColor" Color="Aqua" />
<SolidColorBrush x:Key="TitleBorderColor" Color="#FF2AB2E7" />

<Style x:Key="TextBlockStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="{StaticResource TextBlockForeground}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>

<Style x:Key="TextBoxStyle" TargetType="TextBox">
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="FontSize" Value="22" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{StaticResource TextBlockForeground}" />
<Setter Property="BorderBrush" Value="#FF23CACA" />
<Setter Property="CaretBrush" Value="Aqua" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>

<Style x:Key="DataTextBlockStyle" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="Red" />
<Setter Property="FontSize" Value="14" />
</Style>

<ControlTemplate x:Key="ButTemplate" TargetType="Button">
<Border
x:Name="br"
Background="Transparent"
BorderBrush="#FF19B7EC"
BorderThickness="2">
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<ContentControl
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
Foreground="{TemplateBinding Foreground}" />
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="br" Property="Background" Value="#2219B7EC" />
</Trigger>

<Trigger Property="IsPressed" Value="true">
<Setter TargetName="br" Property="Background" Value="#2219B7EC" />
</Trigger>

</ControlTemplate.Triggers>
</ControlTemplate>

</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="30" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel
Margin="0,8"
HorizontalAlignment="Right"
Orientation="Horizontal">

<DatePicker
Background="Transparent"
BorderBrush="#aa3aa7f3"
BorderThickness="2"
SelectedDate="{Binding StartDateTime}"
Style="{StaticResource PickerStyle}"
Text="请输入开始时间"
Visibility="{Binding IsVisibility}" />

<DatePicker
Margin="20,0,20,0"
Background="Transparent"
BorderBrush="#aa3aa7f3"
BorderThickness="2"
SelectedDate="{Binding EndDateTime}"
Style="{StaticResource PickerStyle}"
Text="请输入结束时间"
Visibility="{Binding IsVisibility}" />

<Button
Width="140"
Height="30"
Background="#FF19B7EC"
Command="{Binding ControlCommand}"
Content="{Binding ControlButText}"
FontFamily="楷体"
FontSize="18"
Template="{StaticResource ButTemplate}">
<Button.Foreground>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#FFBB662A" />
<GradientStop Offset="1" Color="White" />
</LinearGradientBrush>
</Button.Foreground>
</Button>

<Button
Width="140"
Height="30"
Margin="20,0,0,0"
Background="#FF19B7EC"
Command="{Binding SwitchCommand}"
Content="{Binding ButContent}"
FontFamily="楷体"
FontSize="18"
Template="{StaticResource ButTemplate}">
<Button.Foreground>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#FFBB662A" />
<GradientStop Offset="1" Color="White" />
</LinearGradientBrush>
</Button.Foreground>
</Button>

</StackPanel>

<!--#region 表格标题栏设置-->
<Grid Grid.Row="1" Background="#dd2AB2E7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="ID" />

<Grid Grid.Column="1">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="报警日期" />
<Border
BorderBrush="{StaticResource TitleBorderColor}"
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>

<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="报警时间" />

<Grid Grid.Column="3">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="报警信息" />
<Border
BorderBrush="{StaticResource TitleBorderColor}"
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>

<TextBlock
Grid.Column="4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="报警值" />

<Grid Grid.Column="5">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="报警等级" />
<Border
BorderBrush="{StaticResource TitleBorderColor}"
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>
</Grid>
<!--#endregion-->

<!--#region 表格数据显示-->
<ScrollViewer
Grid.Row="2"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">

<Grid>
<!--#region 实时报警信息-->
<ItemsControl ItemsSource="{Binding AlarmInfos}" Visibility="{Binding CurrentDataVis}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid x:Name="gr" Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="0"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding NumId}" />

<Grid Grid.Column="1">
<TextBlock Style="{StaticResource DataTextBlockStyle}" Text="{Binding Date}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<TextBlock
Grid.Column="2"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding Time}" />

<Grid Grid.Column="3">
<TextBlock
Margin="10,0,0,0"
HorizontalAlignment="Left"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding Info}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<TextBlock
Grid.Column="4"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding Value}" />

<Grid Grid.Column="5">
<TextBlock Style="{StaticResource DataTextBlockStyle}" Text="{Binding Grade}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<Border
Grid.ColumnSpan="6"
BorderBrush="{StaticResource BorderSolid}"
BorderThickness="1" />

</Grid>

<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
</Trigger>
</DataTemplate.Triggers>

</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--#endregion-->

<!--#region 历史报警信息-->
<ItemsControl ItemsSource="{Binding HistoryAlarm}" Visibility="{Binding HistoryDataVis}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid x:Name="gr" Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="0"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding Id}" />

<Grid Grid.Column="1">
<TextBlock Style="{StaticResource DataTextBlockStyle}" Text="{Binding Date}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<TextBlock
Grid.Column="2"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding Time}" />

<Grid Grid.Column="3">
<TextBlock
Margin="10,0,0,0"
HorizontalAlignment="Left"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding Info}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<TextBlock
Grid.Column="4"
Style="{StaticResource DataTextBlockStyle}"
Text="{Binding Value}" />

<Grid Grid.Column="5">
<TextBlock Style="{StaticResource DataTextBlockStyle}" Text="{Binding Grade}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<Border
Grid.ColumnSpan="6"
BorderBrush="{StaticResource BorderSolid}"
BorderThickness="1" />

</Grid>

<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
</Trigger>
</DataTemplate.Triggers>

</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--#endregion-->
</Grid>
</ScrollViewer>
<!--#endregion-->


</Grid>
</UserControl>

+ 0
- 28
BPASmartClient.DosingSystem/View/AlarmRecordView.xaml.cs View File

@@ -1,28 +0,0 @@
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 BPASmartClient.DosingSystem.View
{
/// <summary>
/// AlarmRecordView.xaml 的交互逻辑
/// </summary>
public partial class AlarmRecordView : UserControl
{
public AlarmRecordView()
{
InitializeComponent();
}
}
}

+ 0
- 122
BPASmartClient.DosingSystem/View/ChangeDeviceNameView.xaml View File

@@ -1,122 +0,0 @@
<Window
x:Class="BPASmartClient.DosingSystem.View.ChangeDeviceNameView"
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:local="clr-namespace:BPASmartClient.DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
Title="ChangeDeviceNameView"
Width="400"
Height="200"
AllowsTransparency="True"
Background="{x:Null}"
Topmost="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">

<Window.DataContext>
<vm:ChangeDeviceNameViewModel />
</Window.DataContext>

<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />

<ResourceDictionary>
<!--#region ListBox样式-->
<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontSize" Value="20" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="border" CornerRadius="8">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>

<Border
Name="br"
Background="#FF0B2F5F"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="0.5*" />
<RowDefinition />
</Grid.RowDefinitions>

<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
Background="Transparent"
FontSize="20"
Foreground="#FF2AB2E7"
Text="请输入新设备名称:" />

<TextBox
Grid.Column="1"
Width="200"
Height="30"
Margin="0,0,7,0"
FontSize="16"
Text="{Binding DeviceName}" />

</StackPanel>

<TextBlock
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="Transparent"
FontSize="16"
Foreground="Red"
Text="{Binding ErrorInfo}" />

<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>

<Button
Grid.Column="1"
Width="148"
Height="30"
Margin="0,0,7,0"
Command="{Binding ConfirmCommand}"
Content="确认" />

<Button
Name="btClose"
Width="148"
Height="30"
Command="{Binding CancleCommand}"
Content="取消" />

</Grid>

</Grid>
</Border>

</Window>

+ 0
- 31
BPASmartClient.DosingSystem/View/ChangeDeviceNameView.xaml.cs View File

@@ -1,31 +0,0 @@
using BPASmartClient.Helper;
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.Shapes;

namespace BPASmartClient.DosingSystem.View
{
/// <summary>
/// ChangeDeviceNameView.xaml 的交互逻辑
/// </summary>
public partial class ChangeDeviceNameView : Window
{
public ChangeDeviceNameView()
{
InitializeComponent();
ActionManage.GetInstance.CancelRegister("ChangeDeviceNameViewClose");
ActionManage.GetInstance.Register(new Action(() => { this.Close(); }), "ChangeDeviceNameViewClose");
this.br.MouseLeftButtonDown += (o, e) => { if (e.LeftButton == MouseButtonState.Pressed) this.DragMove(); };
}
}
}

+ 0
- 143
BPASmartClient.DosingSystem/View/DeviceListView.xaml View File

@@ -1,143 +0,0 @@
<UserControl
x:Class="BPASmartClient.DosingSystem.View.DeviceListView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">

<UserControl.DataContext>
<vm:DeviceListViewModel />
</UserControl.DataContext>

<UserControl.Resources>
<Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
<Style.Resources>
<!-- SelectedItem with focus -->
<SolidColorBrush
x:Key="{x:Static SystemColors.HighlightBrushKey}"
Opacity=".4"
Color="White" />
<!-- SelectedItem without focus -->
<SolidColorBrush
x:Key="{x:Static SystemColors.ControlBrushKey}"
Opacity=".4"
Color="White" />
</Style.Resources>
<!-- 设置触发器 -->
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="White" />
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>

<Grid>

<Grid>
<ListView
Grid.Column="1"
Margin="10"
Background="Transparent"
BorderBrush="#00BEFA"
BorderThickness="0"
ItemsSource="{Binding devices}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid
HorizontalAlignment="Left"
VerticalAlignment="Top"
Columns="4" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>

<ListView.ItemTemplate>
<DataTemplate>
<Border
Name="ShadowElement"
Height="150"
VerticalAlignment="Top"
BorderBrush="#00BEFA"
BorderThickness="2"
ClipToBounds="True"
CornerRadius="8">
<Border.Effect>
<DropShadowEffect
BlurRadius="18"
ShadowDepth="0"
Color="#00BEFA" />
</Border.Effect>

<Grid Margin="20,0,20,0">

<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>

<TextBlock
Grid.Row="0"
Grid.ColumnSpan="2"
VerticalAlignment="Bottom"
FontSize="40"
Foreground="#00BEFA"
Text="{Binding DeviceName}" />

<StackPanel
Grid.Row="1"
Grid.ColumnSpan="2"
Orientation="Horizontal">
<TextBlock
Grid.Row="1"
FontSize="14"
Foreground="Aqua"
Text="设备IP:" />
<TextBlock
Grid.Row="1"
FontSize="14"
Foreground="Aqua"
Text="{Binding IpAddress}" />
</StackPanel>

<Button
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="130"
Height="30"
Margin="0,0,0,10"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Command="{Binding DataContext.ChangeNameCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
CommandParameter="{Binding IpAddress}"
Content="修改设备名称"
IsEnabled="{Binding IsEnable}" />


</Grid>
</Border>

</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
</UserControl>

+ 0
- 28
BPASmartClient.DosingSystem/View/DeviceListView.xaml.cs View File

@@ -1,28 +0,0 @@
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 BPASmartClient.DosingSystem.View
{
/// <summary>
/// DeviceListView.xaml 的交互逻辑
/// </summary>
public partial class DeviceListView : UserControl
{
public DeviceListView()
{
InitializeComponent();
}
}
}

+ 0
- 27
BPASmartClient.DosingSystem/View/HardwareStatusView.xaml View File

@@ -1,27 +0,0 @@
<UserControl
x:Class="BPASmartClient.DosingSystem.View.HardwareStatusView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">

<UserControl.DataContext>
<vm:HardwareStatusViewModel />
</UserControl.DataContext>

<Grid>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="40"
Foreground="Wheat"
Text="硬件状态" />
</Grid>
</UserControl>

+ 0
- 28
BPASmartClient.DosingSystem/View/HardwareStatusView.xaml.cs View File

@@ -1,28 +0,0 @@
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 BPASmartClient.DosingSystem.View
{
/// <summary>
/// HardwareStatusView.xaml 的交互逻辑
/// </summary>
public partial class HardwareStatusView : UserControl
{
public HardwareStatusView()
{
InitializeComponent();
}
}
}

+ 0
- 251
BPASmartClient.DosingSystem/View/MainWindow.xaml View File

@@ -1,251 +0,0 @@
<Window
x:Class="BPASmartClient.DosingSystem.View.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.DosingSystem"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
Title="MainWindow"
Width="1300"
Height="800"
AllowsTransparency="True"
Background="{x:Null}"
Topmost="False"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">

<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />

<ResourceDictionary>
<!--#region ListBox样式-->
<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontSize" Value="20" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="border" CornerRadius="8">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>

<Window.DataContext>
<vm:MainViewModel />
</Window.DataContext>

<Border x:Name="br" Style="{DynamicResource border主窗体背景}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition />
</Grid.RowDefinitions>

<!-- 标题 -->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border
Grid.ColumnSpan="2"
Height="52"
VerticalAlignment="Top"
Style="{DynamicResource bordertop矩形}" />
<Border Style="{DynamicResource bordertopL}" />
<Image
Margin="20,0,0,0"
VerticalAlignment="Center"
Style="{DynamicResource imagetop_Title}" />
<Grid Grid.Column="1">

<ListBox
x:Name="lstEnt"
Background="{x:Null}"
BorderBrush="{x:Null}"
BorderThickness="0"
ItemContainerStyle="{StaticResource ResourceKey=ListBoxItemStyle1}"
ItemsSource="{Binding Menus}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton
Command="{Binding DataContext.TogglePag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
CommandParameter="{Binding CommandParameter}"
Content="{Binding MenuName}"
GroupName="all"
Style="{StaticResource MenuRadioButtonStyle}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>

<StackPanel
Grid.Column="4"
Height="50"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Orientation="Horizontal">
<Border Style="{DynamicResource border竖线}" />

<Grid>

<ToggleButton
Name="tb"
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Cursor="Hand"
IsChecked="{Binding UserManagement}"
Style="{DynamicResource StatusBtnStyle网络连接状态}"
ToolTip="用户管理" />

<!-- 当 StaysOpen 设置为 True 时 popup失去焦点的时候不会自动关闭 -->
<Popup
AllowsTransparency="True"
Focusable="False"
IsOpen="{Binding IsChecked, ElementName=tb}"
Placement="Bottom"
PlacementTarget="{Binding ElementName=tb}"
StaysOpen="False">
<Border Background="#081424" ClipToBounds="True">
<Grid Width="100" Margin="0">
<StackPanel Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}">
<Button
Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}"
Margin="0,5,0,1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding PasswordChange}"
Content="密码修改"
Cursor="Hand" />
<Button
Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}"
Margin="0,5,0,1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding Login}"
Content="登录账号"
Cursor="Hand" />
<Button
Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}"
Margin="0,5,0,1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding ExitLogin}"
Content="退出登录"
Cursor="Hand" />
</StackPanel>
</Grid>
</Border>
</Popup>
</Grid>


<Border Style="{DynamicResource border竖线}" />
<ToggleButton
HorizontalAlignment="Center"
VerticalAlignment="Center"
Cursor="Hand"
DataContext="{Binding IsAlarm}"
Style="{DynamicResource StatusBtnStyle告警}"
ToolTip="告警消息" />
<Border Style="{DynamicResource border竖线}" />
<control:DateTimeUI Margin="10,0,10,0" VerticalAlignment="Center" />
<Border Style="{DynamicResource border竖线}" />
<Button
x:Name="ButClose"
Grid.Column="4"
Margin="10,0,20,0"
VerticalAlignment="Center"
Content="退出"
Cursor="Hand"
Style="{DynamicResource CommonBtn_返回}"
ToolTip="退出程序" />

</StackPanel>
</Grid>

<!-- 底部窗体 -->
<Grid Grid.Row="1" Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="45" />
<RowDefinition />
</Grid.RowDefinitions>
<!-- 顶部装饰 -->
<Border
Grid.Row="0"
Grid.RowSpan="2"
Style="{DynamicResource border右下}" />

<Border
Grid.Row="0"
Grid.RowSpan="2"
Style="{DynamicResource border左下}" />

<Border
Grid.Row="0"
Grid.RowSpan="2"
Style="{DynamicResource border右上}" />

<Border
Grid.Row="0"
Grid.RowSpan="2"
Style="{DynamicResource border左上}" />

<Grid Margin="10">
<Border Width="600" Style="{DynamicResource borderFromTitle}" />

<StackPanel Orientation="Horizontal">
<CheckBox
Margin="5,0,5,0"
Content="开机启动"
IsChecked="{Binding AutoStart}" />
</StackPanel>

<TextBlock
x:Name="Title"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="16"
Foreground="#feffff"
Text="{Binding WindowTitleName}" />

</Grid>

<!--#region 底部窗体栏-->
<ContentControl
x:Name="contentRegion"
Grid.Row="1"
Content="{Binding MyWindow}" />
<!--#endregion-->
</Grid>


</Grid>
</Border>
</Window>

+ 0
- 48
BPASmartClient.DosingSystem/View/MainWindow.xaml.cs View File

@@ -1,48 +0,0 @@
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 BPASmartClient.DosingSystem.View
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.ButClose.Click += (o, e) => { this.Close(); };

this.MaxWidth = SystemParameters.WorkArea.Width;
this.MaxHeight = SystemParameters.WorkArea.Height;

this.br.MouseLeftButtonDown += (o, e) =>
{
if (e.ClickCount > 1)
{
if (this.WindowState == WindowState.Maximized)
this.WindowState = WindowState.Normal;
else if (this.WindowState == WindowState.Normal)
this.WindowState = WindowState.Maximized;
}
if (e.LeftButton == MouseButtonState.Pressed) this.DragMove();
};
}




}
}

+ 0
- 222
BPASmartClient.DosingSystem/View/NewRecipeView.xaml View File

@@ -1,222 +0,0 @@
<Window
x:Class="BPASmartClient.DosingSystem.View.NewRecipeView"
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:local="clr-namespace:BPASmartClient.DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
Title="NewRecipeView"
Width="550"
Height="450"
AllowsTransparency="True"
Background="{x:Null}"
Topmost="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">

<Window.DataContext>
<vm:NewRecipeViewModel />
</Window.DataContext>

<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />

<ResourceDictionary>
<!--#region ListBox样式-->
<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontSize" Value="20" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="border" CornerRadius="8">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>

<Border Name="br" BorderThickness="1">
<Border.Background>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="5" />
<RowDefinition />
</Grid.RowDefinitions>

<!--<Button
Name="btClose"
Margin="0,0,5,0"
Padding="10,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Content="X"
FontSize="18"
Foreground="White" />

<Border BorderBrush="#88DDDDDD" BorderThickness="0,0,0,1" />-->

<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>

<TextBlock
Margin="10,0,0,0"
Background="Transparent"
FontSize="20"
Foreground="#FF2AB2E7"
Text="请输入配方名称:" />

<TextBlock
Margin="0,0,10,0"
HorizontalAlignment="Right"
Background="Transparent"
FontSize="16"
Foreground="Red"
Text="{Binding ErrorInfo}" />

<StackPanel
Grid.Row="1"
Margin="10,0,0,0"
Orientation="Horizontal">

<TextBox
Grid.Column="1"
Width="200"
Height="30"
Margin="0,0,7,0"
FontSize="16"
Text="{Binding RecipeName}" />

<Button
Width="148"
Height="30"
Margin="0,0,7,0"
Command="{Binding AddCommand}"
Content="添加原料" Cursor="Hand" />

<Button
Width="80"
Height="30"
Command="{Binding SaveCommand}"
Content="确认" />

<Button
Name="btClose"
Width="80"
Height="30"
Margin="7,0,0,0"
Content="取消" />

</StackPanel>

<ScrollViewer Grid.Row="2" Margin="5">
<ItemsControl ItemsSource="{Binding RawMaterials}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="all">
<RadioButton.Template>
<ControlTemplate TargetType="RadioButton">
<Grid Name="gr" Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>

<ComboBox
Name="cb"
Grid.Column="0"
Margin="3,1"
VerticalAlignment="Center"
BorderBrush="#FF074B92"
BorderThickness="1"
FontFamily="楷体"
FontSize="20"
Foreground="#FF2AB2E7"
IsEditable="False"
ItemsSource="{Binding DataContext.RawMaterialNames, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
SelectedIndex="0"
Style="{StaticResource ComboBoxStyle}"
Text="{Binding RawMaterialName}" />

<!--<TextBox
Name="cb"
Grid.Column="0"
Margin="3,1"
VerticalAlignment="Center"
BorderBrush="#FF074B92"
BorderThickness="1"
FontFamily="楷体"
FontSize="20"
Foreground="#FF2AB2E7"
Text="{Binding RawMaterialName}" />-->
<StackPanel
Grid.Column="1"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBox
Name="tb"
Grid.Column="1"
Width="150"
Height="29"
Margin="3,1"
VerticalAlignment="Center"
FontSize="20"
Text="{Binding RawMaterialWeight}" />

<TextBlock
Grid.Column="1"
Margin="0,0,8,4"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="mg" />

</StackPanel>

<Button
Grid.Column="2"
Margin="10,0,10,0"
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RawMaterialId}"
Content="删除" />

</Grid>


</ControlTemplate>
</RadioButton.Template>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>

</Grid>

</Grid>
</Border>
</Window>

+ 0
- 32
BPASmartClient.DosingSystem/View/NewRecipeView.xaml.cs View File

@@ -1,32 +0,0 @@
using BPASmartClient.Helper;
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.Shapes;

namespace BPASmartClient.DosingSystem.View
{
/// <summary>
/// NewRecipeView.xaml 的交互逻辑
/// </summary>
public partial class NewRecipeView : Window
{
public NewRecipeView()
{
InitializeComponent();
this.btClose.Click += (o, e) => { this.Close(); };
this.br.MouseLeftButtonDown += (o, e) => { if (e.LeftButton == MouseButtonState.Pressed) this.DragMove(); };
ActionManage.GetInstance.CancelRegister("CloseNewRecipeView");
ActionManage.GetInstance.Register(new Action(() => { this.Close(); }), "CloseNewRecipeView");
}
}
}

+ 0
- 188
BPASmartClient.DosingSystem/View/RecipeControlView.xaml View File

@@ -1,188 +0,0 @@
<UserControl
x:Class="BPASmartClient.DosingSystem.View.RecipeControlView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">

<UserControl.DataContext>
<vm:RecipeControlViewModel />
</UserControl.DataContext>

<UserControl.Resources>
<Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
<Style.Resources>
<!-- SelectedItem with focus -->
<SolidColorBrush
x:Key="{x:Static SystemColors.HighlightBrushKey}"
Opacity=".4"
Color="White" />
<!-- SelectedItem without focus -->
<SolidColorBrush
x:Key="{x:Static SystemColors.ControlBrushKey}"
Opacity=".4"
Color="White" />
</Style.Resources>
<!-- 设置触发器 -->
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="White" />
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>

<Grid>

<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
<ItemsControl ItemsSource="{Binding Recipes}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Height="150" VerticalAlignment="Top">
<Border
Name="ShadowElement"
Height="150"
VerticalAlignment="Top"
BorderBrush="#00BEFA"
BorderThickness="2"
ClipToBounds="True"
CornerRadius="8">
<Border.Effect>
<DropShadowEffect
BlurRadius="18"
ShadowDepth="0"
Color="#00BEFA" />
</Border.Effect>
</Border>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>

<Grid Margin="20,0,0,0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
FontSize="40"
Foreground="White"
Text="{Binding RecipeName}" />
<Button
Grid.Row="1"
Width="80"
Height="30"
HorizontalAlignment="Left"
Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RecipeName}"
Content="配方下发"
IsEnabled="{Binding IsEnable}" />
</Grid>

<ListView
Grid.Column="1"
Margin="10"
Background="Transparent"
BorderBrush="#00BEFA"
BorderThickness="2,0,2,0"
ItemsSource="{Binding RawMaterials}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid
HorizontalAlignment="Left"
VerticalAlignment="Top"
Columns="4" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>

<ListView.ItemTemplate>
<DataTemplate>
<StackPanel
Grid.Column="1"
Height="20"
Margin="20,0,0,0"
VerticalAlignment="Top"
Orientation="Horizontal">
<Ellipse
Width="{Binding ElementName=n, Path=ActualHeight}"
Margin="0,0,5,0"
Fill="{Binding RecipeStatus, Converter={StaticResource StatusConverter}}" />
<TextBlock
Name="n"
FontSize="16"
Foreground="White"
Text="{Binding RawMaterialName}" />

</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>

<StackPanel
Grid.Column="2"
Margin="5,0"
VerticalAlignment="Center">
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<Ellipse
Width="{Binding ElementName=tb, Path=ActualHeight}"
Margin="0,0,5,0"
Fill="Green" />
<TextBlock
Name="tb"
Foreground="#ddd"
Text="准备就绪" />
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<Ellipse
Width="{Binding ElementName=tb, Path=ActualHeight}"
Margin="0,0,5,0"
Fill="Yellow" />
<TextBlock
Name="tb1"
Foreground="#ddd"
Text="等待接料" />
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<Ellipse
Width="{Binding ElementName=tb, Path=ActualHeight}"
Margin="0,0,5,0"
Fill="Aqua" />
<TextBlock
Name="tb2"
Foreground="#ddd"
Text="接料完成" />
</StackPanel>
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
<Ellipse
Width="{Binding ElementName=tb, Path=ActualHeight}"
Margin="0,0,5,0"
Fill="Red" />
<TextBlock
Name="tb3"
Foreground="#ddd"
Text="设备异常" />
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</UserControl>

+ 0
- 28
BPASmartClient.DosingSystem/View/RecipeControlView.xaml.cs View File

@@ -1,28 +0,0 @@
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 BPASmartClient.DosingSystem.View
{
/// <summary>
/// RecipeControlView.xaml 的交互逻辑
/// </summary>
public partial class RecipeControlView : UserControl
{
public RecipeControlView()
{
InitializeComponent();
}
}
}

+ 0
- 246
BPASmartClient.DosingSystem/View/RecipeSettingsView.xaml View File

@@ -1,246 +0,0 @@
<UserControl
x:Class="BPASmartClient.DosingSystem.View.RecipeSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">

<UserControl.Resources>
<SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
<SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
<SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
<SolidColorBrush x:Key="CursorColor" Color="Aqua" />
<SolidColorBrush x:Key="TitleBorderColor" Color="#FF2AB2E7" />
<SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />

<Style x:Key="TextBlockStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Background" Value="Transparent" />
<!--<Setter Property="Foreground" Value="{StaticResource FontColor}" />-->
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>

<Style x:Key="buttonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Foreground" Value="Aqua" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="BorderThickness" Value="0" />
</Style>

</UserControl.Resources>

<UserControl.DataContext>
<vm:RecipeSettingsViewModel />
</UserControl.DataContext>

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="30" />
<RowDefinition />
</Grid.RowDefinitions>

<!--#region 操作按钮-->
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<pry:IcoButton
Grid.Column="3"
Width="140"
Margin="10"
HorizontalAlignment="Left"
Command="{Binding NewRecipe}"
Content="新建配方"
FontSize="16"
Foreground="Aqua"
IcoText="&#xe626;"
Style="{StaticResource NewButtonStyle}" />

<pry:IcoButton
Grid.Column="3"
Width="140"
Margin="10"
HorizontalAlignment="Left"
Command="{Binding SaveRecipe}"
Content="保存配方"
EnableColor="#FFB7B7B7"
FontSize="17"
Foreground="Aqua"
IcoText="&#xe936;"
IsEnabled="True"
Style="{StaticResource NewButtonStyle}" />
</StackPanel>
<!--#endregion-->

<!--#region 表格标题栏设置-->
<!--<Grid Grid.Row="1" Background="#dd2AB2E7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*" />
<ColumnDefinition />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="序号" />

<Grid Grid.Column="1">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="配方名称" />
<Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
</Grid>

<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="编码" />

<Grid Grid.Column="3">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="结束时间" />
<Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
</Grid>

<Grid Grid.Column="5">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="制作状态" />
<Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="0,0,1,0" />
</Grid>

<TextBlock
Grid.Column="6"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="完成时间" />

</Grid>-->
<!--#endregion-->

<!--#region 表格数据显示-->
<ScrollViewer
Grid.Row="2"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ItemsControl ItemsSource="{Binding Recipes}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton Background="Transparent" GroupName="all">
<RadioButton.Template>
<ControlTemplate TargetType="RadioButton">

<Grid Name="gr" Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*" />
<ColumnDefinition />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0" />
<ColumnDefinition Width="0.7*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="0"
Foreground="#ff00ccff"
Style="{StaticResource TextBlockStyle}"
Text="{Binding SerialNum}" />

<Grid Grid.Column="1">
<TextBlock
Margin="5,0,0,0"
HorizontalAlignment="Left"
Foreground="#ff00ccff"
Style="{StaticResource TextBlockStyle}"
Text="{Binding RecipeName}" />
</Grid>


<TextBlock
Grid.Column="2"
Foreground="#ff00ccff"
Style="{StaticResource TextBlockStyle}"
Text="{Binding RecipCode}" />

<!--<Grid Grid.Column="3">

<Button
Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RecipCode}"
Content="编辑"
Style="{StaticResource buttonStyle}" />
</Grid>-->


<Grid Grid.Column="5">
<Button
Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RecipCode}"
Content="详情"
Style="{StaticResource buttonStyle}" />
</Grid>

<Grid Grid.Column="6">
<Button
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RecipCode}"
Content="删除"
Style="{StaticResource buttonStyle}" />
</Grid>

</Grid>

<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="gr" Property="Background" Value="#3300ccff" />
</Trigger>

<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="gr" Property="Background" Value="#3300ccff" />
</Trigger>

</ControlTemplate.Triggers>
</ControlTemplate>
</RadioButton.Template>
</RadioButton>


</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<!--#endregion-->
</Grid>
</UserControl>

+ 0
- 28
BPASmartClient.DosingSystem/View/RecipeSettingsView.xaml.cs View File

@@ -1,28 +0,0 @@
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 BPASmartClient.DosingSystem.View
{
/// <summary>
/// RecipeSettingsView.xaml 的交互逻辑
/// </summary>
public partial class RecipeSettingsView : UserControl
{
public RecipeSettingsView()
{
InitializeComponent();
}
}
}

+ 0
- 18
BPASmartClient.DosingSystem/ViewModel/AlarmRecordViewModel.cs View File

@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;
using System.Windows;
using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.Input;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class AlarmRecordViewModel : ObservableObject
{
}
}

+ 0
- 71
BPASmartClient.DosingSystem/ViewModel/ChangeDeviceNameViewModel.cs View File

@@ -1,71 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BPASmartClient.Helper;
using BPASmartClient.DosingSystem.Model;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using Microsoft.Toolkit.Mvvm.Input;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class ChangeDeviceNameViewModel : ObservableObject
{
public ChangeDeviceNameViewModel()
{
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
if (o != null && o is string str) IpAddress = str;
}), "ChangeDeviceNameViewOpen");

CancleCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); });
ConfirmCommand = new RelayCommand(() =>
{
if (string.IsNullOrEmpty(DeviceName))
{
ErrorInfo = "设备名称不能为空";
return;
}
int index = Array.FindIndex(DeviceListViewModel.devices.ToArray(), p => p.IpAddress == IpAddress);
if (index >= 0 && index < DeviceListViewModel.devices.Count)
{
if (DeviceListViewModel.devices.FirstOrDefault(p => p.DeviceName == DeviceName) != null)
ErrorInfo = "设备名称已存在";
else
{
NewRecipeViewModel.RawMaterialNames.Remove(DeviceListViewModel.devices.ElementAt(index).DeviceName);
NewRecipeViewModel.RawMaterialNames.Add(DeviceName);
DeviceListViewModel.devices.ElementAt(index).DeviceName = DeviceName;

DeviceInquire.GetInstance.GetDevice(IpAddress).SetDeviceName(DeviceName);//设置PLC名称
for (int i = 0; i < Json<LocaPar>.Data.Recipes.Count; i++)
{
for (int m = 0; m < Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.Count; m++)
{
Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.ElementAt(m).RawMaterialName = DeviceName;
}
}
ActionManage.GetInstance.Send("ChangeDeviceNameViewClose");
}
}

});
}

private static string IpAddress = string.Empty;

public RelayCommand ConfirmCommand { get; set; }

public RelayCommand CancleCommand { get; set; }


public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } }
private string _mErrorInfo;


public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
private string _mDeviceName;

}
}

+ 0
- 45
BPASmartClient.DosingSystem/ViewModel/DeviceListViewModel.cs View File

@@ -1,45 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;
using System.Windows;
using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.Input;
using BPASmartClient.DosingSystem.View;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class DeviceListViewModel : ObservableObject
{
public DeviceListViewModel()
{
ChangeNameCommand = new RelayCommand<object>((o) =>
{
if (o != null && o is string str)
{
ChangeDeviceNameView cdn = new ChangeDeviceNameView();
ActionManage.GetInstance.Send("ChangeDeviceNameViewOpen", str);
cdn.ShowDialog();
}
});
}

public RelayCommand<object> ChangeNameCommand { get; set; }

public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>();
}

public class Devices : ObservableObject
{
public string IpAddress { get { return _mIpAddress; } set { _mIpAddress = value; OnPropertyChanged(); } }
private string _mIpAddress;

public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
private string _mDeviceName;

}
}

+ 0
- 18
BPASmartClient.DosingSystem/ViewModel/HardwareStatusViewModel.cs View File

@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;
using System.Windows;
using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.Input;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class HardwareStatusViewModel : ObservableObject
{
}
}

+ 0
- 161
BPASmartClient.DosingSystem/ViewModel/MainViewModel.cs View File

@@ -1,161 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;
using System.Windows;
using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.Input;
using BPASmartClient.DosingSystem.Model;
using Newtonsoft.Json;
using System.IO;
using System.Reflection;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class MainViewModel : ObservableObject
{
//ObservableCollection<ActionMenu> menus = new ObservableCollection<ActionMenu>();

//private Permission _permission;
//public Permission permission
//{
// get { return _permission; }
// set
// {
// var res = menus.Where(p => Array.FindIndex(p.permission, s => s == value) >= 0).ToList();
// if (res != null && res.Count > 0)
// {
// Menus.Clear();
// res.ForEach((item) => { Menus.Add(item); });
// }
// _permission = value;
// }
//}


public MainViewModel()
{
//Json<LocaPar>.Read();
TogglePag = new RelayCommand<object>(DoNavChanged);
Login = new RelayCommand(() => { DoNavChanged("BPASmartClient.DosingSystem.View.AdminstratorsView_用户登录"); UserManagement = false; });
PasswordChange = new RelayCommand(() =>
{
//DoNavChanged("PasswordChangeView.密码修改");
UserManagement = false;
});
ExitLogin = new RelayCommand(() =>
{
//SystemUtils.ShowScreenKeyboard();
//DoNavChanged("LoginView.退出登录");
UserManagement = false;
});
//Config.GetInstance.Init();
LoginRegister();
MenuInit();
//permission = Permission.管理员;
//if (Menus.Count > 0) DoNavChanged(Menus.ElementAt(0).CommandParameter);
DeviceInquire.GetInstance.Init();

}

private void LoginRegister()
{
ActionManage.GetInstance.Register(new Func<object, object>((o) =>
{
//if (o != null && o is string str)
//{
// var strs = str.Split("-=");
// if (strs != null && strs.Length == 3)
// {
// var us = Global.userManager.userInfos.FirstOrDefault(p => p.UserName == strs[0]);
// if (us != null && strs[1] == us.Password && strs[2] == us.permission.ToString())
// {
// permission = us.permission;
// return string.Empty;
// }
// }
//}
return "用户名或密码错误";
}), "LoginBPASmartClient.DosingSystem");
}

private void MenuInit()
{
//menus.Add(new ActionMenu()
//{
// MenuName = "配方设置",
// CommandParameter = "BPASmartClient.DosingSystem.View.RecipeSettingsView_配方设置",
// permission = new Permission[] { Permission.管理员, Permission.技术员 },
//});
//menus.Add(new ActionMenu()
//{
// MenuName = "设备列表",
// CommandParameter = "BPASmartClient.DosingSystem.View.DeviceListView_设备列表",
// permission = new Permission[] { Permission.管理员, Permission.技术员 },
//});
//menus.Add(new ActionMenu()
//{
// MenuName = "硬件状态",
// CommandParameter = "BPASmartClient.DosingSystem.View.HardwareStatusView_硬件状态",
// permission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
//});
//menus.Add(new ActionMenu()
//{
// MenuName = "报警记录",
// CommandParameter = "BPASmartClient.CustomResource.Pages.View.AlarmView_报警记录",
// permission = new Permission[] { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 },
//});
//menus.Add(new ActionMenu()
//{
// MenuName = "配方下发",
// CommandParameter = "BPASmartClient.DosingSystem.View.RecipeControlView_配方控制",
// permission = new Permission[] { Permission.管理员, Permission.操作员 },
//});
}

public void DoNavChanged(object obj)
{
if (obj != null && obj is string stobj)
{
var strs = stobj.Split('_');
if (strs != null && strs.Length == 2)
{
Type type;
if (!stobj.Contains("BPASmartClient.DosingSystem"))
{
type = Assembly.Load("BPASmartClient.CustomResource").GetType(strs[0]);
}
else type = Type.GetType(strs[0]);
var res = type?.GetConstructor(System.Type.EmptyTypes)?.Invoke(null);
if (res != null && res is FrameworkElement fe) MyWindow = fe;
WindowTitleName = strs[1];
}
}
}

public RelayCommand<object> TogglePag { get; set; }

public RelayCommand Login { get; set; }

public RelayCommand PasswordChange { get; set; }

public RelayCommand ExitLogin { get; set; }

public ObservableCollection<ActionMenu> Menus { get; set; } = new ObservableCollection<ActionMenu>();

public FrameworkElement MyWindow { get { return _mMyWindow; } set { _mMyWindow = value; OnPropertyChanged(); } }
private FrameworkElement _mMyWindow;

public string WindowTitleName { get { return _mWindowTitleName; } set { _mWindowTitleName = value; OnPropertyChanged(); } }
private string _mWindowTitleName;

public bool UserManagement { get { return _mUserManagement; } set { _mUserManagement = value; OnPropertyChanged(); } }
private bool _mUserManagement;

public bool AutoStart { get { return SystemHelper.GetInstance.IsAutoStart(); } set { SystemHelper.GetInstance.AutoStart(value); OnPropertyChanged(); } }
}
}

+ 0
- 131
BPASmartClient.DosingSystem/ViewModel/NewRecipeViewModel.cs View File

@@ -1,131 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Collections.ObjectModel;
using Microsoft.Toolkit.Mvvm.Input;
using BPASmartClient.Helper;
using BPASmartClient.DosingSystem.Model;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class NewRecipeViewModel : ObservableObject
{
public NewRecipeViewModel()
{
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
if (o != null && o is RecipeModel rm)
{
RecipeName = rm.RecipeName;
foreach (var item in rm.RawMaterials)
{
RawMaterials.Add(item);
}
RecipCode = rm.RecipCode;
}
}), "Details");

AddCommand = new RelayCommand(() =>
{
p:
string guid = Guid.NewGuid().ToString();
if (RawMaterials.FirstOrDefault(p => p.RawMaterialId == guid) == null)
{
RawMaterials.Add(new RawMaterialModel()
{
RawMaterialId = guid
});
}
else goto p;
});

RemoveCommand = new RelayCommand<object>((obj) =>
{
if (obj is string rm)
{
var res = RawMaterials.FirstOrDefault(p => p.RawMaterialId == rm);
if (res != null) RawMaterials.Remove(res);
}
});

SaveCommand = new RelayCommand(() =>
{
for (int i = 0; i < RawMaterials.Count; i++)
{
var res = DeviceListViewModel.devices.FirstOrDefault(p => p.DeviceName == RawMaterials.ElementAt(i).RawMaterialName);
if (res != null) RawMaterials.ElementAt(i).DeviceIp = res.IpAddress;
}

if (RecipCode.Length <= 0)
{
var res = Array.FindIndex(Json<LocaPar>.Data.Recipes.ToArray(), p => p.RecipeName == RecipeName);

if (res >= 0 && res < Json<LocaPar>.Data.Recipes.Count)
{
ErrorInfo = "该配方已存在,请重新输入";
}
else
{
AddRecipes();
}
}
else
{
var res = Array.FindIndex(Json<LocaPar>.Data.Recipes.ToArray(), p => p.RecipCode == RecipCode);
if (res >= 0 && res < Json<LocaPar>.Data.Recipes.Count)
{
Json<LocaPar>.Data.Recipes.ElementAt(res).RecipeName = RecipeName;
Json<LocaPar>.Data.Recipes.ElementAt(res).RawMaterials.Clear();
foreach (var item in RawMaterials)
{
Json<LocaPar>.Data.Recipes.ElementAt(res).RawMaterials.Add(item);
}
}
}

ActionManage.GetInstance.Send("CloseNewRecipeView");
});
}

private void AddRecipes()
{
string date = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss");
var dates = date.Split("-").ToList();
StringBuilder sb = new StringBuilder();
dates?.ForEach((item) => { sb.Append(item); });
Json<LocaPar>.Data.Recipes.Add(new RecipeModel()
{
SerialNum = Json<LocaPar>.Data.Recipes.Count + 1,
RawMaterials = RawMaterials,
RecipCode = sb.ToString(),
RecipeName = RecipeName,
});
}

static NewRecipeViewModel()
{
RawMaterialNames.Clear();
}

private string RecipCode = string.Empty;

public string RecipeName { get { return _mRecipeName; } set { _mRecipeName = value; OnPropertyChanged(); } }
private string _mRecipeName;

public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } }
private string _mErrorInfo;

public RelayCommand AddCommand { get; set; }

public RelayCommand<object> RemoveCommand { get; set; }

public RelayCommand SaveCommand { get; set; }

public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel>();

public static ObservableCollection<string> RawMaterialNames { get; set; } = new ObservableCollection<string>();
}
}

+ 0
- 92
BPASmartClient.DosingSystem/ViewModel/RecipeControlViewModel.cs View File

@@ -1,92 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;
using System.Windows;
using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.Input;
using BPASmartClient.DosingSystem.Model;
using System.Threading;
using BPASmartClient.CustomResource.Pages.Model;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class RecipeControlViewModel : ObservableObject
{
ConcurrentQueue<string> devices = new ConcurrentQueue<string>();

public RecipeControlViewModel()
{
Recipes = Json<LocaPar>.Data.Recipes;
StartCommand = new RelayCommand<object>((o) =>
{
//if (o != null && o is string deviceName)
//{
// int index = Array.FindIndex(Recipes.ToArray(), p => p.RecipeName == deviceName);
// if (index >= 0 && index < Recipes.Count)
// {
// Recipes.ElementAt(index).IsEnable = false;
// }
// MessageLog.GetInstance.ShowUserLog($"下发工单 { Recipes.ElementAt(index).RecipeName}");
// devices.Enqueue(deviceName);
//}

MessageLog.GetInstance.ShowUserLog($"下发工单 { Guid.NewGuid().ToString()}");
});


ThreadManage.GetInstance().StartLong(new Action(() =>
{
if (devices.Count > 0)
{
int index = Array.FindIndex(Recipes.ToArray(), p => p.RecipeName == devices.ElementAt(0));
if (index >= 0 && index < Recipes.Count)
{
Recipes.ElementAt(index).Are.Reset();
Recipes.ElementAt(index).IsEnable = false;
foreach (var item in Recipes.ElementAt(index).RawMaterials)
{
DeviceInquire.GetInstance.GetDevice(item.DeviceIp)?.Start(item.RawMaterialWeight);//启动写入
}
Recipes.ElementAt(index).Are.WaitOne();
devices.TryDequeue(out string deviceName);
}

}
Thread.Sleep(100);
}), "启动配发下发");


ThreadManage.GetInstance().StartLong(new Action(() =>
{
for (int i = 0; i < Recipes.Count; i++)
{
for (int m = 0; m < Recipes.ElementAt(i).RawMaterials.Count; m++)
{
var RunStatus = DeviceInquire.GetInstance.GetDevice(Recipes.ElementAt(i).RawMaterials.ElementAt(m).DeviceIp).deviceStatus.RunStatus;
Recipes.ElementAt(i).RawMaterials.ElementAt(m).RecipeStatus = RunStatus;
var res = Recipes.ElementAt(i).RawMaterials.Where(p => p.RecipeStatus == 3).ToList();
if (res != null && res.Count == Recipes.ElementAt(i).RawMaterials.Count)
{
for (int r = 0; r < Recipes.ElementAt(i).RawMaterials.Count; r++)
{
DeviceInquire.GetInstance.GetDevice(Recipes.ElementAt(i).RawMaterials.ElementAt(r).DeviceIp).StatusReset();
}
Recipes.ElementAt(i).IsEnable = true;
Recipes.ElementAt(i).Are.Set();
}
}
}
Thread.Sleep(100);
}), "RecipeControlViewModelStatusInquire");

}

public RelayCommand<object> StartCommand { get; set; }
public ObservableCollection<RecipeModel> Recipes { get; set; }
}
}

+ 0
- 63
BPASmartClient.DosingSystem/ViewModel/RecipeSettingsViewModel.cs View File

@@ -1,63 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Collections.Concurrent;
using System.Collections.ObjectModel;
using System.Windows;
using BPASmartClient.Helper;
using Microsoft.Toolkit.Mvvm.Input;
using BPASmartClient.DosingSystem.Model;
using BPASmartClient.DosingSystem.View;

namespace BPASmartClient.DosingSystem.ViewModel
{
public class RecipeSettingsViewModel : ObservableObject
{
public RecipeSettingsViewModel()
{
//Json<LocaPar>.Read();
Recipes = Json<LocaPar>.Data.Recipes;
NewRecipe = new Action(() =>
{
NewRecipeView nrv = new NewRecipeView();
nrv.ShowDialog();
});
SaveRecipe = new Action(() => { Json<LocaPar>.Save(); });
RemoveCommand = new RelayCommand<object>((o) =>
{
if (o is string str)
{
var res = Json<LocaPar>.Data.Recipes.FirstOrDefault(p => p.RecipCode == str);
if (res != null) Json<LocaPar>.Data.Recipes.Remove(res);
}
});

DetailsCommand = new RelayCommand<object>((o) =>
{
if (o != null && o is string str)
{
ActionManage.GetInstance.CancelRegister("Details");
NewRecipeView nrv = new NewRecipeView();
ActionManage.GetInstance.Send("Details", Json<LocaPar>.Data.Recipes.FirstOrDefault(p => p.RecipCode == str));
nrv.ShowDialog();

}
});
}

public Action NewRecipe { get; set; }

public Action SaveRecipe { get; set; }

public RelayCommand<object> EditCommand { get; set; }

public RelayCommand<object> DetailsCommand { get; set; }

public RelayCommand<object> RemoveCommand { get; set; }

public ObservableCollection<RecipeModel> Recipes { get; set; }
}
}

+ 0
- 79
BPASmartClient.DosingSystem/app.manifest View File

@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 清单选项
如果想要更改 Windows 用户帐户控制级别,请使用
以下节点之一替换 requestedExecutionLevel 节点。

<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />

指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
元素。
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
Windows 版本的列表。取消评论适当的元素,
Windows 将自动选择最兼容的环境。 -->

<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->

<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->

<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->

<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->

<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->

</application>
</compatibility>

<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->

<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->

</assembly>

BIN
View File


+ 23
- 7
FryPot_DosingSystem/App.xaml.cs View File

@@ -1,9 +1,12 @@
using BPASmartClient.CustomResource.Pages.Enums;
using BPASmartClient.AGV.Feedback;
using BPASmartClient.CustomResource.Pages.Enums;
using BPASmartClient.CustomResource.Pages.Model;
using BPASmartClient.CustomResource.Pages.View;
using BPASmartClient.Helper;
using BPASmartClient.HubHelper;
using FryPot_DosingSystem.Control;
using FryPot_DosingSystem.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -38,6 +41,19 @@ namespace FryPot_DosingSystem
else
mv.Close();


HubHelper.GetInstance.Report = new Action<object>((o) =>
{
var res = JsonConvert.DeserializeObject<AGVToUpSystem>(o.ToString());
});

HubHelper.GetInstance.Upstreamrequest = new Action<object>((o) =>
{
var res = JsonConvert.DeserializeObject<Upstreamrequest>(o.ToString());
});

HubHelper.GetInstance.Connect("192.168.1.99", 8089);

}
protected override void OnExit(ExitEventArgs e)
{
@@ -52,7 +68,7 @@ namespace FryPot_DosingSystem
RecipeManage.Add(new SubMenumodel()
{
SubMenuName = "配方管理",
SubMenuPermission = new Permission[] { Permission.管理员,Permission.技术员 },
SubMenuPermission = new Permission[] { Permission.管理员, Permission.技术员 },
AssemblyName = "FryPot_DosingSystem",
ToggleWindowPath = "View.RecipeSetView"
});
@@ -60,7 +76,7 @@ namespace FryPot_DosingSystem
RecipeManage.Add(new SubMenumodel()
{
SubMenuName = "配方下发",
SubMenuPermission = new Permission[] { Permission.操作员,Permission.管理员,Permission.技术员 },
SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员, Permission.技术员 },
AssemblyName = "FryPot_DosingSystem",
ToggleWindowPath = "View.RecipeSendDownView"
});
@@ -70,7 +86,7 @@ namespace FryPot_DosingSystem
MainMenuIcon = "&#xe683;",
MainMenuName = "配方管理",
Alias = "Recipe Management",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员,Permission.技术员 },
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 },
subMenumodels = RecipeManage,
});
#endregion
@@ -124,10 +140,10 @@ namespace FryPot_DosingSystem
DeviceMonitor.Add(new SubMenumodel()
{
SubMenuName = "滚筒线运行状态",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员,Permission.观察员 },
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员, Permission.观察员 },
AssemblyName = "FryPot_DosingSystem",
ToggleWindowPath = "View.HardWareStatusView"
});


@@ -136,7 +152,7 @@ namespace FryPot_DosingSystem
MainMenuIcon = "&#xe603;",
MainMenuName = "设备监控",
Alias = "Device Monitor",
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员,Permission.观察员 },
MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员, Permission.观察员 },
subMenumodels = DeviceMonitor,
});
#endregion


+ 19
- 19
FryPot_DosingSystem/Control/DosingLogicControl.cs View File

@@ -85,20 +85,20 @@ namespace FryPot_DosingSystem.Control
{
string strData = Encoding.UTF8.GetString(datas);
object objData = JsonConvert.DeserializeObject(strData);
if (objData != null && objData is UpStreamrequest upDownReportData)
if (objData != null && objData is Upstreamrequest upDownReportData)
{
if (upDownReportData.body != null && upDownReportData.body is UpstreamrequestBody body)
{
if (body.robotJobId == robotJobId && body.command == "LOAD")//同一任务号且处于上料阶段
{
agvArriveUpLoad = true;//AGV到达上料位置
}
if (body.robotJobId == robotJobId && body.command == "UNLOAD")//同一任务号且处于下料阶段
{
agvArriveUnLoad = true;//AGV到达下料位置
}
//if (upDownReportData.body != null && upDownReportData.body is UpstreamrequestBody body)
//{
// if (body.robotJobId == robotJobId && body.command == "LOAD")//同一任务号且处于上料阶段
// {
// agvArriveUpLoad = true;//AGV到达上料位置
// }
// if (body.robotJobId == robotJobId && body.command == "UNLOAD")//同一任务号且处于下料阶段
// {
// agvArriveUnLoad = true;//AGV到达下料位置
// }

}
//}
}
}
}
@@ -115,13 +115,13 @@ namespace FryPot_DosingSystem.Control
object objData = JsonConvert.DeserializeObject(strData);
if (objData != null && objData is AGVToUpSystem agvUpReportData)
{
if (agvUpReportData.body != null && agvUpReportData.body is AGVToUpSystemBody body)
{
if (body.state == "ROLLER_LOAD_FINISH" && body.jobData.startPointCode == "")//上料完成以及到达指定上料点位
{
agvFryPotEmptyRollerArrive = true;
}
}
//if (agvUpReportData.body != null && agvUpReportData.body is AGVToUpSystemBody body)
//{
// if (body.state == "ROLLER_LOAD_FINISH" && body.jobData.startPointCode == "")//上料完成以及到达指定上料点位
// {
// agvFryPotEmptyRollerArrive = true;
// }
//}
}
}
}


+ 1
- 1
FryPot_DosingSystem/View/MainWindow.xaml.cs View File

@@ -37,7 +37,7 @@ namespace FryPot_DosingSystem.View

HubHelper.GetInstance.Upstreamrequest = new Action<object>((o) =>
{
var res = JsonConvert.DeserializeObject<UpStreamrequest>(o.ToString());
var res = JsonConvert.DeserializeObject<Upstreamrequest>(o.ToString());
});

HubHelper.GetInstance.Connect("192.168.1.56", 8089);


+ 0
- 7
HubHelper/HubHelper.cs View File

@@ -1,7 +0,0 @@
namespace HubHelper
{
public class HubHelper
{

}
}

+ 0
- 9
HubHelper/HubHelper.csproj View File

@@ -1,9 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>

+ 113
- 45
SmartClient.sln View File

@@ -106,9 +106,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkT_BarCou
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkT_Container", "BPASmartClient.MorkT_Container\BPASmartClient.MorkT_Container.csproj", "{1BFE3DEE-D57A-4497-9CFA-7FF8EEA1B883}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FryPot_DosingSystem", "FryPot_DosingSystem\FryPot_DosingSystem.csproj", "{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.AgvApi", "BPASmartClient.AgvApi\BPASmartClient.AgvApi.csproj", "{8B1C64F3-A52C-480F-8262-50F824136CF3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.HubHelper", "BPASmartClient.HubHelper\BPASmartClient.HubHelper.csproj", "{D3710B72-AC52-44CB-AD70-29055BB14419}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FryPot_DosingSystem", "FryPot_DosingSystem\FryPot_DosingSystem.csproj", "{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ZhuoDian", "BPASmartClient.ZhuoDian\BPASmartClient.ZhuoDian.csproj", "{E7168B03-68E5-4285-BB95-5660F877577A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestDemo", "TestDemo\TestDemo.csproj", "{A49E1C5A-9489-451C-9CE6-CEA586234B84}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.HubHelper", "BPASmartClient.HubHelper\BPASmartClient.HubHelper.csproj", "{099E047C-F40E-47A3-A5BA-81FC1500D5E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -984,46 +990,106 @@ Global
{1BFE3DEE-D57A-4497-9CFA-7FF8EEA1B883}.Release|x64.Build.0 = Release|Any CPU
{1BFE3DEE-D57A-4497-9CFA-7FF8EEA1B883}.Release|x86.ActiveCfg = Release|Any CPU
{1BFE3DEE-D57A-4497-9CFA-7FF8EEA1B883}.Release|x86.Build.0 = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|ARM.Build.0 = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|ARM64.Build.0 = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|x64.ActiveCfg = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|x64.Build.0 = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|x86.ActiveCfg = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Debug|x86.Build.0 = Debug|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|Any CPU.Build.0 = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|ARM.ActiveCfg = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|ARM.Build.0 = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|ARM64.ActiveCfg = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|ARM64.Build.0 = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|x64.ActiveCfg = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|x64.Build.0 = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|x86.ActiveCfg = Release|Any CPU
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A}.Release|x86.Build.0 = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|ARM.Build.0 = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|ARM64.Build.0 = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|x64.ActiveCfg = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|x64.Build.0 = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|x86.ActiveCfg = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Debug|x86.Build.0 = Debug|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|Any CPU.Build.0 = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|ARM.ActiveCfg = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|ARM.Build.0 = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|ARM64.ActiveCfg = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|ARM64.Build.0 = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|x64.ActiveCfg = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|x64.Build.0 = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|x86.ActiveCfg = Release|Any CPU
{D3710B72-AC52-44CB-AD70-29055BB14419}.Release|x86.Build.0 = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|ARM.Build.0 = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|ARM64.Build.0 = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|x64.ActiveCfg = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|x64.Build.0 = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|x86.ActiveCfg = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Debug|x86.Build.0 = Debug|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|Any CPU.Build.0 = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|ARM.ActiveCfg = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|ARM.Build.0 = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|ARM64.ActiveCfg = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|ARM64.Build.0 = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|x64.ActiveCfg = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|x64.Build.0 = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|x86.ActiveCfg = Release|Any CPU
{8B1C64F3-A52C-480F-8262-50F824136CF3}.Release|x86.Build.0 = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|ARM.ActiveCfg = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|ARM.Build.0 = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|ARM64.Build.0 = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|x64.Build.0 = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|x86.ActiveCfg = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Debug|x86.Build.0 = Debug|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|Any CPU.Build.0 = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|ARM.ActiveCfg = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|ARM.Build.0 = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|ARM64.ActiveCfg = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|ARM64.Build.0 = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|x64.ActiveCfg = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|x64.Build.0 = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|x86.ActiveCfg = Release|Any CPU
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|x86.Build.0 = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM.Build.0 = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM64.Build.0 = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x64.ActiveCfg = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x64.Build.0 = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x86.ActiveCfg = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x86.Build.0 = Debug|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|Any CPU.Build.0 = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM.ActiveCfg = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM.Build.0 = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM64.ActiveCfg = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM64.Build.0 = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|x64.ActiveCfg = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|x64.Build.0 = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|x86.ActiveCfg = Release|Any CPU
{E7168B03-68E5-4285-BB95-5660F877577A}.Release|x86.Build.0 = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM.ActiveCfg = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM.Build.0 = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM64.Build.0 = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x64.ActiveCfg = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x64.Build.0 = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x86.ActiveCfg = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x86.Build.0 = Debug|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|Any CPU.Build.0 = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM.ActiveCfg = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM.Build.0 = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM64.ActiveCfg = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM64.Build.0 = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x64.ActiveCfg = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x64.Build.0 = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x86.ActiveCfg = Release|Any CPU
{A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x86.Build.0 = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|ARM.ActiveCfg = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|ARM.Build.0 = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|ARM64.Build.0 = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|x64.ActiveCfg = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|x64.Build.0 = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|x86.ActiveCfg = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|x86.Build.0 = Debug|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|Any CPU.Build.0 = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|ARM.ActiveCfg = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|ARM.Build.0 = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|ARM64.ActiveCfg = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|ARM64.Build.0 = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x64.ActiveCfg = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x64.Build.0 = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x86.ActiveCfg = Release|Any CPU
{099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1037,7 +1103,6 @@ Global
{2344EB60-1760-4DF0-961A-FA5BE5BC47CC} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{202763AA-4C4C-4738-B530-93A9A1ECE578} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{13C86146-CD3C-4CD3-AB7F-7A155E222832} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{9FB27073-61A0-4FE3-94DB-5FDDE062332F} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD}
{0827FA85-8180-4A85-BE58-9483AC4BB3BA} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{8878BCFD-AC5E-4D84-8C63-CA99DDE036EE} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{B399BCFF-82E8-4940-9CE5-B7DCDDFDC696} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
@@ -1073,8 +1138,11 @@ Global
{F61AC179-156D-4075-BFEB-355862231F48} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD}
{048FED78-4BFA-4FCD-8FF2-905E9CA4D7DD} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{1BFE3DEE-D57A-4497-9CFA-7FF8EEA1B883} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{D5134D5F-EDBA-4758-80AD-3D13EAE3D60A} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{D3710B72-AC52-44CB-AD70-29055BB14419} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{8B1C64F3-A52C-480F-8262-50F824136CF3} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{E7168B03-68E5-4285-BB95-5660F877577A} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{A49E1C5A-9489-451C-9CE6-CEA586234B84} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{099E047C-F40E-47A3-A5BA-81FC1500D5E8} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


+ 2
- 2
TestDemo/Form1.cs View File

@@ -16,7 +16,7 @@ namespace TestDemo
{
AGVToUpSystem aGVToUpSystem = new AGVToUpSystem();
string value = JsonConvert.SerializeObject(aGVToUpSystem);
string url = $"http://192.168.1.56:8089/apicallback/quicktron/robotjob/report?sign={value}";
string url = $"http://192.168.1.99:8089/apicallback/quicktron/robotjob/report?sign={value}";
var res = APIHelper.GetInstance.HttpRequest(url, "", aGVToUpSystem, RequestType.POST);
}

@@ -25,7 +25,7 @@ namespace TestDemo

Upstreamrequest aGVToUpSystem = new Upstreamrequest();
string value = JsonConvert.SerializeObject(aGVToUpSystem);
string url = $"http://192.168.1.56:8089/apicallback/quicktron/robotjob/upstreamrequest?sign={value}";
string url = $"http://192.168.1.99:8089/apicallback/quicktron/robotjob/upstreamrequest?sign={value}";
var res = APIHelper.GetInstance.HttpRequest(url, "", aGVToUpSystem, RequestType.POST);
}
}

Loading…
Cancel
Save