LunarMind/ConceptWidgets/Widgets/TriangleWidget.cs

(开头部分) 98KB

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

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Xml;
using SHomeWorkshop.LunarConcept.Adorners;
using SHomeWorkshop.LunarConcept.Controls;
using SHomeWorkshop.LunarConcept.Enums;
using SHomeWorkshop.LunarConcept.Tools;
using SHomeWorkshop.LunarConcept.Widgets.Interfaces;
using System.Collections.Generic;
using SHomeWorkshop.LunarMind;

namespace SHomeWorkshop.LunarConcept.Widgets
{
    /// <summary>
    /// 创建时间:2012年1月20日
    /// 创建者:  杨震宇
    /// 
    /// 主要用途:三角形部件。
    /// </summary>
    public class TriangleWidget : ShapeWidget, ICanBeLinkedWidget, Widgets.Interfaces.ITextRotate
    {
        #region 构造方法=====================================================================================================

        /// <summary>
        /// [静态构造方法]
        /// </summary>
        static TriangleWidget()
        {
            dashArray = new DoubleCollection() { 2, 2 };
        }

        /// <summary>
        /// [构造方法]
        /// </summary>
        public TriangleWidget(PageEditorReader masterEditor)
            : base(masterEditor)
        {
            widgetType = Enums.WidgetTypes.Triangle;
            widgetClassLocalName = Widget.GetWidgetClassLocalName(this.GetType().Name);

            this.mainPath.Data = this.pathGeometry;
            this.pathGeometry.Figures.Add(this.pathFigure);
            this.pathFigure.Segments.Add(this.arcSegmentAtInner);
            this.pathFigure.Segments.Add(this.startLineSegment);
            this.pathFigure.Segments.Add(this.arcSegmentAtOuter);
            this.pathFigure.Segments.Add(this.endLineSegment);

            //mainPolygon.Fill = null;
            //mainPolygon.Stroke = WidgetForeColor;
            mainPath.Fill = null;
            mainPath.Stroke = WidgetForeColor;

            this.mainCanvas.Children.Add(mainPath);

            Canvas.SetZIndex(mainPath, 0);
后面还有 2063 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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