LunarPresentation/Expressions/LogicCross.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Xml;
namespace SHomeWorkshop.LunarPresentation.Expressions
{
public class LogicCross : CanvasExpression
{
public LogicCross(SubPanel rootPanel, SubPanel parentPanel, Editor editor)
: base(rootPanel, parentPanel, editor)
{
//绘制两个交叉外接圆。
leftEllipse = new Ellipse();
leftEllipse.StrokeThickness = 2;
leftEllipse.Stroke = ExForeground;
leftEllipse.Fill = System.Windows.Media.Brushes.Transparent;
leftEllipse.Cursor = Cursors.Hand;
leftEllipse.MouseRightButtonDown += Ellipse_MouseRightButtonDown;
leftEllipse.MouseLeftButtonDown += Ellipse_MouseLeftButtonDown;
leftEllipse.MouseLeftButtonUp += Ellipse_MouseLeftButtonUp;
rightEllipse = new Ellipse();
rightEllipse.StrokeThickness = 2;
rightEllipse.Stroke = ExForeground;
rightEllipse.Fill = System.Windows.Media.Brushes.Transparent;
rightEllipse.Cursor = Cursors.Hand;
rightEllipse.MouseRightButtonDown += Ellipse_MouseRightButtonDown;
rightEllipse.MouseLeftButtonDown += Ellipse_MouseLeftButtonDown;
rightEllipse.MouseLeftButtonUp += Ellipse_MouseLeftButtonUp;
basePanel.Children.Add(leftEllipse);
basePanel.Children.Add(rightEllipse);
Canvas.SetZIndex(leftEllipse, 1);
Canvas.SetZIndex(rightEllipse, 2);
//三个主面板。
middlePanel = new SubPanel(rootPanel, parentPanel, editor, this);
leftPanel = new SubPanel(rootPanel, parentPanel, editor, this);
rightPanel = new SubPanel(rootPanel, parentPanel, editor, this);
middlePanel.SizeChanged += eachPanel_SizeChanged;
leftPanel.SizeChanged += eachPanel_SizeChanged;
rightPanel.SizeChanged += eachPanel_SizeChanged;
basePanel.Children.Add(middlePanel);
basePanel.Children.Add(leftPanel);
basePanel.Children.Add(rightPanel);
Canvas.SetZIndex(middlePanel, 101);
Canvas.SetZIndex(leftPanel, 102);
Canvas.SetZIndex(rightPanel, 103);
RefreshSubPanelRelatios();
this.chineseName = "交叉关系式";
后面还有 207 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。