LunarPresentation/Commands/EditBaseText.cs

(开头部分) 12KB

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

using System.Windows;
using SHomeWorkshop.LunarPresentation.Dialogs;

namespace SHomeWorkshop.LunarPresentation.Commands
{
    public partial class Command
    {
        public static void EditBaseText(LunarPresentation.Expressions.BaseText curEx,
            ModifingItem mi = null, bool editingCommentText = false, string newText = null)
        {
            LunarPresentation.Expressions.BaseText btx
                = curEx as LunarPresentation.Expressions.BaseText;

            MainWindow mainWindow = curEx.Editor.ParentWindow;

            BaseTextEditor bte = new BaseTextEditor();

            #region 废弃代码
            //if (mainWindow.WindowState == WindowState.Maximized)
            //{
            //if (mainWindow.tbtnAutoLocationBaseTextEditor.IsChecked == true)
            //{
            //    bte.Top = 0;
            //    bte.Width = 440;
            //    bte.Left = mainWindow.ActualWidth - 448;
            //}
            //else
            //{
            //最大化主窗口,且未锁定编辑器状态下的编辑操作
            //bte.Width = mainWindow.ActualWidth - 80;
            //bte.Left = (mainWindow.ActualWidth - bte.Width) / 2;
            //bte.Height = 100;
            //bte.Top = mainWindow.ActualHeight - bte.Height - 86;//86包含状态条、滚动条的高度。

            //如果正在编辑的文本块被挡住,就自动向上滚动。
            //AutoScrollBaseText(bte);
            //}
            //}
            //else
            //{
            //if (mainWindow.tbtnAutoLocationBaseTextEditor.IsChecked == true)
            //{
            //    bte.WindowStartupLocation = WindowStartupLocation.Manual;
            //    bte.Width = 640;
            //    bte.Left = mainWindow.Left + mainWindow.ActualWidth - bte.Width;
            //    bte.Top = mainWindow.Top;
            //}
            //else
            //{
            //非最大化状态下编辑
            //bte.Width = mainWindow.ActualWidth - 80;
            //bte.Left = mainWindow.Left + (mainWindow.ActualWidth - bte.Width) / 2;
            //bte.Height = 100;
            //bte.Top = mainWindow.Top + mainWindow.ActualHeight - bte.Height - 86;//86包含状态条、滚动条的高度。

            //如果正在编辑的文本块被挡住,就自动向上滚动。
            //AutoScrollBaseText(bte);
            //}
            //} 
            #endregion
后面还有 260 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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