LunarMind/TestEditor/QuestionEditorWindow.xaml.cs
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using LunarSF.SHomeWorkshop.LunarMind;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.TestEditor
{
/// <summary>
/// QuestionEditorWindow.xaml 的交互逻辑
/// </summary>
public partial class QuestionEditorWindow : Window
{
public QuestionEditorWindow(Title title)
{
InitializeComponent();
Grid.SetRow(mainEditor, 1);
mainGrid.Children.Add(mainEditor);
this.masterTitle = title;
if (title == null)
{
this.mainEditor.Text = "出现异常:未传入要编辑后台试题文本的标题。不可编辑。";
this.mainEditor.IsEnabled = false;
}
string srcText = XmlTools.RestoreXmlChars(title.QuestionText);
if (string.IsNullOrEmpty(srcText))
{
this.mainEditor.Text = Properties.Resources.TitleBackgroundQuestionsSample;
}
else
{
this.mainEditor.Text = srcText;
}
this.mainEditor.Document.UndoStack.MarkAsOriginalFile();
//启用快捷键。避免输入法干扰。
Globals.SwitchInputMethod(false);
this.Loaded += QuestionEditorWindow_Loaded;
this.KeyDown += QuestionEditorWindow_KeyDown;
}
void QuestionEditorWindow_KeyDown(object sender, KeyEventArgs e)
{
switch (e.Key)
{
case Key.F2:
后面还有 292 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。