LunarPresentation/ExContextMenus.cs

(开头部分) 79KB

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

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using SHomeWorkshop.LunarPresentation.Commands;
using SHomeWorkshop.LunarPresentation.Interfaces;
using WinForm = System.Windows.Forms;

namespace SHomeWorkshop.LunarPresentation
{
    public static class ExContextMenus
    {
        static ExContextMenus()
        {
            #region 箭头式快捷菜单
            arrowContextMenu = new ContextMenu();
            arrowContextMenu.Opened += new RoutedEventHandler(arrowContextMenu_Opened);
            TextOptions.SetTextFormattingMode(arrowContextMenu, TextFormattingMode.Display);

            MenuItem cmiArrowLocation = new MenuItem() { Header = "箭头位置(_L)" };

            cmiArrowStart = new MenuItem() { Header = "首箭头(_S)" };
            cmiArrowStart.Click += new RoutedEventHandler(cmiArrowStart_Click);

            cmiArrowEnd = new MenuItem() { Header = "尾箭头(_E)" };
            cmiArrowEnd.Click += new System.Windows.RoutedEventHandler(arrowExample_Click);

            cmiArrowAll = new MenuItem() { Header = "双箭头(_A)" };
            cmiArrowAll.Click += new RoutedEventHandler(cmiArrowAll_Click);

            cmiArrowNone = new MenuItem() { Header = "无箭头(_N)" };
            cmiArrowNone.Click += new RoutedEventHandler(cmiArrowNone_Click);

            MenuItem arrowheader = BuildMenuHeader("箭头");
            arrowheader.Click += new RoutedEventHandler(arrowheader_Click);
            arrowContextMenu.Items.Add(arrowheader);

            arrowContextMenu.Items.Add(new Separator());

            cmiArrowLocation.Items.Add(cmiArrowStart);
            cmiArrowLocation.Items.Add(cmiArrowEnd);
            cmiArrowLocation.Items.Add(cmiArrowAll);
            cmiArrowLocation.Items.Add(cmiArrowNone);

            arrowContextMenu.Items.Add(cmiArrowLocation);

            AddCommonMenuItems(arrowContextMenu);
            #endregion

            #region 子面板快捷菜单
            subpanelContextMenu = new ContextMenu();
            TextOptions.SetTextFormattingMode(subpanelContextMenu, TextFormattingMode.Display);

            MenuItem cmiSwitchDirection = new MenuItem() { Header = "指向切换(_S)" };
            cmiSwitchDirection.InputGestureText = "H";
            cmiSwitchDirection.Click += new RoutedEventHandler(cmiSwitchDirection_Click);

            MenuItem subPanelHeader = BuildMenuHeader("子面板");
            subPanelHeader.Click += new RoutedEventHandler(subPanelHeader_Click);
后面还有 1905 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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