LunarPresentation/Expressions/UnKnow.cs

(开头部分) 2KB

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

using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Xml;

namespace SHomeWorkshop.LunarPresentation.Expressions
{
    public class UnKnow : Expression
    {
        public UnKnow(SubPanel rootPanel, SubPanel parentPanel, Editor editor)
            : base(rootPanel, parentPanel, editor)
        {
            mainButton = new Button();
            mainButton.Background = Brushes.WhiteSmoke;
            mainButton.Foreground = Brushes.DarkGray;
            mainButton.Content = "※未知类型公式※";
            mainButton.Click += new System.Windows.RoutedEventHandler(mainButton_Click);
            this.mainBorder.Child = mainButton;

            this.chineseName = "未知类型";
        }

        void mainButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            e.Handled = true;
            if (this.XmlData == null)
            {
                MessageBox.Show("未找到此公式的后台数据,无法显示相关信息!",
                    Globals.appName, MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }

            XmlAttribute attrType = this.XmlData.GetAttribute("Type");
            if (attrType == null)
            {
                MessageBox.Show("未能在此公式的后台数据中找到类型信息!",
                   Globals.appName, MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }

            MessageBox.Show("此公式类型代码为:" + attrType.Value,
                   Globals.appName, MessageBoxButton.OK, MessageBoxImage.Warning);
        }

        private Button mainButton;

        protected override void BuildChildren()
        {
            base.BuildChildren();
        }

        public override void SetProperty(string propertyName, string value)
        {
            base.SetProperty(propertyName, value);

            //switch (propertyName)
            //{
            //    case "Indent":
            //        {
            //            this.Indent = int.Parse(value);
后面还有 6 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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