コード例 #1
0
        public static void Registration()
        {
            // Assigning file paths to varialbles
            lib     = Path.Combine(CrucibleApplication.PluginsDirectory, @"TextEditorPlugin_Resources\libcef.dll");
            browser = Path.Combine(CrucibleApplication.PluginsDirectory, @"TextEditorPlugin_Resources\CefSharp.BrowserSubprocess.exe");
            locales = Path.Combine(CrucibleApplication.PluginsDirectory, @"TextEditorPlugin_Resources\locales\");
            res     = Path.Combine(CrucibleApplication.PluginsDirectory, @"TextEditorPlugin_Resources\");

            LibraryLoader = new CefLibraryHandle(lib);
            bool isValid = !LibraryLoader.IsInvalid;

            Console.WriteLine($"Library is valid: {isValid}");

            CrucibleApplication.RegisterFileUI(FileType.Text, CreateTextFileTab);
            CrucibleApplication.RegisterFileUI(FileType.Configuration, CreateTextFileTab);
            CrucibleApplication.RegisterFileUI(FileType.XML, CreateTextFileTab);
            CrucibleApplication.RegisterFileUI(FileType.Lua, CreateTextFileTab);
            CrucibleApplication.RegisterFileUI(FileType.JSON, CreateTextFileTab);
            CrucibleApplication.RegisterFileUI(FileType.INI, CreateTextFileTab);

            CodeEditor.Controls.CodeEditor.Init();
        }
コード例 #2
0
 public static void Registration()
 {
     // Registration occurs before the application loads
     CrucibleApplication.RegisterFileUI(FileType.Generic, CreateTab);
 }
コード例 #3
0
 public static void Registration()
 {
     CrucibleApplication.RegisterFileUI(FileType.DataCoreBinary, CreateDatabaseTab);
 }