mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-05-03 22:41:30 +08:00
添加几个参数
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -316,5 +317,15 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Stream CopyStream(this Stream stream)
|
||||||
|
{
|
||||||
|
byte[] bytearray = new byte[stream.Length];
|
||||||
|
stream.Seek(0, SeekOrigin.Begin);
|
||||||
|
stream.Read(bytearray, 0, bytearray.Length);
|
||||||
|
|
||||||
|
var destination = new MemoryStream(bytearray);
|
||||||
|
return destination;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataContextForPopup">Object state to associate with the dialog</param>
|
/// <param name="dataContextForPopup">Object state to associate with the dialog</param>
|
||||||
/// <returns>True/False if UI is displayed.</returns>
|
/// <returns>True/False if UI is displayed.</returns>
|
||||||
bool? ShowDialog(object dataContextForPopup);
|
bool? ShowDialog(object dataContextForPopup, bool buttonVisable = true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This method displays a modal dialog associated with the given key.
|
/// This method displays a modal dialog associated with the given key.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataContextForPopup">Object state to associate with the dialog</param>
|
/// <param name="dataContextForPopup">Object state to associate with the dialog</param>
|
||||||
/// <returns>True/False if UI is displayed.</returns>
|
/// <returns>True/False if UI is displayed.</returns>
|
||||||
public bool? ShowDialog(object dataContextForPopup)
|
public bool? ShowDialog(object dataContextForPopup, bool buttonVisable = true)
|
||||||
{
|
{
|
||||||
Window win = new PopupWindow();
|
Window win = new PopupWindow();
|
||||||
win.DataContext = dataContextForPopup;
|
win.DataContext = dataContextForPopup;
|
||||||
|
|||||||
Reference in New Issue
Block a user