⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resourcecreator.cs

📁 Freetextbox是优秀的在线编辑器
💻 CS
字号:
namespace FreeTextBoxControls.Support
{
    using FreeTextBoxControls;
    using System;
    using System.IO;
    using System.Reflection;
    using System.Text;

    public class ResourceCreator
    {
        public static string CreateToolbarItemScript()
        {
            StringBuilder builder1 = new StringBuilder();
            string text1 = Assembly.GetAssembly(typeof(FreeTextBox)).FullName;
            int num1 = text1.IndexOf("Version=") + 8;
            int num2 = text1.IndexOf(",", num1);
            text1 = text1.Substring(num1, num2 - num1);
            builder1.Append("//** FreeTextBox Builtin ToolbarItems Script (" + text1.Replace(".5000", "") + ") ***/\n");
            builder1.Append("//   by John Dyer\n");
            builder1.Append("//   http://www.freetextbox.com/\n");
            builder1.Append("//**********************************************/\n");
            builder1.Append("\n");
            Type[] typeArray1 = typeof(FreeTextBox).Module.Assembly.GetTypes();
            foreach (Type type1 in typeArray1)
            {
                if (type1.IsClass && (type1.BaseType.BaseType == typeof(ToolbarItem)))
                {
                    object obj1 = type1.InvokeMember(null, BindingFlags.CreateInstance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly, null, null, new object[0]);
                    builder1.Append(type1.InvokeMember("BuiltInScript", BindingFlags.GetProperty, null, obj1, new object[0]).ToString() + "\n");
                }
            }
            return builder1.ToString();
        }

        public static void SaveToolbarScript(string filePath)
        {
            StreamWriter writer1 = File.CreateText(filePath);
            writer1.Write(ResourceCreator.CreateToolbarItemScript());
            writer1.Close();
        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -