mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-14 21:46:37 +08:00
mind
This commit is contained in:
@@ -634,12 +634,28 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
|
||||
private void ExecuteAddLinkCommand(object obj)
|
||||
{
|
||||
SelectedItems.OfType<MindNode>().ToList().ForEach(p => p.LinkInfo = new LinkInfo() { Url = "https://naotu.baidu.com", Text = "https://naotu.baidu.com" });
|
||||
if (obj is object[] array && array.Length == 2)
|
||||
{
|
||||
SelectedItems.OfType<MindNode>().ToList().ForEach(p =>
|
||||
{
|
||||
if (p.LinkInfo == null)
|
||||
p.LinkInfo = new LinkInfo();
|
||||
|
||||
p.LinkInfo.Link = array[0]?.ToString();
|
||||
p.LinkInfo.Text = array[1]?.ToString();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecuteRemoveLinkCommand(object obj)
|
||||
{
|
||||
SelectedItems.OfType<MindNode>().ToList().ForEach(p => p.LinkInfo = null);
|
||||
SelectedItems.OfType<MindNode>().ToList().ForEach(p => {
|
||||
if (p.LinkInfo != null)
|
||||
{
|
||||
p.LinkInfo.Link = null; p.LinkInfo.Text = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void ExecuteAddImageCommand(object obj)
|
||||
|
||||
Reference in New Issue
Block a user