/// <summary> /// See interface docs. /// </summary> /// <param name="parameters"></param> public void Startup(PluginStartupParameters parameters) { Singleton = this; var options = OptionsStorage.Load(this); _HtmlLocaliser = Factory.Singleton.Resolve <IHtmlLocaliser>(); _HtmlLocaliser.Initialise(); _HtmlLocaliser.AddResourceStrings(typeof(DatabaseEditorStrings)); _BaseStationDatabase = Factory.Singleton.Resolve <IAutoConfigBaseStationDatabase>().Singleton.Database; _BaseStationDatabase.WriteSupportEnabled = true; _WebSiteExtender = Factory.Singleton.Resolve <IWebSiteExtender>(); _WebSiteExtender.Enabled = false; _WebSiteExtender.WebRootSubFolder = "Web"; _WebSiteExtender.InjectContent = @"<script src=""script-DatabaseEditor/inject.js"" type=""text/javascript"">"; _WebSiteExtender.InjectMapPages(); _WebSiteExtender.InjectReportPages(); _WebSiteExtender.PageHandlers.Add(String.Format("/{0}/SingleAircraftSearch.json", ProtectedFolder), SingleAircraftSearch); _WebSiteExtender.PageHandlers.Add(String.Format("/{0}/SingleAircraftSave.json", ProtectedFolder), SingleAircraftSave); _WebSiteExtender.Initialise(parameters); _WebSiteExtender.ProtectFolder(ProtectedFolder); parameters.WebSite.HtmlLoadedFromFile += WebSite_HtmlLoadedFromFile; ApplyOptions(options); }
/// <summary> /// See interface docs. /// </summary> /// <param name="parameters"></param> public void Startup(PluginStartupParameters parameters) { Singleton = this; var options = OptionsStorage.Load(this); _HtmlLocaliser = Factory.Resolve <IHtmlLocaliser>(); _HtmlLocaliser.Initialise(); _HtmlLocaliser.AddResourceStrings(typeof(DatabaseEditorStrings)); BaseStationDatabase = Factory.ResolveSingleton <IAutoConfigBaseStationDatabase>().Database; BaseStationDatabase.WriteSupportEnabled = true; _WebSiteExtender = Factory.Resolve <IWebSiteExtender>(); _WebSiteExtender.Enabled = false; _WebSiteExtender.WebRootSubFolder = "Web"; _WebSiteExtender.InjectContent = @"<script src=""script-DatabaseEditor/inject.js"" type=""text/javascript"">"; _WebSiteExtender.InjectMapPages(); _WebSiteExtender.InjectReportPages(); _WebSiteExtender.Initialise(parameters); _WebSiteExtender.ProtectFolder(ProtectedFolder); parameters.WebSite.HtmlLoadedFromFile += WebSite_HtmlLoadedFromFile; var redirection = Factory.ResolveSingleton <IRedirectionConfiguration>(); redirection.AddRedirection("/DatabaseEditor", "/DatabaseEditor/index.html", RedirectionContext.Any); redirection.AddRedirection("/DatabaseEditor/", "/DatabaseEditor/index.html", RedirectionContext.Any); ApplyOptions(options); }
/// <summary> /// See interface docs. /// </summary> /// <param name="parameters"></param> public void Startup(PluginStartupParameters parameters) { Singleton = this; var options = OptionsStorage.Load(this); _HtmlLocaliser = Factory.Resolve <IHtmlLocaliser>(); _HtmlLocaliser.Initialise(); _HtmlLocaliser.AddResourceStrings(typeof(FeedFilterStrings)); _WebSiteExtender = Factory.Resolve <IWebSiteExtender>(); _WebSiteExtender.Enabled = false; _WebSiteExtender.WebRootSubFolder = "Web"; _WebSiteExtender.PageHandlers.Add(String.Format("/{0}/FetchFilterConfiguration.json", ProtectedFolder), FetchFilterConfiguration); _WebSiteExtender.PageHandlers.Add(String.Format("/{0}/SaveFilterConfiguration.json", ProtectedFolder), SaveFilterConfiguration); _WebSiteExtender.Initialise(parameters); var redirection = Factory.ResolveSingleton <IRedirectionConfiguration>(); redirection.AddRedirection("/FeedFilter", "/FeedFilter/index.html", RedirectionContext.Any); redirection.AddRedirection("/FeedFilter/", "/FeedFilter/index.html", RedirectionContext.Any); parameters.WebSite.HtmlLoadedFromFile += WebSite_HtmlLoadedFromFile; ApplyOptions(options); }