mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-07 17:56:35 +08:00
xx
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Windows;
|
||||
using System.Xml.Serialization;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
@@ -69,8 +70,22 @@ namespace AIStudio.Wpf.Flowchart.Models
|
||||
mindNode.Spacing = Spacing;
|
||||
mindNode.Offset = Offset;
|
||||
mindNode.IsExpanded = IsExpanded;
|
||||
mindNode.LinkInfo = new LinkInfo(LinkInfoModel?.Url, LinkInfoModel?.Text);
|
||||
mindNode.ImageInfo = new ImageInfo(ImageInfoModel?.Url, ImageInfoModel?.Text);
|
||||
if (string.IsNullOrEmpty(LinkInfoModel?.Url) && string.IsNullOrEmpty(LinkInfoModel?.Text))
|
||||
{
|
||||
mindNode.LinkInfo = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
mindNode.LinkInfo = new LinkInfo(LinkInfoModel?.Url, LinkInfoModel?.Text);
|
||||
}
|
||||
if (string.IsNullOrEmpty(ImageInfoModel?.Url) && string.IsNullOrEmpty(ImageInfoModel?.Text))
|
||||
{
|
||||
mindNode.ImageInfo = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
mindNode.ImageInfo = new ImageInfo(ImageInfoModel?.Url, ImageInfoModel?.Text);
|
||||
}
|
||||
mindNode.Remark = Remark;
|
||||
mindNode.Priority = Priority;
|
||||
mindNode.Rate = Rate;
|
||||
@@ -82,8 +97,6 @@ namespace AIStudio.Wpf.Flowchart.Models
|
||||
mindNode.InitLayout(false);
|
||||
return mindNode;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class LinkInfoModel
|
||||
@@ -95,8 +108,8 @@ namespace AIStudio.Wpf.Flowchart.Models
|
||||
|
||||
public LinkInfoModel(LinkInfo linkinfo)
|
||||
{
|
||||
Url = linkinfo.Url;
|
||||
Text = linkinfo.Text;
|
||||
Url = linkinfo?.Url;
|
||||
Text = linkinfo?.Text;
|
||||
}
|
||||
|
||||
public string Url
|
||||
@@ -119,8 +132,8 @@ namespace AIStudio.Wpf.Flowchart.Models
|
||||
|
||||
public ImageInfoModel(ImageInfo imageInfo)
|
||||
{
|
||||
Url = imageInfo.Url;
|
||||
Text = imageInfo.Text;
|
||||
Url = imageInfo?.Url;
|
||||
Text = imageInfo?.Text;
|
||||
}
|
||||
|
||||
public string Url
|
||||
|
||||
Reference in New Issue
Block a user