LunarPresentation/Commands/SetEditorBackAndForeground.cs
(开头部分) 18KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System.Windows.Media;
namespace SHomeWorkshop.LunarPresentation.Commands
{
public partial class Command
{
public static void SetBlackBackAndWhiteForeground(bool withColorHeaderText = false)
{
if (Globals.selectedEditor == null) return;
//现在添加了“黑底彩字”。
//if (Globals.selectedEditor.DefaultBackground == Brushes.Black &&
// Globals.selectedEditor.DefaultForeground == Brushes.White) return;
ModifingItem mi = new ModifingItem();
Action actionBackground;
if (Globals.selectedEditor.DefaultBackground is ImageBrush)
{
actionBackground = new Action(null, -1, null, null,
Globals.selectedEditor.DefaultBackgroundXmlString,
ColorPicker.GetBrushName(Brushes.Black), ActionType.DefaultExBackgroundChanging, null);
}
else
{
actionBackground = new Action(null, -1, null, null,
ColorPicker.GetBrushName(Globals.selectedEditor.DefaultBackground),
ColorPicker.GetBrushName(Brushes.Black), ActionType.DefaultExBackgroundChanging, null);
}
Globals.selectedEditor.DefaultBackground = Brushes.Black;
Action actionForeground = new Action(null, -1, null, null,
ColorPicker.GetBrushName(Globals.selectedEditor.DefaultForeground),
ColorPicker.GetBrushName(Brushes.White),
ActionType.DefaultExForegroundChanging, null);
Globals.selectedEditor.DefaultForeground = Brushes.White;
if (Globals.selectedEditor.SelectedExpression != null)
{
mi.OldSelectedExID = Globals.selectedEditor.SelectedExpression.ExID;
}
Action actionExSelectionAdornerBrush = new Action(null, -1, null, null,
ColorPicker.GetBrushName(Globals.selectedEditor.ExSelectionAdornerBrush),
ColorPicker.GetBrushName(Brushes.GreenYellow), ActionType.ExSelectionAdornerBrushChanging, null);
Globals.selectedEditor.ExSelectionAdornerBrush = Brushes.GreenYellow;
Action actionSubPanelSelectionAdornerBrush = new Action(null, -1, null, null,
ColorPicker.GetBrushName(Globals.selectedEditor.SubPanelSelectionAdornerBrush),
ColorPicker.GetBrushName(Brushes.HotPink), ActionType.SubPanelSelectionAdornerBrushChanging, null);
Globals.selectedEditor.SubPanelSelectionAdornerBrush = Brushes.HotPink;
if (withColorHeaderText)
{
Action actHeaderText1Color = new Action(null, -1, null, null,
后面还有 321 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。