LunarMind/Relation.cs
(开头部分) 43KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Documents;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Shapes;
using System.Xml;
using SHomeWorkshop.LunarTools;
using System.Windows.Media;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using SHomeWorkshop.LunarMind.Commands;
namespace SHomeWorkshop.LunarMind
{
public class Relation : AdornerDecorator, INotifyPropertyChanged
{
public Relation(MainWindow editor, Title startTitle, Title endTitle)
{
this.mainTextBlock.MouseRightButtonUp += Path_MouseRightButtonUp;
Canvas.SetZIndex(this, 1000);
this.editor = editor;
this.startTitle = startTitle;
this.endTitle = endTitle;
this.startTitleID = startTitle.ID;
this.endTitleID = endTitle.ID;
this.RebuildANewID();
this.baseCanvas.ClipToBounds = false;
//将此Canvas的Width和Hdight都设置为0,然后将此属性设置为false,则应显示其中的TextBlock。
this.Child = baseCanvas;
this.baseCanvas.Children.Add(mainPath);
this.baseCanvas.Children.Add(startArrowPath);
this.baseCanvas.Children.Add(endArrowPath);
this.baseCanvas.Children.Add(mainTextBlock);
mainPath.Cursor = Cursors.Hand;
mainPath.Stroke = lineColor;
mainPath.StrokeThickness = lineWidth;
mainPath.StrokeDashArray = LineDashType.dashDotCollection;
PathGeometry mainPg = new PathGeometry();
this.mainPath.Data = mainPg;
mainPathFigure.IsClosed = false;
mainPg.Figures.Add(mainPathFigure);
mainPathFigure.Segments.Add(mainBezierSegment);
#region 两个箭头。
startArrowPath.Cursor = Cursors.Hand;
startArrowPath.Fill = startArrowPath.Stroke = lineColor;
后面还有 1225 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。