From 9d6dc663d96837473adbd57f6904241679c99315 Mon Sep 17 00:00:00 2001 From: lihanbo Date: Fri, 25 Oct 2024 15:17:12 +0800 Subject: [PATCH] =?UTF-8?q?105040=20=E8=A7=A3=E5=86=B3WPF=E7=AA=97?= =?UTF-8?q?=E4=BD=93=E5=9C=A8WinForm=E4=B8=AD=E6=97=A0=E6=B3=95=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sinvo.EplanHpD.Plugin/PluginEntry.cs | 3 +++ Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj | 1 + 2 files changed, 4 insertions(+) diff --git a/Sinvo.EplanHpD.Plugin/PluginEntry.cs b/Sinvo.EplanHpD.Plugin/PluginEntry.cs index 94bfa00..9eec20b 100644 --- a/Sinvo.EplanHpD.Plugin/PluginEntry.cs +++ b/Sinvo.EplanHpD.Plugin/PluginEntry.cs @@ -10,6 +10,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Windows.Forms; +using System.Windows.Forms.Integration; namespace Sinvo.EplanHpD.Plugin { @@ -78,6 +79,8 @@ namespace Sinvo.EplanHpD.Plugin var columns = flexReport.Reporter.Formater.RepColumns; var datas = flexReport.GetAllReportEntries(); var window = new MainWindow(datas, columns); + // 解决WPF窗体在WinForm中无法输入的问题 + ElementHost.EnableModelessKeyboardInterop(window); window.Show(); } } diff --git a/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj b/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj index f5b3531..541acec 100644 --- a/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj +++ b/Sinvo.EplanHpD.Plugin/Sinvo.EplanHpD.Plugin.csproj @@ -81,6 +81,7 @@ +