LunarPresentation/Expressions/LeafPanel.cs

(开头部分) 19KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
using System.Xml;
using SHomeWorkshop.LunarPresentation.Adorners;
using SHomeWorkshop.LunarPresentation.Interfaces;

namespace SHomeWorkshop.LunarPresentation.Expressions
{
    public class LeafPanel : SubPanel, ICollapsed
    {
        public LeafPanel(SubPanel rootPanel, SubPanel parentPanel,
            Editor editor, Expression parentExpression)
            : base(rootPanel, parentPanel, editor, parentExpression)
        {
            HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

            this.chineseName = "叶面板";
            this.Margin = cMargin;

            this.mainBorder.BorderBrush = Brushes.Transparent;
            this.mainBorder.BorderThickness = defNoneBorderWidth;
            Canvas.SetZIndex(this, 10);

            leafAdorner = new LeafAdorner(this);
            AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(this.mainBorder);
            adornerLayer.Add(leafAdorner);
        }

        private LeafAdorner leafAdorner;

        private static Thickness cMargin = new Thickness(4);

        /// <summary>
        /// 叶首面板为0层。
        /// </summary>
        public int Level
        {
            get
            {
                int i = 0;

                LeafPanel sLeaf = this.PreLevelLeaf;
                while (sLeaf != null)
                {
                    sLeaf = sLeaf.PreLevelLeaf;
                    i++;
                }

                return i;
            }
        }

        private string preLevelLeafExID;

        /// <summary>
后面还有 547 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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