Esempio n. 1
0
        public LoaderManager(IFileLoader loader, LoaderExtension ext)
        {
            Instance = loader;
            m_Ext    = ext;

            m_Ext.RequestPreLoadFile += OnRequestPreLoadFile;
        }
Esempio n. 2
0
        void ConfigureExtension(LoaderExtension extension)
        {
            var configuratorSetPage = new ConfiguratorSetPage();

            foreach (var configurator in extension.Items.OfType <LoaderConfiguratorType>())
            {
                configuratorSetPage.ConfiguratorTypes.Add(new ConfiguratorSetPageItem(configurator, null));
            }

            NavigationService.Navigate(configuratorSetPage);

            configuratorSetPage.Return += ConfiguratorSetPageReturn;
        }
Esempio n. 3
0
        public static void InitExtension(LoaderExtension extension)
        {
            var queryParams = new object[]
            {
                "@Path", extension.Path,
                "@IsScript", extension is LoaderScriptExtension
            };

            var id = DatabaseUtil.ExecuteNullableScalar <int>(
                "SELECT Id FROM Extensions WHERE Path = @Path AND IsScript = @IsScript",
                queryParams);

            if (id == null)
            {
                id = DatabaseUtil.ExecuteInsert(
                    "INSERT INTO Extensions (Path, IsScript) VALUES (@Path, @IsScript)",
                    queryParams);
            }

            extension.DatabaseId = id.Value;
        }
Esempio n. 4
0
 protected LoaderExtensionItem(LoaderExtension extension)
 {
     Extension = extension;
 }