LunarMind/PictureBox.cs

(开头部分) 67KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Documents;
using System.ComponentModel;
using System.Windows.Controls;
using System.Xml;
using System.Windows;
using System.Windows.Media;
using System.Windows.Shapes;
using SHomeWorkshop.LunarTools;
using System.Windows.Input;
using System.Windows.Controls.Primitives;
using System.Windows.Media.Imaging;
using System.IO;
using Microsoft.Win32;
using SHomeWorkshop.LunarConcept.Controls;
using SHomeWorkshop.LunarConcept;
using System.Diagnostics;
using System.Threading;
using System.IO.MemoryMappedFiles;

namespace SHomeWorkshop.LunarMind
{
    public class PictureBox : AdornerDecorator, INotifyPropertyChanged
    {
        public PictureBox(MainWindow editor, Title masterTitle)
        {
            this.ContextMenu = S_ContextMenu;
            this.editor = editor;
            this.masterTitle = masterTitle;
            this.masterTitleID = masterTitle.ID;

            this.connectLine.Stroke = this.borderColor;
            this.connectLine.StrokeThickness = 2.4;
            this.connectLine.StrokeDashArray = dashArray;

            this.mainImage.Cursor = Cursors.SizeAll;

            this.baseBorder.PreviewMouseRightButtonUp += new MouseButtonEventHandler(baseBorder_PreviewMouseRightButtonUp);
            this.baseBorder.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(baseBorder_PreviewMouseLeftButtonDown);

            this.Child = this.baseBorder;
            this.baseBorder.Child = this.baseViewBox;
            this.baseViewBox.Child = this.mainImage;

            AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(this.baseBorder);

            this.borderAdorner = new Adorners.PictureBoxBorderAdorner(this.baseBorder, this);
            adornerLayer.Add(this.borderAdorner);
        }

        private Border baseBorder = new Border() { Background = Brushes.Transparent, };

        private Viewbox baseViewBox = new Viewbox();

        static void miLoadImage_Click(object sender, RoutedEventArgs e)
        {
            if (Globals.MainWindow.SelectedPictureBox != null)
后面还有 1790 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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