1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using FLY.OBJComponents.Client;
using FLY.OBJComponents.Common;
using FLY.OBJComponents.IService;
using FLY.Thick.Base.UI;
using FLY.Thick.Base.UI.UiModule;
using FLY.Weight.Client;
using FLY.Weight.IService;
using FObjBase;
using MultiLayout;
using MultiLayout.UiModule;
using System;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using System.Windows.Threading;
using Unity;
namespace FLY.Weight.UI.Client.UiModule
{
/// <summary>
/// DynAreaWeight.xaml 的交互逻辑
/// </summary>
public partial class DynAreaWeightV5 : UserControl
{
#region 延时推送 MARKNO
const int MARKNO_UPDATEERROR = 1;
#endregion
IUnityContainer container;
IWeightSystemService weightSystemService;
SetPLCUpdatePlan setPlan;
DynAreaErrorVm2 errorVm;
public DynAreaWeightV5()
{
InitializeComponent();
}
[InjectionMethod]
public void Init(
IUnityContainer container,
IWeightSystemService weightSystemService,
[Dependency("weighterWarningService")] IWarningSystem2Service warningSystem
)
{
this.container = container;
this.weightSystemService = weightSystemService;
grid_weighter.DataContext = this.weightSystemService;
errorVm = new DynAreaErrorVm2();
errorVm.Init(container, warningSystem, "称重");
grid_error.DataContext = errorVm;
//注册属性更新计划
string objname = nameof(IWeightSystemService.Accessory);
setPlan = new SetPLCUpdatePlan(
this.weightSystemService.PLCos,
objname,
new string[] {
nameof(Common.WeighterAccessory.Thickness)});
}
}
}