/// <summary> /// 初始化基本信息 /// </summary> protected override void InitBaseInfo() { base.InitBaseInfo(); ///创建函数入口代码块 FunctionEnterBox = CreateXCodeBox("方法入口", CenterPoint, CodeBox.XAType.XFunctionEnter); FunctionEnterBox.OpenButton = 2; FunctionEnterBox.AddXExcXAribute(); FunctionEnterBox.XAributeChangeMessage = () => { XAributeChangeMessage(this); };///属性消息变更通知 ///创建函数出口代码块 CodeBox functionExc = CreateXCodeBox("方法出口", new Point(CenterPoint.X + 250, CenterPoint.Y), CodeBox.XAType.XFunctionExc); functionExc.OpenButton = 1; functionExc.AddXEnterXAribute(); functionExc.XAributeChangeMessage = () => { XAributeChangeMessage(this); };///属性消息变更通知 ///保存函数出口代码块的地址 FunctionExcBox = functionExc; ///添加初始连线 XAribute FirstXa = FunctionEnterBox.GetRightExc()[0]; XAribute SecondXa = functionExc.GetLeftEnter(); BezierLine MyBezierLine = new BezierLine(CreateBezierID(), FirstXa.BorderColor, FirstXa.GetWorldPosition(), FirstXa.SelectPositionStyle); AddBezierLine(MyBezierLine); FirstXa.AddBezierLine(MyBezierLine); MyBezierLine.StartPoint.LinkAribute = FirstXa; SecondXa.AddBezierLine(MyBezierLine); MyBezierLine.EndPoint.LinkAribute = SecondXa; MyBezierLine.SetBezierLine(SecondXa.GetWorldPosition(), SecondXa.SelectPositionStyle); }