Commit 7c595ed8 authored by 潘栩锋's avatar 潘栩锋 🚴

容器只注册 IBlowingService, 程序强制转换为 IBlowingFixService

parent 07a9416d
......@@ -23,12 +23,13 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
}
[InjectionMethod]
public void Init(
IBlowingFixService blowingFixService,
IBlowingService blowingFixService,
IBlowingDetectService blowingDetectService)
{
viewModel = new PgBlowingVm();
viewModel.Init(blowingFixService, blowingDetectService);
viewModel.Init((IBlowingFixService)blowingFixService, blowingDetectService);
this.DataContext = viewModel;
//this.grid_blowing.DataContext = viewModel.renZiJiaService;
//this.grid_bDetect.DataContext = viewModel.bDetect;
......
......@@ -25,11 +25,12 @@ namespace FLY.Thick.Blowing.UI.Fix.Client.UiModule
[InjectionMethod]
public void Init(
IUnityContainer container,
IBlowingFixService blowingFixService,
IBlowingService blowingFixService,
IBlowingDetectService blowingDetectService)
{
this.container = container;
this.blowingFixService = blowingFixService;
this.blowingFixService = (IBlowingFixService)blowingFixService;
this.blowingDetectService = blowingDetectService;
Border_Blowing.DataContext = blowingFixService;
......
......@@ -23,7 +23,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client.UiModule
ScanGraphCircularParam graphparam;
BulkDataServiceClientAdv bulkDataServiceClientAdv;
IDynAreaService dynAreaService;
IBlowingFixService blowingFixService;
IBlowingService blowingService;
public ScanGraphCircular()
{
InitializeComponent();
......@@ -33,11 +33,11 @@ namespace FLY.Thick.Blowing.UI.Fix.Client.UiModule
public void Init(int id,
IDynAreaService dynAreaService,
BulkDataServiceClientAdv bulkDataServiceClientAdv,
IBlowingFixService blowingFixService)
IBlowingService blowingService)
{
this.dynAreaService = dynAreaService;
this.bulkDataServiceClientAdv = bulkDataServiceClientAdv;
this.blowingFixService = blowingFixService;
this.blowingService = blowingService;
//查找参数
graphparam = ScanGraphCircularParams.Current.Items.Find(p => p.ID == id);
......@@ -62,8 +62,8 @@ namespace FLY.Thick.Blowing.UI.Fix.Client.UiModule
graph.SetBinding(GraphScanCircular.MPIsRightProperty, new Binding("MPIsRight"));
//TODO
graph.SetBinding(GraphScanCircular.BoltCntProperty, new Binding("NBolts") { Source = blowingFixService });
graph.SetBinding(GraphScanCircular.OrgBoltNoProperty, new Binding("OrgBoltNo") { Source = blowingFixService });
graph.SetBinding(GraphScanCircular.BoltCntProperty, new Binding("NBolts") { Source = blowingService });
graph.SetBinding(GraphScanCircular.OrgBoltNoProperty, new Binding("OrgBoltNo") { Source = blowingService });
graph.SetBinding(GraphScanCircular.TargetProperty, new Binding("Target") { Source = dynAreaService.DynArea });
graph.SetBinding(GraphScanCircular.AlarmProperty, new Binding("Alarm") { Source = dynAreaService.DynArea });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment