This commit is contained in:
艾竹
2022-12-12 22:33:17 +08:00
parent 02f428d61a
commit 4b798f75a0
60 changed files with 330 additions and 277 deletions

View File

@@ -0,0 +1,29 @@
using System.Windows;
using AIStudio.Wpf.DiagramDesigner.Controls;
namespace AIStudio.Wpf.DiagramDesigner.Services
{
public class WPFUIVisualizerService : IUIVisualizerService
{
#region Public Methods
/// <summary>
/// This method displays a modal dialog associated with the given key.
/// </summary>
/// <param name="dataContextForPopup">Object state to associate with the dialog</param>
/// <returns>True/False if UI is displayed.</returns>
public bool? ShowDialog(object dataContextForPopup)
{
Window win = new PopupWindow();
win.DataContext = dataContextForPopup;
win.Owner = Application.Current.MainWindow;
if (win != null)
return win.ShowDialog();
return false;
}
#endregion
}
}