LunarMind/InsertTitlesQuicklyWindow.xaml.cs

(开头部分) 8KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SHomeWorkshop.LunarMind
{
    /// <summary>
    /// InsertTitlesQuicklyWindow.xaml 的交互逻辑
    /// </summary>
    public partial class InsertTitlesQuicklyWindow : Window
    {
        public InsertTitlesQuicklyWindow()
        {
            InitializeComponent();

            avalonEditor.Options.ShowTabs = true;
            avalonEditor.Options.ShowSpaces = true;
            avalonEditor.Options.ShowEndOfLine = true;
            avalonEditor.ShowLineNumbers = true;
            avalonEditor.Options.ConvertTabsToSpaces = false;

            avalonEditor.Text =
 @"//这行是注释,会被忽略
	示例新节点 1
		示例新节点 1-1
		示例新节点 1-2
	示例新节点 2
	示例新节点 3
//注释一定要顶格
		示例新节点 3-1
		示例新节点 3-2
			示例新节点 3-2-1
			示例新节点 3-2-2
		示例新节点 3-3
	示例新节点 4";

            this.Closing += InsertTitlesQuicklyWindow_Closing;
        }

        private void InsertTitlesQuicklyWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = true;
            this.Hide();
        }

        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            //基本思路:
            //    1. 按 Tab 区分要批量添加的标题的层级
            //    2. 这些标题不支持换行。
后面还有 164 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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