LunarPresentation/Expressions/Row.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;
using System.Xml;
using SHomeWorkshop.LunarPresentation.Interfaces;
using SHomeWorkshop.LunarPresentation.Widegets;
using WPF = System.Windows.Controls;
using System;
namespace SHomeWorkshop.LunarPresentation.Expressions
{
public class Row : Expression, IDirection, ICollapsed
{
public Row(SubPanel rootPanel, SubPanel parentPanel, Editor editor) :
base(rootPanel, parentPanel, editor)
{
this.mainSubPanel = new SubPanel(rootPanel, null, editor, this);
this.mainBorder.Child = this.mainSubPanel;
this.subPanels = new List<SubPanel>();
this.subPanels.Add(this.mainSubPanel);
this.firstSubPanel = this.lastSubPanel = this.mainSubPanel;
this.chineseName = "行";
this.borderColor = null;
}
private static Thickness cMargin = new Thickness(1);
private static Thickness noMargin = new Thickness(0);
private SubPanel mainSubPanel;
public SubPanel MainSubPanel
{
get { return mainSubPanel; }
}
protected override void BuildChildren()
{
base.BuildChildren();
if (XmlData == null) return;
//全部清空。再重建。
this.mainSubPanel.BasePanel.Children.Clear();
XmlNode panelNode = this.XmlData.SelectSingleNode("Expression");
if (panelNode.GetAttributeString("Type") == TypeOfExpression.SubPanel.ToString())
{
this.mainSubPanel.XmlData = panelNode;
}
XmlAttribute attrIsCollapsed = this.XmlData.GetAttribute("IsCollapsed");
if (attrIsCollapsed != null)
{
this.isCollapsed = bool.Parse(attrIsCollapsed.Value);
this.RefreshIsCollapsed();
}
后面还有 163 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。