LunarPresentation/Dialogs/RichTextEditor.xaml.cs

(开头部分) 36KB

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

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Xml;
using System.Windows.Documents;
using System.Text;
using SHomeWorkshop.LunarPresentation.Expressions;
using System.Windows.Data;
using System.Windows.Controls.Primitives;

namespace SHomeWorkshop.LunarPresentation.Dialogs
{
    /// <summary>
    /// Interaction logic for RichTextEditor.xaml
    /// </summary>
    public partial class RichTextEditor : Window
    {
        public RichTextEditor(Expressions.RichText richText, string initializeText)
        {
            InitializeComponent();

            this.initializeText = initializeText;

            //禁用原来的快捷菜单。
            mainRTB.ContextMenu = null;

            this.masterRichText = richText;

            Globals.SwitchInputMethod(true);

            if (Globals.selectedEditor != null)
            {
                if (Globals.selectedEditor.DefaultBackground == Brushes.Transparent)
                {
                    outBorder.Background = Brushes.WhiteSmoke;
                }
                else
                {
                    outBorder.Background = Globals.selectedEditor.DefaultBackground;
                }

                editorTitleBorder.BorderBrush =
                editorTitle.Foreground = Globals.selectedEditor.DefaultForeground;
            }

            InputMethod.SetIsInputMethodEnabled(mainRTB, true);

            //给边框添加变色效果,结果发现有打扰人的反面效果,于是改成只闪动两次。
            Brush myBrush = new SolidColorBrush();

            ColorAnimation myColorAnimation = new ColorAnimation();
            if (Globals.selectedEditor != null &&
                Globals.selectedEditor.ExSelectionAdornerBrush is SolidColorBrush)
            {
                myColorAnimation.From = ((SolidColorBrush)Globals.selectedEditor.ExSelectionAdornerBrush).Color;
            }
            else
后面还有 989 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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