From ea476590da735a649fd936404de13fb15ba8d110 Mon Sep 17 00:00:00 2001 From: lihanbo Date: Fri, 24 Jan 2025 08:46:21 +0800 Subject: [PATCH] =?UTF-8?q?105040=20Update=20=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=A2=E5=A4=B1=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/CableLectotypeUserControl.xaml.cs | 15 ++++++++-- .../View/Dialog/NotSavedWarningWindow.xaml | 6 ++-- .../View/LectotypeWindow.xaml.cs | 29 ++++++++++--------- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/View/CableLectotypeUserControl.xaml.cs b/Sinvo.EplanHpD.Plugin.WPFUI/View/CableLectotypeUserControl.xaml.cs index 894413b..e84022d 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/View/CableLectotypeUserControl.xaml.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/View/CableLectotypeUserControl.xaml.cs @@ -21,6 +21,7 @@ using static Sinvo.EplanHpD.Plugin.WPFUI.Utils.LectotypeManager; using System.Linq; using EPLAN.Harness.ProjectCore.Occurrences; using Sinvo.EplanHpD.Plugin.WPFUI.Extension; +using Sinvo.EplanHpD.Plugin.Service.Model; namespace Sinvo.EplanHpD.Plugin.WPFUI.View { @@ -95,11 +96,12 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.View //var motor = Motor as MotorModel; if(Motor is CableLectotypeViewModel motor) { - WeakReferenceMessenger.Default.Send(new LectotypeMessage + WeakReferenceMessenger.Default.Send(new LectotypeMessage (new System.Collections.Generic.Dictionary { {motor.Motor.MotorModelStr,motor.Motor.AxisNo} - })); + }), "Lectotype" + ); } } @@ -131,6 +133,15 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.View { if (ViewModel.SaveToDb()) { + if (Motor is CableLectotypeViewModel motor) + { + WeakReferenceMessenger.Default.Send(new LectotypeMessage + (new System.Collections.Generic.Dictionary + { + {motor.Motor.MotorModelStr,motor.Motor.AxisNo} + }), "LectotypeSaved" + ); + } Growl.Success("保存成功", "CableLectotypeMessage"); } else diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/View/Dialog/NotSavedWarningWindow.xaml b/Sinvo.EplanHpD.Plugin.WPFUI/View/Dialog/NotSavedWarningWindow.xaml index 34f3ec1..f49d2b1 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/View/Dialog/NotSavedWarningWindow.xaml +++ b/Sinvo.EplanHpD.Plugin.WPFUI/View/Dialog/NotSavedWarningWindow.xaml @@ -43,11 +43,13 @@