LunarPresentation/Expressions/LogicGenuspecies.cs

(开头部分) 7KB

这里只显示每个文件的开头 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 LogicGenuspecies : CanvasExpression
    {
        public LogicGenuspecies(SubPanel rootPanel, SubPanel parentPanel, Editor editor)
            : base(rootPanel, parentPanel, editor)
        {

            //绘制两个交叉外接圆。
            outEllipse = new Ellipse();
            outEllipse.StrokeThickness = 2;
            outEllipse.Stroke = ExForeground;
            outEllipse.Fill = System.Windows.Media.Brushes.Transparent;
            outEllipse.Cursor = Cursors.Hand;
            outEllipse.MouseRightButtonDown += Ellipse_MouseRightButtonDown;
            outEllipse.MouseLeftButtonDown += Ellipse_MouseLeftButtonDown;
            outEllipse.MouseLeftButtonUp += Ellipse_MouseLeftButtonUp;

            inEllipse = new Ellipse();
            inEllipse.StrokeThickness = 2;
            inEllipse.Stroke = ExForeground;
            inEllipse.Fill = System.Windows.Media.Brushes.Transparent;
            inEllipse.Cursor = Cursors.Hand;
            inEllipse.MouseRightButtonDown += Ellipse_MouseRightButtonDown;

            basePanel.Children.Add(outEllipse);
            basePanel.Children.Add(inEllipse);

            Canvas.SetZIndex(outEllipse, 1);
            Canvas.SetZIndex(inEllipse, 2);

            //两个主面板。
            leftPanel = new SubPanel(rootPanel, parentPanel, editor, this);
            rightPanel = new SubPanel(rootPanel, parentPanel, editor, this);

            leftPanel.SizeChanged += eachPanel_SizeChanged;
            rightPanel.SizeChanged += eachPanel_SizeChanged;

            basePanel.Children.Add(leftPanel);
            basePanel.Children.Add(rightPanel);

            Canvas.SetZIndex(leftPanel, 101);
            Canvas.SetZIndex(rightPanel, 102);

            RefreshSubPanelRelatios();

            this.chineseName = "属种关系式";
        }

        void Ellipse_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            // 接收拖动来的公式。
后面还有 174 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。