LunarPresentation/Widegets/BracketPanel.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
namespace SHomeWorkshop.LunarPresentation.Widegets
{
public class BracketPanel : Canvas
{
public BracketPanel()
{
this.Width = 24;
this.Background = Brushes.Transparent;
this.SizeChanged += new SizeChangedEventHandler(BracketPanel_SizeChanged);
}
private Path myPath;
public enum BracketLocation { Top, Bottom, Left, Right }
/// <summary>
/// 括弧位置,默认为左括弧(开口向右)。
/// </summary>
private BracketLocation location = BracketLocation.Left;
public BracketLocation Location
{
get { return location; }
set
{
location = value;
switch (location)
{
case BracketLocation.Left:
case BracketLocation.Right:
{
Width = 24; Height = double.NaN; break;
}
case BracketLocation.Top:
case BracketLocation.Bottom:
{
Height = 24; Width = double.NaN; break;
}
}
}
}
private Brush foreground=Brushes.White;
public Brush Foreground
{
get { return foreground; }
set
{
foreground = value;
RefreshBracketPath();
}
}
public void RefreshBracketPath()
后面还有 217 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。